what does this verilog HDL statement mean?

Status
Not open for further replies.

ls00722

Newbie level 3
Joined
Dec 24, 2003
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
27
Hi:
I am a beginner on VerilogHDL, what does the following statement do?

reg sum_out_shift[25:0];
reg sum_out_sat[7:0];

sum_out_shift <= {{18{sum_out_sat[7]}}, sum_out_sat};

Sign extending the sum_out_sat? Why "<=" sign was used , not the "=" sign?

Thanks
chris
 

Maybe this answer: **broken link removed** is useful.
 

Yeah it is sign extending it. The 18{sum_out_sat[7]} replicates the MSB of sum_out_sat 18 times. It is then concatenated with the other 8 bits for a total of 26 bits. This is consistent with the length of sum_out_shit. The <= is the non blocking assignment and the = is the blocking assignment.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…