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.
Thank you so much!! I finally fixed the code through another approach, so basically it's a design problem, now this new code is simple and works like a charm:
module part2(SW, KEY, LEDG, LEDR);
input [1:0] KEY, SW;
output [1:0] LEDG;
output [17:0] LEDR;
reg z;
reg [3:0] shifter;
reg...
thanks for reply, so you're suggesting me to use a simulator like Qsim or ModelSim to test it? But the thing is now I've already tested it on board, and it's not working like what I expected, do I still need a simulator?
I have a DE2 board to test it, I use KEy[0] to jump through states, but I cannot jump from state H to state I, it just stops at state H
- - - Updated - - -
I kept changing codes to fix the bug where I'm not able to jump from state H to state I with no avail
I have a DE2 board as a test...
I've been spending a whole day to fix the bug inside my code, I'm not asking people to do my homework(since the homework is 99% done but with a bug), I just need help to fix the bug, a simple explanation why the bug exists is appreciated
Here's the question:
We wish to implement a nite state machine (FSM) that recognizes two specic sequences of applied input
symbols, namely four consecutive 1s or four consecutive 0s. There is an input w and an output z. Whenever
w = 1 or w = 0 for four consecutive clock pulses the value of z...
I just fixed it by swaping the concatenation parts
So
always @ ( posedge clk ) fib_lfsr <= {fib_lfsr[2:0], fib_lfsr[3] ^ fib_lfsr[2]};
Should be
always @ ( posedge clk ) fib_lfsr <= {fib_lfsr[3] ^ fib_lfsr[2], fib_lfsr[0:2]};
Now it's working perfectly
I changed to CLOCK_50 which has 50MHz, but now it doesn't even display the "1" every HEX units are displaying "8" just like it's not working and all the four green lights are on but not flashing
Thanks for suggestions, I'm using a book called "Logic and Computer Design Fundamentals" written by M.Morris Mano and Charles R. Kime, and yeah I'm sort of hobbyist, all those simple small gates were from this book
- - - Updated - - -
wait, it still doesn't work, when you give a seed like...
Thanks for your reply, I'll check this right now, btw I'm not engineering student and I'm totally new to verilog, just started to learn it like two weeks ago
First thanks for clicking in my thread
I implemented my design for a 4-bit Fibonacci LFSR, but when I try to compile it, it says warning:No clocks defined in design, it compiles successfully but when I test it on DE2 board, it doesn't work, so here's my verilog code:
module LFSR4bit (KEY...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.