V
VMSK
Guest
I am looking at a verilog code written by someone else . Below is the snippet .
module test( â¦â¦. )
Input TMS,
`define STATE_1 4\'b0100
`define STATE_2 4\'b0101
reg [3:0] NxtState;
wire [3:0] CurState;
always @* begin
case (CurState[3:0])
`STATE_1 : NxtState[3:0] = TMS ? `STATE_1 : `STATE_2 ;
default : NxtState[3:0] = {4{1\'bx}};
endcase
End
endmodule
The is not the full code , I have just taken some parts of it to ask question.
Wanted to understand what is happening in :
`STATE_1 : NxtState[3:0] = TMS ? `STATE_1 : `STATE_2 ;
Thanks,
Supritha
module test( â¦â¦. )
Input TMS,
`define STATE_1 4\'b0100
`define STATE_2 4\'b0101
reg [3:0] NxtState;
wire [3:0] CurState;
always @* begin
case (CurState[3:0])
`STATE_1 : NxtState[3:0] = TMS ? `STATE_1 : `STATE_2 ;
default : NxtState[3:0] = {4{1\'bx}};
endcase
End
endmodule
The is not the full code , I have just taken some parts of it to ask question.
Wanted to understand what is happening in :
`STATE_1 : NxtState[3:0] = TMS ? `STATE_1 : `STATE_2 ;
Thanks,
Supritha