[moved] Error debugging in vhdl

Status
Not open for further replies.

Ponmalar21

Newbie level 4
Joined
Dec 18, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
29
Debug the error in the following verilog code:


Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module ring_count(q,clk,clr); 
  input clk,clr; 
  output [3:0]q; 
  reg [3:0]q; 
  always @(posedge clk) 
      if(clr==1) 
            q<=4′b1000; 
        else 
            begin 
                q[3]<=q[0]; 
                q[2]<=q[3]; 
                q[1]<=q[2]; 
                q[0]<=q[1]; 
            end 
endmodule

 
Last edited by a moderator:

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