- Open a Model Composer design.
- In the MATLAB command Window, modify the path
as per your requirements, similar to the first example, and then enter the following
command:
xilinx.environment.addCompilationTarget('Bitstream', '.')
This provides a template derived class for the users to edit. The last field corresponds to the directory which contains the board.xml file.
- In the MATLAB Command Window, enter the
following command:
xilinx.environment.rehashCompilationTarget
This will ensure that the new compilation target is picked up by the System Generator token
- Close and then re-open the System Generator token.
- You will now see the compilation target Bitstream on the System Generator token as shown below.
- Open the
Bitstream.m
created in the './Bitstream/@Bitstream/Bitstream.m
'. - Download the following two files:
- Inside the function
pre_project_creation()
, add the following lines to do the following:- Set the board as a KC705 board.
- Add a new top-level file (top.v) to use the differential clock ports of KC705.
- Add a new XDC file to give the location constraints for the clock, dip, and led ports.
- Set the newly added module
top
as the top. - Run synthesis.
- Run implementation.
- Generate bitstream.
After you save the files to a location on your computer, you should give the full path to the files in the add_file API as per your path.
add_tcl_command(obj, 'set_property board xilinx.com:kintex7:kc705:1.1 [current_project]'); add_file(obj, '/group/dspusers-xsj/umangp/rel/2013.4/cust_comp_test/bitstream_example.xdc'); add_file(obj, '/group/dspusers-xsj/umangp/rel/2013.4/cust_comp_test/top.v'); obj.top_level_module = 'top'; run_synthesis(obj); run_implementation(obj); generate_bitstream(obj);
- In the MATLAB Command Window, enter the following command:
xilinx.environment.rehashCompilationTarget
This ensures that the new compilation target is picked up by the System Generator token
- Close and then re-open the System Generator token.
- Select the Bitstream compilation target.
- Click the Generate button.
- After the generation is complete, you can find the bit file in the
following
directory:
./<Target_directory>/Bitstream/bitstream_example.runs/impl_1/top.bit