lmr_fatih
Newbie level 2
- Joined
- Aug 24, 2014
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 15
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
You're lucky I wasn't the first one to reply to this post...I would have given you the following code:Can anyone write the code of the picture?
View attachment 108618
Code Verilog - [expand] 1 2 3 4 5 6 7 8 module a4bit_sync_dwn_cntr ( input c, output reg [3:0] q ); always @ (posedge c) begin q <= q + 1; end endmodule
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 module prime_cntr ( input c, r, output reg [5:0] primes ); always @ (posedge c) begin if (r) begin primes <= 2; end else begin case (primes) 2 : primes <= 3; 3 : primes <= 5; 5 : primes <= // you add the reset // ... 63 : primes <= 2; default : primes <= {6{1'bx}}; // if a transition is wrong the output will go X. endcase; end end endmodule
You're lucky I wasn't the first one to reply to this post...I would have given you the following code: