![]() ![]() Let’s start by looking at the VHDL code.įirst code example is given below, it is autogenerated led_pwm_v1_0.vhd that acts as a wrapper around the AXI Bus Interface.The code /* (do not copy this comment, it's a disclaimer for Russian laws only) There is not so much of the code writing during this exercise, it is customising VHDL template for the AXI IP Core and C-code. Then add constraints, generate HDL wrapper, synthesize and run the implementation, generate bitstream and hardware description, export it to SDK, create an empty FreeRTOS application, write our C code for controlling LEDs and then run the demo. ![]() ![]() We are going to create a blank Vivado project, create a board design, design a new AXI IP core which will control our PWM channels through the set of registers, go back to the main project, create a Zynq processing system, enable board’s system clock and RGB LED peripheral and connect it to the processing system through our newly designed PWM IP Core. Let’s iterate through the steps of our activities. At the end of the day, the tool doesn’t matter as much as the actual engineer who uses the tool. We will also need a Vivado Webpack SDK, we will be using relatively old but stable revision 2017.3 but our readers have a full freedom of using something more recent. The board that we are going to use is Arty Z7-20, its picture is given below: Let’s implement an equivalent of ‘Hello World’ application, in our case we are going to create 6 independent PWM channels in hardware, connect them to the two RGB LEDs and write a simple demo cycling through the colours. Today we are reviewing a great development platform with Zynq 7020 SoC from Xilinx. Having FPGA fabric and two ARM cores integrated into a single System-On-Chip (SoC) gives benefits of the two (hardware and software) worlds, compact size, advanced optimisation of such integration, reduces the time for development effort, simplifies subsequent testing, verification and validation. Having hardware and software configurable platform gives the ultimate flexibility. As it is seen, the LED 0 is of red colour (only red slider has non-zero value) and the LED 1 is of light blue (which is a mix of green and blue encoded by two sliders): There are two LEDs and six sliders controlling intensity of base colour for each of the LEDs. The final look of the web interface is given below. The script also gets two parameters, a register name and a value. The function makes asynchronous call which in its turn executes rgb-led-pwm shell script located in cgi-bin folder. ![]() The implementation of set_led JavaScript function is in config.js, the fragment of the file is given below. Led1_ = form_rgb_str(s1r.value, s1g.value, s1b.value) Led0_ = form_rgb_str(s0r.value, s0g.value, s0b.value) Var led1_caption = document.getElementById("led1_caption") Var led0_caption = document.getElementById("led0_caption") Var s1b = document.getElementById("led1_blue") Var s1g = document.getElementById("led1_green") Var s1r = document.getElementById("led1_red") Var s0b = document.getElementById("led0_blue") Var s0g = document.getElementById("led0_green") Var s0r = document.getElementById("led0_red") ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |