steven852
Advanced Member level 4
Hi,
I just saw a way to code a 4-state machine like this:
parameter s0= 8'b00000000,
s1= 8'b00010000,
s2= 8'b00100001,
s3= 8'b00110000,
s4= 8'b01000000,
s5= 8'b01010100,
s6= 8'b01100010,
s7= 8'b01110000,
s8= 8'b10000000,
s9= 8'b10010000,
s10=8'b10100000,
s11=8'b10110000,
s12=8'b11001000,
s13=8'b11010000,
s14= 8'b11100000,
s15= 8'b11110000;
This is neither Gray-code nor hamming code state machine. In fact, only the highest 4-bits in the coding are used. Anyone knows why?
I just saw a way to code a 4-state machine like this:
parameter s0= 8'b00000000,
s1= 8'b00010000,
s2= 8'b00100001,
s3= 8'b00110000,
s4= 8'b01000000,
s5= 8'b01010100,
s6= 8'b01100010,
s7= 8'b01110000,
s8= 8'b10000000,
s9= 8'b10010000,
s10=8'b10100000,
s11=8'b10110000,
s12=8'b11001000,
s13=8'b11010000,
s14= 8'b11100000,
s15= 8'b11110000;
This is neither Gray-code nor hamming code state machine. In fact, only the highest 4-bits in the coding are used. Anyone knows why?