first programm flashed
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
##
|
||||||
|
# Pour version Mac, vivado tourne dans un conteneur docker
|
||||||
|
##
|
||||||
|
|
||||||
|
# Chercher où le bitstream est
|
||||||
|
docker cp vivado-docker-vivado-run-15b5f3ed8d35:/workspace/zybo_hello_world/zybo_hello_world.runs/impl_1/top.bit ./top.bit
|
||||||
|
|
||||||
|
# Flasher le bitstream avec openFPGALoader
|
||||||
|
openFPGALoader -b zybo_z7_10 ./top.bit
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
## Horloge 125 MHz (Ethernet PHY Clock vers PL)
|
||||||
|
set_property -dict { PACKAGE_PIN L16 IOSTANDARD LVCMOS33 } [get_ports { clk }];
|
||||||
|
create_clock -add -name sys_clk_pin -period 8.00 -waveform {0 4} [get_ports { clk }];
|
||||||
|
|
||||||
|
## Switchs (SW0..SW3)
|
||||||
|
set_property -dict { PACKAGE_PIN G15 IOSTANDARD LVCMOS33 } [get_ports { sw[0] }];
|
||||||
|
set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 } [get_ports { sw[1] }];
|
||||||
|
set_property -dict { PACKAGE_PIN W13 IOSTANDARD LVCMOS33 } [get_ports { sw[2] }];
|
||||||
|
set_property -dict { PACKAGE_PIN T16 IOSTANDARD LVCMOS33 } [get_ports { sw[3] }];
|
||||||
|
|
||||||
|
## LEDs (LD0..LD3)
|
||||||
|
set_property -dict { PACKAGE_PIN M14 IOSTANDARD LVCMOS33 } [get_ports { led[0] }];
|
||||||
|
set_property -dict { PACKAGE_PIN M15 IOSTANDARD LVCMOS33 } [get_ports { led[1] }];
|
||||||
|
set_property -dict { PACKAGE_PIN G14 IOSTANDARD LVCMOS33 } [get_ports { led[2] }];
|
||||||
|
set_property -dict { PACKAGE_PIN D18 IOSTANDARD LVCMOS33 } [get_ports { led[3] }];
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
`timescale 1ns / 1ps
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Company:
|
||||||
|
// Engineer:
|
||||||
|
//
|
||||||
|
// Create Date: 12/02/2026 08:24:56 PM
|
||||||
|
// Design Name:
|
||||||
|
// Module Name: top
|
||||||
|
// Project Name:
|
||||||
|
// Target Devices:
|
||||||
|
// Tool Versions:
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
// Dependencies:
|
||||||
|
//
|
||||||
|
// Revision:
|
||||||
|
// Revision 0.01 - File Created
|
||||||
|
// Additional Comments:
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
module top (
|
||||||
|
input logic clk, // Horloge 125 MHz (broche L16)
|
||||||
|
input logic [3:0] sw, // 4 switchs
|
||||||
|
output logic [3:0] led // 4 LEDs
|
||||||
|
);
|
||||||
|
|
||||||
|
// 125 MHz -> 2^26 ticks ≈ 0.536s (clignotement ~0.93 Hz)
|
||||||
|
logic [26:0] counter = '0;
|
||||||
|
|
||||||
|
always_ff @(posedge clk) begin
|
||||||
|
counter <= counter + 1'b1;
|
||||||
|
end
|
||||||
|
|
||||||
|
// LD0 clignote, LD1..LD3 suivent SW1..SW3 (sauf si SW0 coupe le clignotement)
|
||||||
|
assign led[0] = sw[0] ? 1'b1 : counter[26];
|
||||||
|
assign led[3:1] = sw[3:1];
|
||||||
|
|
||||||
|
endmodule
|
||||||
Reference in New Issue
Block a user