0
\$\begingroup\$

I have a module in verilog called jtag_sw that expects a 4 bit input. It is a mux. A smaller verison of the code is below as an example.

Only 3 signals [0:3] of JTAG_TDIare physicaly assigned to pins (by me). However, when I compile JTAG_TDI[4] is assigned to a random pin by Quartus, which I want to prevent. How could I do this? I think it is related to assigning different widths but I'm really not sure.

module test ( JTAG_TDI, DEB8_TDI);
output [3:0] JTAG_TDI;
input DEB8_TDI;
jtag_sw u7 ( 
 .TDI_in(DEB8_TDI),
 .TDI_out(JTAG_TDI), // 4 bit input 
);
asked Jul 11, 2017 at 16:11
\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

If you want to leave the pin in the top level of the design, but want Quartus to not route it to a physical pin, you can make a "Virtual Pin" assignment in the assignments editor.

Simply open the assignment editor in Quartus, then add a new assignment at the bottom by clicking in the empty row. Select "Virtual Pin" as the type, and the name of the pin in your top level design as the target (e.g. JTAG_TDI[3]). Set the value of the assignment to "On".

Alternatively, simply remove the pin from your design. For example:

output [2:0] JTAG_TDI;
wire [3:0] JTGA_TDI_pad;
assign JTAG_TDI = JTAG_TDI_pad[2:0];
...
 .TDI_out(JTAG_TDI_pad)

Having said that, based on the comments and description, the JTAG_TDI signal is supposed to be an input, in which case you should declare it as such and can simply do:

input [2:0] JTAG_TDI;
...
 .TDI_out({1'b0,JTAG_TDI})
answered Sep 16, 2019 at 17:55
\$\endgroup\$
0
\$\begingroup\$

a) You need a pin assignment file, which is separate from your Verilog. Use Pin planner tasks window, early pin assignment to edit it graphically.

b) The JTAG pins are reserved, you can't use them in your code.

answered Jul 11, 2017 at 16:22
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.