setenv XACT /usr/applic/XSI setenv PATH ${XACT}/bin/sparc:${PATH}
designer = "NAME" ; company = "UBC EE"; plot_command = "lpr -P PRINTER" ; search_path = { . \ /usr/applic/XSI/synopsys/libraries/syn \ /usr/applic/synopsys/libraries/syn } link_library = { "*" xprim_4003-6.db xprim_4000-6.db xgen_4000.db \ xio_4000a-6.db xfpga_4000-6.db } target_library = { xprim_4003-6.db xprim_4000-6.db xgen_4000.db \ xio_4000a-6.db xfpga_4000-6.db } symbol_library = { xc4000.sdb } synthetic_library = { xblox_4000.sldb } define_design_lib xblox_4000 -path \ /usr/applic/XSI/synopsys/libraries/dw/lib/fpga/xc4000 define_design_lib WORK -path ./WORK compile_fix_multiple_port_nets = true bus_naming_style = "%s<%d>" bus_dimension_separator_style = "><" bus_inference_style = "%s<%d>" xnfout_library_version = "2.0.0"
cp ~elec464/fpga/.synopsys_dc.setup .
fpga_shellThen to read your VHDL file and check for errors (assuming it's called asg3.vhd) use the command:
read -f vhdl asg3.vhdIf your design has syntax errors, edit the source file to correct the errors and use the read command again. You will need to add "pads" (I/O buffer circuits) to the ports in your design. To do this use the commands:
set_port_is_pad "*" insert_padsTo compile your VHDL description into an optimized hardware description use the command:
compileIf you want to see what fraction of the FPGA's resources your design uses and the estimated propagation delay from the inputs to the outputs you can use the commands:
report_fpga report_timingThe circuit will have been synthesized using CLBs. Unfortunately, the Xilinx place-and-route software can only accept a gate-level circuit description. To convert the CLB-level design to a gate-level netlist use the command:
replace_fpgaTo plot a schematic (before and/or after the replace_fpga command) use the commands:
create_schematic plotYou can now write out the gate-level circuit in XNF (Xilinx netlist format) using the commands:
write -format xnf -hierarchy -output asg3.sxnfNote that the output file name has an .sxnf (not .xnf) extension.
Now you can exit fpga_shell and run the Xilinx place-and-route tools. This requires various steps which are executed under the control of the "xmake" program:
xmake -P 4003APC84-6 asg3The -P option specifies the device into which the design will be loaded. In this case it's a 6-ns grade XC4003A packaged in an 84-pin PLCC.
The programs run by xmake will create lots of small files and reports in your directory. The final result is the "asg3.bit" file that contains the configuration information that must be loaded into the FPGA at power-up to configure it.
switch SW1 SW2 1 X X 2 X off 3 X off 4 X on 5 X on 6 X on 7 off X 8 off offwhere X is "don't care." Use the following command to download the configuration file to the FPGA (assuming the file name is asg3.bit):
xchecker asg3.bitThe xchecker program will first check to make sure the demo board is hooked up. Then it will print a prompt and wait for you to press Enter. It will then attempt to download the configuration (.bit) file.