- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I'm trying to build SR flip-flop with VHDL. Here is the code: entity first is port(s,r:in bit;q,nq:buffer bit); end first; architecture first_arc of first is begin nq<=not (s or q); q<=not (r or nq); end first_arc; Very simple. However, while inputs change through simulation time range (in vector waveform file), Quartus simulator returns all outputs zeros, with no regard to the inputs. When I set the inputs to constant value through the simulation time, it works properly. I've tried functional simulation as well as time simulation. I've got the same result. What's the reason for such results?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "design" is working correctly for me in Quartus simulator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This code is no safe in fpgas at all.
1) combinatorial feedback not recommended. 2) latches not recommended in rtl 3) buffer is not used except in Uni lectures. 4) if you want register, just use single clked statement.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page