Continue to Site

Welcome to EDAboard.com

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.

Initialization of FIFO using ModelSim Testbench

Status
Not open for further replies.

imbichie

Full Member level 6
Joined
Jul 30, 2010
Messages
381
Helped
55
Reputation
110
Reaction score
54
Trophy points
1,308
Location
Cochin/ Kerala/ India or Bangalore/ Karnataka/ Ind
Activity points
3,580
Hey all,

I am working with an I2C Core, now i meet a problem with initialization of FIFO,

How i initialize the FIFO using the ModelSim Testbench, means without disturbing the

I2C Master Program. i am working with VHDL

Thanks in Advance
 

What is the size of your FIFO?
I will use a for loop for initialization of a block memory.But it will take time since the FIFO write is clock controlled.

Code:
for i in 0 to FIFOsize loop 
  data_in_FIFO <= (others => '0');
  wait for clk_period;
end loop;

Is this what you are looking for?

--vipin
https://vhdlguru.blogspot.com/
 

vipinlal said:
What is the size of your FIFO?
I will use a for loop for initialization of a block memory.But it will take time since the FIFO write is clock controlled.

Code:
for i in 0 to FIFOsize loop 
  data_in_FIFO <= (others => '0');
  wait for clk_period;
end loop;

Is this what you are looking for?

--vipin
https://vhdlguru.blogspot.com/

Why would you want to zero the fifo on every clock?
 

I thought he wanted to initialize all the FIFO values to some CONSTANT value.It can be zero or anything else.Does that matter?
Is there any way to initialize a FIFO?
 

If I understood you right this is what you want to do -
Bring out your FIFO signals as ports in your i2c core instantiation which will allow you to access your FIFO signals in the testbench. Now you can manipulate your FIFO signals in your testbench.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top