Getting up to speed using Zync-7000 and Vivado (GUI) tool takes some time to get up to speed on. Several weeks ago I took the the SpeedWay class, that was a great way to get an overall overview and help get a start on the MiniZed board.
Here is the led.c verilog (yes simple)
module led
#(
parameter WIDTH = 24
)
(
input wire Clk,
input wire Reset,
output LED_G,
output LED_R
);
integer counter = 0;
reg LED_G_reg=0;
reg LED_R_reg=0;
assign LED_G = LED_G_reg;
assign LED_R = LED_R_reg;
always @(posedge Clk) begin
/* if (Reset ==1 ) begin
counter <= 0;
LED_R_reg <=0;
LED_G_reg <=0;
end
else */begin
counter <= counter+1;
LED_R_reg <= counter[23];
LED_G_reg <= ~counter[23];
end
end
endmodule
Some tips
- Linux with Wayland causes Vivado crash. To work around this use X, hope they will fix it.
- Using a constraint file you must declare the output on the net list. If not the block will not be generated.
- The Zynq PS clocks are used to drive the PL, so, must have a simple ARM program or init script to start the clocks.
- The MiniZed board is nice to use, low cost and has a lot of features to start learning FPGA or ARM (Linux or RTOS(FreeRTOS))
Next steps:
- Create a SWO trace/Serial Wire Viewer (SWV) demo on STM32 use using debug messages. Validate it is working using a logic anaylzer
- Create FPGA code to decode the Manchester bit stream and send it via DMA to the ARM-9 Cortex on the
No comments:
Post a Comment