Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

A Fundamental Verilog Question on Assignment Statement

Status
Not open for further replies.

billmcgill2

Newbie level 2
Joined
Sep 28, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
Hi guys, I have a question here.
Quite urgent; I really appreciate if you can help.

Suppose three variables:

reg [31:0] A;
reg [31:0] B;
reg [31:0] C;

Do you know what does the following two assignment statements mean?
if (...)
begin
C=(1);
A=(B);

end

Thank you very much!
 

C = (1); // C = 1. (1) = 1. in verilog, this is valid, and would assign C with 0x00000001
C = (B); // C = B. (B) = B. this is valid.

Keep in mind that both use blocking assigns, and thus are only appropriate if the always block describes only combinatorial logic, or is only used for simulation purposes.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top