Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
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.
17268 Discussions

Modelsim throws an error, but Quartus happily compiles VHDL code

Altera_Forum
Honored Contributor II
2,584 Views

I have a VHDL module containing statements like: 

control_ccassigns_6_D <= unsigned(WD)((WIDTH + START) - 1 downto START);  

Modelsim flags these as: 

Vcom: Prefix of slice name cannot be type conversion (UNSIGNED) expression. 

But if Quartus II complies this without a blink ... 

I know how to change the code to get rid of the error. My question is: is Modelsim right or wrong? 

 

Regards, 

 

Josy
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,543 Views

Modelsim is usually correct in these things. Quartus (and Xilinx) tend to just work without complaint. 

I could check the LRM for you?
0 Kudos
Altera_Forum
Honored Contributor II
1,543 Views

 

--- Quote Start ---  

I could check the LRM for you? 

--- Quote End ---  

 

 

That's the spirit. I skimmed through the LRM, but that's not my kind of literature :) 

If it truly is an error, it is kind of funny that when we replace the unsigned cast by a function doing the exact same thing, Modelsim thinks it's fine.  

function slv2u( v : std_logic_vector) return unsigned is return unsigned(v) ; end function; control_ccassigns_6_D <= slv2u(WD)((WIDTH + START) - 1 downto START); doest the trick. 

 

Regards, 

 

Josy
0 Kudos
Altera_Forum
Honored Contributor II
1,543 Views

Tricky, 

 

did you find a moment to check the LRM about this? 

 

Regards, 

 

Josy
0 Kudos
Altera_Forum
Honored Contributor II
1,543 Views

Sorry - no. Ill have a look tomorrow if I remember (its on my work laptop).

0 Kudos
Reply