M
Miller2000
Guest
I try to implement state machine without clock.
Theâ âinputsâ
ââ(âlatchâ8ââ,âlatchâ8âtagâ,âlatchâ1ââ6ââ)ââ
âareâ âchangingâ âtheâ âstateâ â
withoutâ âclockâ.â
I still get error:
ERROR:Xst:2089 - "sm1.v" line 48:
This sensitivity list construct will match none of the supported FF or
Latch templates.
Please Help!
miller2000
==================The code:
==================
module sm1(in8, latch8, latch8tag, latch16, reset, out16);
input [7:0] in8;
input latch8;
input latch8tag;
input latch16;
input reset;
output [15:0] out16;
wire [7:0] in8;
wire reset;
wire latch8;
wire latch8tag;
wire latch16;
reg [15:0] out16;
reg [7:0] ff1;
reg [7:0] ff2;
wire temp1;
wire temp2;
reg [1:0] state;
parameter zero=0, one=1, two=2;
assign temp1 = latch8 ^ latch8tag;
assign temp2 = ~(latch8 ^ latch8tag);
always @(negedge temp1 or negedge temp2 or
posedge latch16 or posedge reset)
begin
if(reset)
begin
out16<=0;
ff1<=0;
ff2<=0;
state<= zero;
end
else
if(state==zero)
begin
ff1<=in8;
state<= one;
end
else
if(state==one)
begin
ff2<=in8;
state<= two;
end
else
if(state==two)
begin
out16<={ff1,ff2};
state<= zero;
end
end
endmodule
Theâ âinputsâ
ââ(âlatchâ8ââ,âlatchâ8âtagâ,âlatchâ1ââ6ââ)ââ
âareâ âchangingâ âtheâ âstateâ â
withoutâ âclockâ.â
I still get error:
ERROR:Xst:2089 - "sm1.v" line 48:
This sensitivity list construct will match none of the supported FF or
Latch templates.
Please Help!
miller2000
==================The code:
==================
module sm1(in8, latch8, latch8tag, latch16, reset, out16);
input [7:0] in8;
input latch8;
input latch8tag;
input latch16;
input reset;
output [15:0] out16;
wire [7:0] in8;
wire reset;
wire latch8;
wire latch8tag;
wire latch16;
reg [15:0] out16;
reg [7:0] ff1;
reg [7:0] ff2;
wire temp1;
wire temp2;
reg [1:0] state;
parameter zero=0, one=1, two=2;
assign temp1 = latch8 ^ latch8tag;
assign temp2 = ~(latch8 ^ latch8tag);
always @(negedge temp1 or negedge temp2 or
posedge latch16 or posedge reset)
begin
if(reset)
begin
out16<=0;
ff1<=0;
ff2<=0;
state<= zero;
end
else
if(state==zero)
begin
ff1<=in8;
state<= one;
end
else
if(state==one)
begin
ff2<=in8;
state<= two;
end
else
if(state==two)
begin
out16<={ff1,ff2};
state<= zero;
end
end
endmodule