Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15548 Discussions

"Create symbol file" changes "character" into "Enumerated", Modelsim does not accept

Honored Contributor II


I made a VDHL component: 

entity ent_ser_tx is generic( parity : character:='E' ); ... It compiles in Quartus and Quartus made a symbol file out of it. 


Quartus changed the "character" datatype to the "enumerated" datatype when it generated the symbol file. 


Why,I do not know? 


Then I use the symbol file to instantiate the component in a BDF. 


The type enumerated is shown in the graphic parameter box in the BDF on top of the ser_tx component. 


In this box it is impossible to change the parameter type back to "character"; "Character" does not exist in the BDF selection box for the parameter types. 


Quartus does compile my project, but Modelsim will not.  


error: string literal found where non-array type std.standard.character was expected. 


Modelsim is right; Replacing "E" by 'E', in the VHDL I generated out of the BDF to make a Modelsim project, solves the issue. 


Question: Should I abandon using "character" parameters in VHDL components that are used in bdf or is there another solution? 


Thanks for a reaction, 

0 Kudos
4 Replies
Honored Contributor II

Use string instead. Character is an enumerated type, like std_logic, bit, Boolean and all base types.

Honored Contributor II

Hello Tricky, 


Thanks for the quick answer. 


"string" was the second work around I used yesterday because changing "E" to 'E' was not efficient.  


My question remains partially on the table: is it possible to use character in the Schematic Editor and if so, how can I do it? 


Can I enumerate these types? Can I import them in one way or another? Is there a basic solution that works? 


(Even if one changes to string in Schematic Editor , you have to change the object internally to string or it will not compile Modelsim & Quartus.) 


Best Regards, 

Honored Contributor II

Yes, you would have to change all references of it to string, or just map the internal character to parity(1) (because strings always start at index 1) 

The schematic editor is pretty hobbled for functionality. The best possible fix is just not to use it, and do everything in HDL. That way you can use whatever type you want. 

Using a character seems a little odd anyway. What are you doing with it?
Honored Contributor II

I am using it to define the parity settings of a small UART I built. 'E' means parity even, 'O' means odd and 'N' means none. 

Noting prevents me from using "E" of course.  

The Uart is part of a Profibus DP library for a S7-PLC I am working on. 

At low baud rates the lib works on an Arduino (prototype). 

For high baud rates I will use an FPGA.