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

Modelsim throws an error, but Quartus happily compiles VHDL code

Altera_Forum
名誉分销商 II
2,590 次查看

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 项奖励
4 回复数
Altera_Forum
名誉分销商 II
1,549 次查看

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

I could check the LRM for you?
0 项奖励
Altera_Forum
名誉分销商 II
1,549 次查看

 

--- 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 项奖励
Altera_Forum
名誉分销商 II
1,549 次查看

Tricky, 

 

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

 

Regards, 

 

Josy
0 项奖励
Altera_Forum
名誉分销商 II
1,549 次查看

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

0 项奖励
回复