KPSM3 program for Atlys development board FPGA Design Flow LAB3

I recently used the Atlys development board and simply passed the program on the board. Because the example used PicoBlaze, and I haven't touched PicoBlaze before, so I was afraid of it at first. After painting for a few minutes, I read the PicoBlaze user manual and the kcpsm3 guide, and found that it was not that difficult; and PicoBlaze is really very simple. Because there are things in the routine that are not mentioned, it may not be smooth for beginners, so I will fill in the missing parts here and hope to be useful to the latecomers.
First modify the program.psm file, you can open it with Notepad or WordPad. It is a function template property, the basics are clear at a glance:
;========================================================== ================ Port address definiTIons...;============================ ==============================================
CONSTANT switch_in , 00 ; Switch read portCONSTANT leds_out , 01 ; LED write portCONSTANT uart_data_rx , 02 ; UART receive read portCONSTANT uart_data_tx , 03 ; UART transmit write portCONSTANT data_present , 04 ; UART stat read port, lsbCONSTANT buffer_full , 05 ; UART stat read port, Lsb
;========================================================== =============== Useful Constant declaraTIons...;============================ ==============================================
CONSTANT all_clear , 00 ; define zero
CONSTANT ascii_NUL , 00 ; ascii code (null character)
Here to achieve a simple function, the state of the switch is read into a register of PicoBlaze, and then the contents of the register are written to the LED port to control the state of the LED; this is a loopback test program.
With PicoBlaze, you only need two lines of code!
In the initial opening of the program.psm task is modified:
Loop: LOAD s0, all_clear; zero out reg s0 (nop) INPUT S0 , 00 ; Switch read port OUTPUT S0 , 01 ; LED write port ; LAB TASK #1 ; Write code to read the switch state and ; then write it to the LED control port.
In the port definition, 00 is the address corresponding to the switch (dial switch) port, s0 is the no wait register, the semicolon is used to comment INPUT S0, 00; Switch read port reads the state corresponding to the switch switch into the s0 register
OUTPUT S0 , 01 ; LED write port Write the status of s0 to the LED control port and enable the kpsm3 compiler to compile. The beginning of the windows system - run, enter cmd and then press Enter, switch to the corresponding directory of assemble, as shown:
[[wysiwyg_imageupload:187:]]
Then press Enter to generate the program.v file; then add it to the ISE project. It should be noted here that kcpsm3 is a dos program that can only run on 32-bit programs. In my 64-bit win7, although ISE can be natively supported, the kcpsm3 program cannot run on 64-bit. Fortunately, I still have a virtual PC.

Lithium Iron Phosphate Battery Pack For Electric Engineering Vehicle

DADNCELL lithium iron phosphate battery pack adopts BMS module, which is durable, reliable, and uniquely innovative. Parallel modular design can support multiple batteries to be used in parallel, flexible configuration, easy to use and maintain, and have the same use as lead-acid batteries It can be used interchangeably with lead-acid battery packs of the same voltage. It has been widely used in electric vehicles such as scenic sightseeing vehicles, golf carts, electric scooters, electric sweepers, police patrol vehicles, electric motorcycles, AGV self-guided vehicles, smart logistics vehicles, and electric ships.

Lithium Iron Phosphate Battery For Electric Engineering Vehicle,72V520Ah Wholesales For Cars,Li Battery For Electric Bicycle,Deep Cycle Replace Battery For Car

Shandong Huachuang Times Optoelectronics Technology Co., Ltd. , https://www.dadncell.com