Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

MAX 7000 Help

Altera_Forum
Honored Contributor II
1,372 Views

Hello, 

 

I am using the EPM7128S and all I am trying to do is make the pins high (5v) or low (0V), but I'm not having any luck. This is my first time using this chip. For example here is the code I am running to try to set pin 10 low: 

 

module testing_123 output PIN_10; wire ctrl0; assign ctrl0 = PIN_10; ctrl0 <= 1'b0; endmodule 

 

I am receiving an error which reads error (10170): verilog hdl syntax error at getest.v(6) near text "output"; expecting ";", or "(". Can anyone steer me in the right direction? 

 

Thank you, 

 

Carl
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
339 Views

Your Verilog syntax is wrong. And I guess you're misunderstanding how pin assignment is done. 

 

what you want is something like 

module testing_123( output wire ctrl0 ); assign ctrl0 = 1'b0; endmodule  

 

Then you synthesize the design. It should work, and you should get some warnings about assigned pins. 

You don't assign actual pins in the Verilog code though. 

 

Then you go to the Pin Assignment Editor and you assign I/O signals of your top level entity to FPGA pins. 

In this case, I guess you want to assign "ctrl0" to "PIN_10".
0 Kudos
Altera_Forum
Honored Contributor II
339 Views

Thank you. That worked perfectly. So I will only compile when I am done? The reason I ask is I have a sample .jam file that I was able to load on to the chip. I figured the compile would convert the Verilog to the .jam file. Or is this done with a different process?

0 Kudos
Altera_Forum
Honored Contributor II
339 Views

You can compile as you go. In fact, I strongly recommend it. :) 

My preferred flow is to start by writing a top level module which has nothing but the I/O signals declaration. 

Then I compile it, perform pin assignment and compile it again to check my pin assignment does not violate any rules.  

The first compilation is not strictly necessary, it just so that Quartus will import the I/O signal list into the pin assignment editor. Otherwise, you have to type them in manually. 

Then I start adding the rest of the logic. 

 

If you go to "Assignments -> Device -> Device and Pin Options -> Programming Files", you can select which type of programming files you want the tool to generate when it's finished compiling. 

Quartus defaults to only generating a .sof and .pof, but you can have it generate the .jam as well. 

You can also use the "File -> Convert programming files" tool.
0 Kudos
Altera_Forum
Honored Contributor II
339 Views

Thank you rbugalho you have been very helpful. I got all my pin assignment done and it compiles! I am working on the control statements and I must be having syntax problems again. I tried using the same syntax as the tutorial in the help menu, but it didn't work. Here is my "if" statement: 

 

Any thoughts? (it wouldn't let me submit a reply with the code for some reason so I attached it in a txt file)
0 Kudos
Altera_Forum
Honored Contributor II
339 Views

What is the error the compiler complains about?

0 Kudos
Reply