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.

Simple Verilog code and output

Status
Not open for further replies.

spritbille

Newbie level 3
Newbie level 3
Joined
May 11, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Hey. With the verilog code below, then a while after reset_mf_b has been released sum will become a cyclical sequence. What is this repeated output sequence of sum?

Code:
always @(posedge clk_mf or negedge reset_mf_b)

    if(!reset_mf_b)

    begin

      a_tmp <= 5;

      sum   <= 0;

    end

    else

    begin

      a_tmp <= a_tmp +1;

      sum   <= a_tmp +2;

      if(sum >= 12)

        a_tmp <= 5;

    end


---------- Post added at 09:39 ---------- Previous post was at 09:37 ----------

My idea is that the output sequence of sum will be: 7,8,9,10,11,12,13 (repeats) …
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top