Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sequence Dtector "111" using moore state, Altera Quartus II, verilog HDL

Status
Not open for further replies.

Ferfil

Newbie level 4
Newbie level 4
Joined
Sep 27, 2013
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
57
PLEASE HELP. when i download the code onto the altera de2 board, nothing happens.

module seq(clk, reset, x, y);
input clk, reset, x;
output y;

reg y;
reg [1:0] state;

parameter s0 = 2'b00;
parameter s1 = 2'b01;
parameter s2 = 2'b10;
parameter s3 = 2'b11;

always @(posedge clk)
begin
if (reset == 1)
begin
state <= s0;
y <= 0;
end
else
begin
state <= s0;
case (state)
s0 :
begin
y <= 0;
if (x == 0)
state <= s0;
else
state <= s1;
end
s1:
begin
y <= 0;
if (x == 1)
state <= s2;
else
state <= s0;
end
s2:
begin
y <= 0;
if (x == 1)
state <= s3;
else
state <= s0;
end
s3:
begin
y <= 1;
if (x == 1)
state <= s3;
else
state <= s0;
end
default: state <= s0;
endcase
end
end
endmodule
 
Last edited:

Re: Sequence Dtector "111" using moore state, Altera Quartus II, verilog HDL

Hi,

Can you please give some more details about how are you experimenting your problem on board?

I mean how are you giving input x from board and how are you deciding whether it is working or not? What should happen according to you once you download a code?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top