Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Pulse counter verification in vhdl

 
Thread Tools Search this Thread
Old 06-16-2009, 03:52 PM   #1
Default Pulse counter verification in vhdl


Hi all,

I am presently working on verification and validation of pulse counter
(where i am having such 8 counters)
When i wrote a testbench in VHDL and checking the results in Modelsim
i am not getting desired results.
Here are the steps for vhdl code for simulation.

1.setting the por_n = 0 for 100 ns and release to por_n =1 (power on
reset)
2. Setting up bit 20 of inhibit_1 register to which enables the
functionality of Pulse_counter_0_results register/counter
3. checking the all registers before setting up the values: READ
operation for ZERO values
4. wait for 10 ns
5.Set up register for software defined period for first two bits
6.set up same register for Time base 100 ns on other two bits
6.Load the count value to 10 in a register
7.set the register for start measurement
8. wait for 1000 ns

9. Read the pulse_counter_0_results register after waiting above time
10. As well read the loadable count register after this waiting time
(where i am giving a continues pulse_din signal as a clock of 40 ns,
so i need to get total pulse count in results register as : 1000 ns/40
ns = 25 = 19(Hex)
11 after waiting for 100 ns time also i should get same desired values
which leads holding correct values in correspond results registers.
12. Stop measurement

But i am not getting that desired value instead i am getting only 14
counts.

The whole simulation also depends on two clocks : fpga_clk = 50 MHz,
and dsp_clk = 100 MHz,....

So if anyone give me some exposure on this simulation desired
results ....it will be very helpful.

Sreenivas

MITC - Bangalore


JSreeniv
  Reply With Quote
Old 06-16-2009, 04:27 PM   #2
Shannon
 
Posts: n/a
Default Re: Pulse counter verification in vhdl
On Jun 16, 7:52*am, JSreeniv <sreenivas.jyo...@gmail.com> wrote:
> Hi all,
>
> I am presently working on verification and validation of pulse counter
> (where i am having such 8 counters)
> When i wrote a testbench in VHDL and checking the results in Modelsim
> i am not getting desired results.
> Here are the steps for vhdl code for simulation.
>
> 1.setting the por_n = 0 for 100 ns and release to por_n =1 (power on
> reset)
> 2. Setting up bit 20 of inhibit_1 register to which enables the
> functionality of Pulse_counter_0_results register/counter
> 3. checking the all registers before setting up the values: READ
> operation for ZERO values
> 4. wait for 10 ns
> 5.Set up register for software defined period for first two bits
> 6.set up same register for Time base 100 ns on other two bits
> 6.Load the count value to 10 in a register
> 7.set the register for start measurement
> 8. wait for 1000 ns
>
> 9. Read the pulse_counter_0_results register after waiting above time
> 10. As well read the loadable count register after this waiting time
> (where i am giving a continues pulse_din signal as a clock of 40 ns,
> so i need to get total pulse count in results register as : 1000 ns/40
> ns = 25 = 19(Hex)
> 11 after waiting for 100 ns time also i should get same desired values
> which leads holding correct values in correspond results registers.
> 12. Stop measurement
>
> But i am not getting that desired value instead i am getting only 14
> counts.
>
> The whole simulation also depends on two clocks : fpga_clk = 50 MHz,
> and dsp_clk = 100 MHz,....
>
> So if anyone give me some exposure on this simulation desired
> results ....it will be very helpful.
>
> Sreenivas
>
> MITC - Bangalore


My guess would be a thrown Johnson Rod or bad timing on the Spitzer
Valve.

But seriously, I think I can speak for the group. There is little
chance we are going to be able to help with out some indication the
problem code or something. We can't possibly guess at where the
missing semicolon is otherwise.

Shannon


Shannon
  Reply With Quote
Old 06-17-2009, 03:02 PM   #3
JimLewis
 
Posts: n/a
Default Re: Pulse counter verification in vhdl
Sreenivas,
Add all signals to simulation waveform window.
Run simulation. Watch what did happen.
Start watching from the beginning. What went
right. What did not go right.
Postulate as to why. Add more signals if necessary
to prove your postulation.

Your counter may start running with an old value and not
load the new value until it rolls over. This would cause
a difference in startup than you may expect, but it may produce
correct steady state system behavior if it is tolerable
at the beginning to act this way. Often it is tolerable
because the software does not get to your programmable
counters right away anyway.

I usually make my programmable counters to have two
features. 1: Write counter, but do not reload until
roll over. 2: Write counter and reload immediately.
That way I have both possible features covered.

Best,
Jim



JimLewis
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Counter Strikes... aihockey44 Gaming 0 04-29-2009 08:35 PM
VHDL problem - Signal counter cannot be synthesized, bad synchronous description. shipacpoloy Software 0 08-14-2007 07:26 AM
Pink Floyd: Pulse Phisherman DVD Video 2 08-05-2006 07:49 AM
DVD verification software? Som DVD Video 1 05-29-2005 04:24 PM
Resetting The Counter. Patrick D. Rockwell DVD Video 3 07-09-2004 10:32 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46