I'm afraid you are wrong;
there is no declaration of
s_port in the piece
of code you have sent in the initial post
Code:
reg [15:0] decoder;
assign s_port = dout[200-1 -:8]
always @(*) begin
decoder = 0;
decoder[s_port] = 1'b1;
end
I assumed the
s_port is:
wire [7:0];
so the 's_port' has a range from '0' to '255';
the line:
decoder[s_port] = 1'b1; means:
if s_port = '0' decoder = '0000000000000001'
if s_port = '1' decoder = '0000000000000010'
...
if s_port = '6' decoder = '0000000001000000'
etc;
------