<< Chapter < Page Chapter >> Page >
Generate Assembler Code for Pulse Width Controller

Write an assembler source code (shown in detail step 3, below) and save it as Lab9.psm . Assemble the source code using perl command listed in detailed step 5. Open lab9.mdl model from c:/xup/workshops/dsp_flow/labs/lab9 and assign fill_lab9_program_store to the ROM table.

  • Open the MATLAB command window by double-clicking the MATLAB icon on your desktop, or go to Start Menu ->Programs ->MATLAB 6.5 ->MATLAB 6.5
  • Change directory to c:/xup/workshops/dsp_flow/labs/lab9/ : Type cd c:/xup/workshops/dsp_flow/labs/lab9/ in the command window.
  • Download the the code for Lab9.psm here.
  • Save the file as Lab9.psm in c:/xup/workshops/dsp_flow/labs/lab9
  • Type the following command in MATLAB command window: perl('xlpbsmble.pl','-p','Lab9.psm')
    This command will assemble several files and create sub-directories.

    What directories and files are produced as the result of running the perl command?

    • fill_lab9_program_store – an M-file
    • lab9_psm_results – folder which contains several files
    • assembler – results file
    • CONSTANT -
    • LAB9 – coe file
    • LAB9 – text file
    • LAB9.vhd – vhdl model file
    • LAB9.DEC – DEC file
    • LAB9.FMT – FMT file
    • LAB9.HEX – HEX file
    • lab9.psm – source file
    • LABELS – text file
    • Several PASS files
    • ROM_form – coe file
    • ROM_form – vhdl model file
    • Wrapkcpsm2.bat – batch file

  • Open Lab9.mdl file. It will look as shown below in Figure 19-1.

    Figure 19-1: picoblaze based design

  • Double-click the ROM block and change the Initial Value Vector as to use the fill_lab9_program_store

Figure 19-2: assigning program file to the rom

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Xilinx university program: professor workshop. OpenStax CNX. Jun 24, 2004 Download for free at http://cnx.org/content/col10233/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Xilinx university program: professor workshop' conversation and receive update notifications?

Ask