- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm new in the industry, and now I have one code using the for loops. Someone suggests that it could not be synthesizable. Could anyone explain why? Thanks in advance.
integer i,N;
parmeter N=7;
reg A;
always @ (A)
begin
oddparity=1'b0;
for(i=0;i<=N;i=i+1)
if(A) oddparity=~oddparity;
end
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's synthesizable, because it's simply evaluates to an XOR of all bits of A, but it can be simplified to
oddparity =^ A; // reduction XOR operator

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page