the guide · 5How do you run CS223 labs on a Mac without Vivado?
How do you use it for your own lab?
The pin file. The course hands out Basys3_Master.xdc with every line commented out. If you do not have it, this puts a copy into the current folder:
curl -fsSL -o Basys3_Master.xdc https://nosey-dewdrop.github.io/dewfpga/templates/Basys3_Master.xdc
Copy it into your lab folder and delete the leading # on the set_property lines for the pins your module uses. Uncommenting all of them is fine too: pins the design does not use are ignored. The port names in your top module must match the names in that file: clk, sw[0], led[0], seg[0], an[0], btnC. If your module says clock, change the name inside [get_ports ...] on that line. The xdc check that runs before place and route lists every port that has no pin and says what to rename.
A design without a clock (assign led = sw;) prints Warning: No clocks found in design and no clocked paths, timing not applicable; that is correct, not a problem. With the whole file uncommented and no clk port, create_clock: target [get_ports clk] matched nothing is the same thing said by nextpnr.
With dewfpga: put the .sv files and the .xdc in one folder, cd into it, dewfpga flash. With lab4.sv and Basys3_Master.xdc in the folder that is all. With several .sv files, name the top: dewfpga flash lab4.
With the Makefile: copy Makefile and check_xdc.py from section 4 into the lab folder and change the first three lines.
TOP := traffic_light
SRCS := traffic_light.sv debounce.sv
XDC := Basys3_Master.xdc
TOP is the top module's name, SRCS every .sv in the design, XDC the pin file.
Either way, simulation looks for a testbench (with the Makefile: <top>_tb.sv); the bitstream does not need one. The course's SevSeg_4digit.sv builds as it is when it is source code (bit supplies one port direction in a temporary compiler copy); the course also hands it out in netlist form, which the CLI refuses for now. Section 7 says what was changed and why.
previous: 4 What is in the project folder?
next: 6 How do you set up VS Code?
This section in the whole guide
The commands this section names: dewfpga flash
Stuck on an error? Every error from this setup, filed under the exact line it printed.