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.

help this verilog code! how pull code!

Status
Not open for further replies.

liu_uestc

Junior Member level 1
Joined
Aug 24, 2005
Messages
16
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,367
always@(posedge s3 or posedge addpc);
begin
if(addpc) pc<=pctemp+1'b1;
else begin pc<=13'b0000000000111;pctemp<=pctemp+1'b1;end
end
warning:pctemp isn't the always control envent!
///////////////////////////////////////////////////////////////////////////////////////////////ffunction description:
pc adds one by addpc asynchronously ,pc becomes 13'b0000000000111on the rising edge of s3;
//////////////
how to modify?
 

where did you define the pctemp? if it is a local declaration, then the sequential block requries a label.
 

i define in module,where is local define,how to give a lable,?

Added after 5 minutes:

just one module ,one always,all the varials after
module
 

Hi liu_uestc
your codes are so confusing !

maybe you should modify like this
always@(posedge s3 or posedge addpc);
begin
if(s3)
begin
pc<=13'b0000000000111;
pctemp<=13'b0000000000111;
end //S3 is asynchro preset
else
pc<=pctemp+1'b1;
end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top