hdl
581 TopicsIntroducing the Altera Community AI Responder — Beta
Altera is introducing the AI Responder, an assistant built into the Altera Community to help provide faster, context-aware guidance for Altera product questions. It uses relevant public Altera documentation and Knowledge Database content, with coverage continuing to expand. The AI Responder may provide source references and can hand off complex or out-of-scope questions to an Altera subject-matter expert. As a beta feature, responses may contain errors or omissions, so please review the sources and verify technical guidance against official Altera documentation before implementation. If the response does not fully address your question, add more context and tag ai_responder to continue the discussion. We welcome your feedback as we improve the Community experience.73Views0likes1CommentQuartus Prime Lite 25.1 - Issue with the Verilog generate loops
Hi! I believe, this is the same issue mentioned here, or at least its sibling. Long story short, here is a snippet from the IEEE Std 1364™-2005 standard, page 185: module addergen1 (co, sum, a, b, ci); parameter SIZE = 4; output [SIZE-1:0] sum; output co; input [SIZE-1:0] a, b; input ci; wire [SIZE :0] c; wire [SIZE-1:0] t [1:3]; genvar i; assign c[0] = ci; // Hierarchical gate instance names are: // xor gates: bit[0].g1 bit[1].g1 bit[2].g1 bit[3].g1 // bit[0].g2 bit[1].g2 bit[2].g2 bit[3].g2 // and gates: bit[0].g3 bit[1].g3 bit[2].g3 bit[3].g3 // bit[0].g4 bit[1].g4 bit[2].g4 bit[3].g4 // or gates: bit[0].g5 bit[1].g5 bit[2].g5 bit[3].g5 // Generated instances are connected with // multidimensional nets t[1][3:0] t[2][3:0] t[3][3:0] // (12 nets total) for(i=0; i<SIZE; i=i+1) begin:bit xor g1 ( t[1][i], a[i], b[i]); xor g2 ( sum[i], t[1][i], c[i]); and g3 ( t[2][i], a[i], b[i]); and g4 ( t[3][i], t[1][i], c[i]); or g5 ( c[i+1], t[2][i], t[3][i]); end assign co = c[SIZE]; endmodule Quartus Prime 25.1std.0 Build 1129 10/21/2025 SC Lite Edition reports the error 10170 when attempting to compile this module: Error (10170): Verilog HDL syntax error at main.v(22) near text: "for"; expecting "endmodule". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (10170): Verilog HDL syntax error at main.v(23) near text: ")"; expecting ";". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (10170): Verilog HDL syntax error at main.v(28) near text: "end"; expecting "endmodule". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (10112): Ignored design unit "addergen1" at main.v(1) due to previous errors It accepts it, though, if to embrace the generating loop into "generate/endgenerate" framing. The Verilog version in the project settings is "Verilog-2001". Changing it to "System Verilog" has no impact on the behavior. ========== For comparison, I fed this exact snippet to the Questa Altera Starter FPGA Edition-64 2025.2 and it had no problems with it. ========== So my question is: "What is the root cause of this misbehaving?". Am I understanding the standard wrong? Ot is it some peculiarity of the Quartus itself? Thanks in advance!Solved428Views0likes2CommentsPossible Quartus 24.1 bug?
Here is the code: interface myif #( parameter int W = 1 )(); typedef struct packed { logic [W-1:0] x; } MYSTRUCT; MYSTRUCT s; modport src ( output s ); modport dst ( input s ); endinterface module top; myif #( .w( 5 ) ) test_if(); test test_module ( .foo( test_if ) ); endmodule module test ( myif.dst foo ); typedef foo.MYSTRUCT MYSTRUCT_COPY; $info( "%0d %0d", $bits( foo.MYSTRUCT ), $bits( MYSTRUCT_COPY ) ); MYSTRUCT_COPY q; assign q = foo.s; endmodule Surprisingly, the info message will print "5 1" instead of "5 5". And for the assign Quartus will complain that it had to crop the 5 bit wide foo.s to match the 1 bit wide q. When processing the typedef, Quartus uses the interface definition's default W value instead of the actual value of the actual interface port. I believe that, according to the standard, that is not the expected behaviour.110Views0likes3CommentsQuartus 26.1 type inheritance bug.
An interface defines a parametrised type. A module instantiates the interface with a certain parameter value. Thet interface is connected to a module port of an instantiated module. That module, in turn, extracts the (already parametrised) type from its module port. It then contains a nested module, which inherits every type definition from the enclosing scope. And it all works, if the enclosing scope explicitly defines the types. But if the type is the one that has been extracted from the module port interface, then the plot thickens. Apparently, the nested module knows the size of the type it inherited, but does not know its structure members. And only if the inherited type was extracted from an interface. Attached is a project archive, containing a demo SV file and the settings. Not much is set (read: nothing but the chip type), as the code does not pass the compilation phase, but anyway. The demo code is really short, just 1 SV file, maybe 50 actual code lines, plus lots of comments.Solved318Views0likes12CommentsTypedef inheritance in nested modules
Sorry for the formatting, but for some reason proper switching between paragraph and preformatted does not work. I have an interface, which contains a structure, which, in turn, contains a parametrised width vector: interface myif #( parameter int W = 1 )(); typedef struct packed { logic one; logic [W-1:0] many; } MYSTRUCT; MYSTRUCT x; modport src ( output x ); modport dst ( input x ); endinterface Now, there is a module which gets this interface. It needs to work with the data defined in the interface, so it needs to extract the structure definition (note that everything here is simplified to absolute bare bones). Easy enough: module my_outer_module ( myif.dst dest ); // Extract the typedef from the port typedef dest.MYSTRUCT MYSTRUCT; ... // other stuff ... // here will be a nested module, described below ... endmodule So far so good, the entity that instantiates my_outer_module also instantiates the interface, with whatever W parameter value it deems necessary and my_outer_module will use the correct MYSTRUCT definition, even though W has not been passed to it . Furthermore, if my_outer_module contains a nested module, as per SystemVerilog rules, it can refer to all types and parameters in the enclosing scope, so it will also be able to use MYSTRUCT without further ado. And, indeed, this works: module my_nested_module ( ... some signals in and out ... ); MYSTRUCT some_variable; ... endmodule However, if the typedef is used in the module port definition, Quartus Pro 24.1 spits the dummy: module my_nested_module ( input MYSTRUCT going_in, output MYSTRUCT coming_out ); assign coming_out = going_in; endmodule Quartus complains about undefined net type for both going_in and coming_out. How come? Help with this particular issue would be appreciated. I know that there are other ways of passing types to modules. There are reasons why I try to solve the problem this particular way and not through packages or macro trickery or anything else. I am looking for an explanation why Quartus reports an error on, I believe, perfectly valid SV source. I know that the simulator is a very different animal, but it accepts the code without a pip, and it works as expected. Thanks in advance. Interesting addendum: using old (non-ANSI) style module declaration makes Quartus happy. Which makes the whole thing more intriguing. This is accepted: module my_nested_module ( going_in, coming_out ); input MYSTRUCT going_in; output MYSTRUCT coming_out; assign coming_out = going_in; endmodule So Quartus clearly understands the concept of using a structure defined in the enclosing scope as the type of a port, but refuses to remember how to do it while processing an ANSI style module header.112Views0likes3CommentsIssue with MIPI CSI2 Encrypted IP File During Project Integration
Hi, I am working on a project where I have integrated two separate projects into a single top-level design. Project A includes the MIPI CSI2 IP and other related components. Project B contains the logic to process the output data generated by the MIPI CSI2 IP. When I compile both projects individually, they complete successfully without any errors. However, after instantiating both projects together in a single top-level wrapper, I encounter a compilation error originating from the generated encrypted file of the MIPI CSI2 IP. I have attached the error snapshot for your reference. Could you please help identify the possible cause of this issue? Is there any known limitation or configuration requirement when integrating the MIPI CSI2 IP with additional logic in the same top-level design? Thanks.159Views0likes4CommentsHow to create a Packaged Subsystem in TCL
I am hoping to create a script which will automatically package the IP I am working on as a packaged subsystem. So far, I have automated the creation of an IP directory which describes a new component using a _hw.tcl file and the various source files. I believe the next step is to take this component, instantiate it in a Platform Designer system, and create a Packaged Subsystem using it. I am also hoping that I can parameterise and hide/modify ports of the packaged subsystem, like I can with the _hw.tcl component description. I am encountering a problem; I am running the following command: qsys-script --script=create_packaged_subsystem.tcl --new-quartus-project=my_project_name However, the script fails for the following reason: Error: invalid command name "set_package_property" Here is the script itself (more or less a copy-and-paste from the GUI): package require -exact qsys 26.1 set_package_property NAME "packagename" set_package_property DISPLAY_NAME "PackageName" set_package_property VERSION "1.0" set_package_property GROUP "GroupName" set_package_property DESCRIPTION "A descripton." set_package_property ELABORATION_CALLBACK elaboration_callback set_package_property EXTRACTION_CALLBACK extraction_callback add_fileset synth_fileset QUARTUS_SYNTH fileset_callback "Quartus Synthesis Fileset" add_fileset sim_verilog_fileset SIM_VERILOG fileset_callback "Simulation Verilog Fileset" proc elaboration_callback {} { enable_all_instances } proc extraction_callback {} { extract_modules } proc fileset_callback { output_name } { generate_all_instances } Any help would be hugely appreciated, on this issue and on my general workflow. Also if it is possible to encrypt packaged subsystems or components using Quartus I'd be keen to know. Thanks!169Views0likes5CommentsFIR IP configured for Interpolation
Why does my Altera FIR IP, configured for interpolation by 80, produce the expected outputs when I provide 3 input samples, but fail to produce the expected behavior when I provide 10 input samples? In this case, the FIR IP keeps tready asserted high, but only generates 4 valid outputs. What could be causing this behavior? I am simulating this in Quartus Prime Lite Edition.484Views0likes11CommentsHow to generate a netlist when the design includes encrypted sources
I would like to ship my design to a customer as an encrypted netlist, however I am unable to create the netlist after a successful run, because my design includes encrypted RTL (unable to change this). I am running the following command (after running synthesis and P&R): quartus_eda my_project --simulation --format=vhdl --tool=modelsim -c my_project_revision I get the following error: Error (18580): Cannot generate netlist output files because the design includes encrypted source files: "/path/to/encrypted/rtl/file.vhdp" I see here that this was planned to be possible in "future" Quartus Prime updates, but I am using 26.1 and no such update has been made. I have also attempted to run the following command, with the exact same result: quartus_eda my_project --resynthesis --tool=modelsim Any help would be appreciated; perhaps this is plainly impossible, or perhaps there is some work-around. Thank you!Solved222Views0likes3Comments