Search Engine

109 Threads found on Clock Testbench
You don't show your testbench. What's the relationship between readReq and the clock? Is it synchronous? If readReq is coincident with the clock edge, what do think will happen?
I think you are seeing clock and data switching at the same time, causing hold violations Yeah, you have nothing in the testbench that would emulate the delays that occur on the ASIC inputs/outputs to match what was used for constraining the design. So I can easily believe you would have problems simulating the
Shift before? The statement is of course delaying the input data by a half clock cycle, related to a sampling clock working on rising_edge.
How about using a counter with a 10 Hz clock (1 ms period) or use whatever system clock you have, e.g. 100 MHz clock and create a counter that counts from 0-9,999,999-0 and increment a second counter when you reach 9,999,999 (or at 0,000,001 for a starting increment). Instead of giving the simulator lots of work to do
I see at least two problems, each of it might cause failure in gate level simulation. - zero duration of reset pulse - 500 MHz clock is probably too fast for the simulated hardware
Write a very simple C code that will write data to the DDR3 module (assuming that it is connected via an AXI interface). You will need SDK and eventually there will be an ELF file generated for the uBlaze. You need to associate this ELF with the uBlaze. For the test-bench you just need to provide clock and reset signals to the top-module. The abov
LIBRARY IEEE; USE ieee.std_logic_1164.all; --USE ieee.std_logic_arith.all; USE ieee.numeric_std.all; library ieee_proposed; use ieee_proposed.fixed_pkg.all; ENTITY dwt IS PORT ( clk : IN STD_LOGIC; vid_in: IN STD_LOGIC_VECTOR(7 DOWNTO 0); -- Pixels from main memory hor_sync: IN STD_LOGIC;
Add initial values of '0' to your clock and enable signal in your testbench.
I am trying to write a code in vhdl with a given time period of clock in testbench .When i execute it i get proper output , but if i modify the code slightly i.e including more functions (more operations) then although am not changing anything in the test bench , but still i the clock in the test bench waveform appears to have g
Hi, I have a vector and a matrix of hexadecimal values stored in .mem files. I need to subtract this vector from each row of a matrix in each clock cycle. I have read my files to my testbench file using $readmemh in verilog. How can I subtract them now? I have used xilinx ip floating ip core for subtraction as well. Here is my code but this c
Why my clock is not toggling in the driver class ? thanks in advance // Code your testbench here // or browse Example parameter data_width =8; parameter addr_width =32; parameter seq =2'b00; parameter non_seq =2'b01; parameter hsize =4; interface ahb_inter(); bit hclk=0; bit hreset; bit htrans; modpor
Dear all, I'm trying to excercise with some systemverilog example on of swith example. But I'm confused in here. output_interface output_intf(clock); testcase TC(mem_intf, input_intf, output_intf); program testcase (..., output_interface.OP output_intf); Versus output_interf
What exactly is the problem? have you got a testbench to simulate the code? One point : the enable signal should be inside the clock. Your current code could be implemented as a gated clock enable, which is not a good idea in FPGA.
Just wondering if using always @(posedge clk) and nonblocking assignment for stimuli is at risk of any racing? dut sensitive on the same clock edge, tb:always block is the same as any part of synchronous design. An example from Doulos shows using clock block with specified skew.
if you use d1 and d2 as variables instead of signals it will instead of signals, it will be on the same clock cycle.
Hi there, I'm trying to get DDR3 interfacing to work on an Artix-7 evaluation board for my school project. The Artix-7 evaluation board has a SODIMMs (MT8JTF12864HZ-1G6) of 1GB with a data width of 64 bits. It runs at a clock rate of 400 MHz, with 200 MHz PLL input clock, and a 100 MHz output clock which I used with my interface (...)
100 ps clock period? I'd like to know how the OP expects this design to run at 10GHz in an FPGA.
You dont generate the clock in your testbench
Hi. As I know, the clock skew is that clock signal arrives at different flip-flop at different time. Also When I synthesis, I use ideal clock not real clock to synthesis. The when do I use real clock to synthesis? Is this same thing clock skew and clock uncertainty?. (...)
I don't get why you generate your clocks with this code. It's a lot simpler to use a clock module that generates the clock. Then it represents a clock oscillator on a board (the testbench). I use a generic clock generator module that accepts parameters for either period/frequency, (...)
With any synchronous design, you will get at least 1 clock of latency. THis looks like your waveform (and the fact the ROM is clocked). This is normal. An asynchronous ROM (ie. zero latency) is not really a good thing to have in an FPGA.
Sounds like a "My first testbench - part 2" problem, because every testbench for sequential logic involves clock generation, and incrementing an integer or real signal together with clock generation would be the next step.
I suppose you can. I don't know what your concept of testbench is. testbench is kind of a wrapper around the RTL DUT. It is basically used for testing the DUT. The tasks it usually does are provide the clock,reset to the DUT, initialize the DUT, provide the triggers to the DUT and sample the outputs. I don't know how is a (...)
Hi friends I have the Test Enable signal(TE) 111680 which should be write in VHDL, clkperiod : integer := 4; -- system clock period signal clk : std_logic := '0'; signal te : std_logic := '0'; constant ct : integer := clkperiod/2; clk is already written Can I k
ISE is a synthesis tool and ignores any simulation timing statements. To generate timing in hardware, you need an input clock and sequential statements referring to it.
Hello, Remove the ";" from "@(posedge clk)" on lines 2 and 4. Once you put them, you are basically doing nothing when posedge clock is detected. No, that isn't a problem. I'm not sure what the OP's problem is but the code posted works fine, as long as you generate a clock. module test2; reg clk,
hi, for an example if we need to generate the clock in verilog testbench, we toggle the clock by initializing its initial value in the initial block initial begin clock = 1'b0; resetn = 1'b0; #100 resetn = 1'b1; end always #10 clock = ~clock; if we are not initialize the (...)
used this rising of falling edge of your signal as clock to increment your counter. - - - Updated - - - in verilog you could used variable $now to know when you could enable your counter.
you need a forever loop in a separate initial block to generate a clock, otherwise the only crc32_q value that you will generate is the reset value. Regards
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; use IEEE.std_logic_unsigned.all; entity corr is port(clock:in bit; reset: in bit; csum : out integer); end corr; architecture corr_beh of corr is signal dcount, intsum : integer := 0; signal lfsr_reg1: unsigned(9 downto 0):= (others=>'1'); signal lfsr_reg2 : unsigned
Why are you generating a clock? Cin is not a clock according to ksa.vhd Why have you created an array of std_logic? why not use std_logic_vector? (you're going to make your life difficult) As signals in the design only change when the input changes, you need to provide enough inputs to allow the output to ripple all the way through G and P.
Hello there, I programmed a code to divide my FPGA clock to my required frequency and then invert into two square wave, however I keep getting an error with the testbench stating "the module pulsegentb(file name) is instantiating itself". And also with the file reports stating "the instantiation depth of 51. This
One big problem is that your testbench doesnt seem to generate a clock, which is fundamental to the whole design. I dont really understand what you're asking for. This testbench seems fine (when you add a clock) for generating signals for input and verifying the design by looking at the waveform.
I am trying to convert this vhdl testbench code to verilog testbench, kindly help me to convert this part of code slave_clkedge <= '1' when SLAVE_CPHA = SLAVE_CPOL else '0'; -- Define a 3-bit counter to count SCK edges and data into register so that parallel -- register is loaded. Use same clock edge tha
You're misinterpreting the waveform. The rising edge of the ENA isn't seen by the CLK as it's transition is 1 ns after the clock edge. Once ENA has gone high the next rising edge of CLK increments/decrements the count. If you change lines like this wait on Clk until Clk = '1'; to wait on Clk until Clk = '0';
use same clock you are using for the sm. i.e synchronous.
thank you for your comments, this is very helpful. about the process and asynchronous rst_n, my professor did mention that in hes comments. ill keep that in mind. the falling_edge is a mistake, i tried to change my testbench clock to be falling edge and accidentally changed all my clocks. now i know that i shouldn't put conditions with (...)
The input is transferred to ouput on the rising edge of clk. It is not shifted. The problem is either in the testbench or a lack of understanding synchronous logic. Depending on the design purpose, you might want to code a pure combinational process without a clock.
and where is the testbench code? Secondly, whats with the second bit of the code? if (clk <= '1' and a = 000000) then etc.. you cannot check if the clk is less than or equal to one. You SHOULD NOT be using the clock in logic, other than checking for rising edge.
you done positional mapping wrong.. do this counter i_counter(clock,reset,preload,lnc,count);
Hi, I saw your replies in the forum and felt encouraged to post this question. Thanks for providing your expertise. I have a VHDL test bench that is associated with both implementation and simulation (as I would like to run P&R simulation). I just want to define my clock with a certain time period. Say clock = '1', wait for (...)
The modules probably have a 1 clock cycle delay, as is normal. If you cannot modify the pipeline delay, then register the other signals in parralell
1. Yes 2. Its a lot easier to do these checks inside your HDL testbench. For VHDL, the quickest and dirtiest way to stop a testbench is: assert (not end_of_sim) report "Simulation finished!" severity failure; Although the cleanest way is to stop all stimulus - ie. halt input processes and turn the clock off. 3. You cant really do that, (...)
A testbench should generate all of the inputs to stimulate the design, so in the case here, all you need to generate are clk and clr. In a testbench, you can use all the stuff that everyone tells you is unsynthesisable. For example: to generate a 50MHZ clock and clr: signal clk : std_logic := '1'; signal clr : std_logic; .... c
Then in your testbench you need to create a clock and reset.
first question - what language? The way to stop a simulation is to halt all stimumus (usually that means stopping the clock) or kill it via an assert failure.
What is the clock rate?
Im not sure what the problem is. When the reset is de-asserted, cnt will be at "000" until you get a rising edge of the clock, but data_tmp will be "001". In your testbench, have you aligned the clock and reset in some way? maybe you want to separate them by half a clock?
What are you writting at 4th clock pulse, and what are you reading at 5th clock pulse.
You didn't explain why you think to need a signal z and how it's generated. Your example suggests that the count value is changing every clock cycle.