Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

SCFIFO megafunction not working!!

Altera_Forum
Honored Contributor II
1,966 Views

I have created a project by loading SCFIFO megafunction generated vhdl file. When I am simulating in MODELSIM, OUTPUT DATA is not coming even when the Read pulse is enabled. Someone kindly help.

0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
1,190 Views

Check for any warning messages on the ModelSim console (transcript). 

Did you add the 'altera_mf' library to your ModelSim simulation?
0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

Yeah I have added the library. I am simulating .vhd file which is generated after megafunction configuration. Problem is during simulation WRITE operation is working fine for every clock. But read operation is not working when RD signal is enabled. Kindly post if you have a working SCFIFO code. I ll try to simulate that and check mine. By the way code is uploaded. If possible can you verify it.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

I posted simulation files in this thread a while ago: 

 

http://www.alteraforum.com/forum/showthread.php?t=38988 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

I bet the SCFIFO is working just fine. Its your app code thats not working. 

Instead of blaming the SCFIFO thats used in 1000s of projects worldwide without a problem, why not post your interface code and maybe we can help with that.
0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

i have linked it in my first message.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

can you attach the file again.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

Thats not your logic - thats the SCFIFO generated from the megawizard.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

Can't I simulate the same which is generated.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

With the configuration of the FIFO you chose it will take one clock cycle after a 'rdreq' pulse for the data to show up on the output. Does your simulation code account for this? 

Can you post your testbench code so that we can see what you are doing with the FIFO?
0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

Here I have attached. Its not a testbench code.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

This isnt your logic. This is just a wrapper. it does nothing.

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

How can you run a ModelSim simulation without a testbench that generates some input for the FIFO?

0 Kudos
Altera_Forum
Honored Contributor II
1,190 Views

thank you guys..i could figure out!! :)

0 Kudos
Reply