- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
External Trigger Input Problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-18-2012 03:23 AM
Hello I have a testing sinusoidal wave that goes into an ADC and into the Expansion Connector. Everything is fine, except when i want to have a trigger that only lets the signal get recorded when a Go signal is 1.
This is my code: (din is the data input)
process(clk,state,din)
begin
if Reset = '1' then
Go <= '0';
elsif rising_edge(clk) then
if State = '1' and din > "10000011" then
Go <= '1';
end if;
end if;
end process;
Am I making this too simple? Without the din>"10000011" the code works, of course.
Thank is advance
Re: External Trigger Input Problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-18-2012 04:52 AM
You didn't say exactly what doesn't work. Do you mean that Go never gets asserted?
In your clocked process, only clk should be in the sensitivity list. This won't affect synthesis
but it ensures that synthesis matches simulation.
Have you simulated the design to see if there is an obvious reason why it fails?
How did you define din? Are you sure that it becomes greater than "10000011"? For example
if din was 8 bits signed, then it could not possibly become greater than this unsigned value.
Also the magnitude comparison will depend on the libraries you are using (no offense Bassman, but
this is why I always use Verilog).
I also noticed that once asserted, Go will stay asserted until you re-assert Reset. Is this intentional?
-- Gabor
Re: External Trigger Input Problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-18-2012 05:23 AM











