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

Error(16904) an enum variable may only be assigned to same enum typed variable or one of its values

OlegTerentiev
Beginner
431 Views

Hi, Intel

In attach two project - completely identical, but

one made in Quartus 21.1 Standart and it is synthesized,

second made in Quartus 21.1 PRO - the synthesis is not completed due to an error

we need to work with Cyclone 10 GX using such constructions - how to solve this problem ?

 

Best Regards,

Oleg Terentiev

 

 

0 Kudos
2 Replies
OlegTerentiev
Beginner
389 Views

Good afternoon again, Intel !

In first message i made one mistake - used version Quartus 20.1.1 Standart - last version.

Ok, this is really important to us - we decided to take the aligned versions - Pro, Standard and Lite - release 20.1, Release date: June, 2020

The situation is completely similar - Standard and Lite working well, Pro stopped with error - projects in attachment.

As I wrote above, this is an important problem for us - what solution do you recommend ?

 

Best Regards,

Oleg Terentiev

RichardTanSY_Intel
331 Views

Hi @OlegTerentiev 

 

Sorry for the late reply. After checking, the error is due to quartus_syn switch from MCFU (Multiple File Compilation Unit) to SFCU (Single File Compilation Unit) for SystemVerilog files in Quartus Pro. This causes the enum to be defined twice in two separate compilation units (files) when the .svh header is included in the two separate files.

 

There is two workaround that you can use. 

1. The easier one is to insert line below in the project .qsf file. 

 

set_global_assignment -name VERILOG_CU_MODE MFCU

 

2. You can fix this problem by declaring and importing packages. You can include the svh file once in one of your files and simply import the package in all the other files where you need the enum definition. Attached the modified test case that you provided previously.  

Attached information on Intel Quartus Prime Pro Edition follows the SFCU method:

RichardTanSY_Intel_0-1622307208933.png

Reference: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-qpp-getting-started.p...

Best Regards,
Richard Tan

p/s: If any answer from the community or Intel support are helpful, please feel free to give Kudos. 

 

Reply