Dear all,
I have a newbie question on Verilog. I am using Quartus Prime (Lite Edition) to write some Verilog code for my Arduino MKRVIDOR 4000 (Arduino board with FPGA); my goal is to get communication between the CPU and FPGA working using Florian Zachs's JTAG interface (https://github.com/HerrNamenlos123/JTAG_Interface). I use a standard MKRVIDOR4000_top.v template (containing all the definitions of the I/O signals etc.) that includes user.v that has my own code. The template is attached for reference but the error is in the code below.
What I can't get to synthesize, for reasons I don't understand, is to change behaviour of an input-output mapping between two digital pins shared between the CPU and FPGA based on the contents of a register that can be written to using the JTAG interface. Either the FPGA copies the digital signal it receives on D5 to D6, or it inverts the signal. I want to change this behaviour using a command issued via JTAG.
This is my code:
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
Quartus doesn't accept this code, complaining "12009 Node "spike_out" is missing source". I don't understand why this is the case, although I assume that the conditional assignment to spike_out is to blame, because the circuit synthesizes when I make this unconditional on state_var. I hope someone can enlighten me why this is the case and how the desired behaviour could be achieved.