- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm attempting to simulate (functional level) a VHDL design using ModelSim that contains altfp_div and an altfp_conv blocks from the altera_mf library. These compile fine in Quartus, but when I try to compile the VHDL in Modelsim it gives me an error because the Modelsim altera_mf library does not contain any altfp blocks except altfp_mult.
Is there any way to add the missing altfp blocks to the Modelsim libary, or is this a limitation of the starter edition of ModelSim-Altera?Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm not seeing the same results as you. i'm using Quartus II 9.1sp2 and the accompanying ModelSim-AE version.
i do confirm that altera_mf only contains an altfp_mult, but the altfp_div.vhd i created with the MegaWizard does compile fine in ModelSim.vcom -reportprogress 300 -work work /home/thepancake/testfp/testfp.vhd
# Model Technology ModelSim ALTERA vcom 6.5b Compiler 2009.10 Oct 1 2009
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Compiling entity testfp_altfp_div_pst_tre
# -- Compiling architecture rtl of testfp_altfp_div_pst_tre
# -- Compiling entity testfp_altfp_div_8ah
# -- Compiling architecture rtl of testfp_altfp_div_8ah
# -- Compiling entity testfp
# -- Compiling architecture rtl of testfp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm instantiating the altfp_div block in VHDL directly without using the megawizard:
LIBRARY altera_mf;
USE altera_mf.altera_mf_components.all;
...
div0: altfp_div
GENERIC MAP
(
WIDTH_EXP => FP_WIDTH_EXP,
WIDTH_MAN => FP_WIDTH_MAN,
ROUNDING => "TO_NEAREST",
REDUCED_FUNCTIONALITY => "YES",
PIPELINE => FP_DIV_PIPELINE,
EXCEPTION_HANDLING => "NO",
OPTIMIZE => FP_DIV_OPTIMIZATION
)
PORT MAP
(
clock => clk,
clk_en => calc_en,
aclr => clr,
dataa => inputs.if,
datab => inputs.rf,
result => rfDivRes
);
...
This works fine in Quartus II 9.1. The component declaration for altfp_div is in the altera_mf_components package file (comes with Quartus). I generally use this style of coding so that I can easily change any of the parameters for the div block from parameters from the parent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see your problem - I only have altfp_mult in the altera_mf library too. Raise a case via mysupport.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i see the same, i guess its an enhancement request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created a mysupport for this and got the following response:
There is no behavioral model for altfp_div in the simulation library, thus you will need to include the MegaWizard instantiation in your source RTL for RTL (functional) simulation. Otherwise, you can try to run a Gate Level simulation to verify your design.- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page