Refactor diligent_jstk design files: update clock wizard paths, modify interface nets, enhance uart_viewer.py for real-time data visualization, and remove unused Vivado project zip file.
This commit is contained in:
@@ -84,8 +84,8 @@
|
|||||||
},
|
},
|
||||||
"clk_wiz_0": {
|
"clk_wiz_0": {
|
||||||
"vlnv": "xilinx.com:ip:clk_wiz:6.0",
|
"vlnv": "xilinx.com:ip:clk_wiz:6.0",
|
||||||
"xci_name": "diligent_jstk_clk_wiz_0_1",
|
"xci_name": "diligent_jstk_clk_wiz_0_0",
|
||||||
"xci_path": "ip\\diligent_jstk_clk_wiz_0_1\\diligent_jstk_clk_wiz_0_1.xci",
|
"xci_path": "ip\\diligent_jstk_clk_wiz_0_0_1\\diligent_jstk_clk_wiz_0_0.xci",
|
||||||
"inst_hier_path": "clk_wiz_0",
|
"inst_hier_path": "clk_wiz_0",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"CLK_IN1_BOARD_INTERFACE": {
|
"CLK_IN1_BOARD_INTERFACE": {
|
||||||
@@ -591,28 +591,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interface_nets": {
|
"interface_nets": {
|
||||||
"axi4stream_spi_master_0_SPI_M": {
|
|
||||||
"interface_ports": [
|
|
||||||
"SPI_M_0",
|
|
||||||
"axi4stream_spi_master_0/SPI_M"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AXI4Stream_UART_0_UART": {
|
"AXI4Stream_UART_0_UART": {
|
||||||
"interface_ports": [
|
"interface_ports": [
|
||||||
"usb_uart",
|
"usb_uart",
|
||||||
"AXI4Stream_UART_0/UART"
|
"AXI4Stream_UART_0/UART"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"jstk_uart_bridge_0_m_axis": {
|
"digilent_jstk2_0_m_axis": {
|
||||||
"interface_ports": [
|
"interface_ports": [
|
||||||
"AXI4Stream_UART_0/S00_AXIS_TX",
|
"digilent_jstk2_0/m_axis",
|
||||||
"jstk_uart_bridge_0/m_axis"
|
"axi4stream_spi_master_0/S_AXIS",
|
||||||
]
|
"system_ila_0/SLOT_0_AXIS"
|
||||||
},
|
|
||||||
"AXI4Stream_UART_0_M00_AXIS_RX": {
|
|
||||||
"interface_ports": [
|
|
||||||
"AXI4Stream_UART_0/M00_AXIS_RX",
|
|
||||||
"jstk_uart_bridge_0/s_axis"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"axi4stream_spi_master_0_M_AXIS": {
|
"axi4stream_spi_master_0_M_AXIS": {
|
||||||
@@ -622,11 +611,22 @@
|
|||||||
"system_ila_0/SLOT_1_AXIS"
|
"system_ila_0/SLOT_1_AXIS"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"digilent_jstk2_0_m_axis": {
|
"axi4stream_spi_master_0_SPI_M": {
|
||||||
"interface_ports": [
|
"interface_ports": [
|
||||||
"digilent_jstk2_0/m_axis",
|
"SPI_M_0",
|
||||||
"axi4stream_spi_master_0/S_AXIS",
|
"axi4stream_spi_master_0/SPI_M"
|
||||||
"system_ila_0/SLOT_0_AXIS"
|
]
|
||||||
|
},
|
||||||
|
"AXI4Stream_UART_0_M00_AXIS_RX": {
|
||||||
|
"interface_ports": [
|
||||||
|
"AXI4Stream_UART_0/M00_AXIS_RX",
|
||||||
|
"jstk_uart_bridge_0/s_axis"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"jstk_uart_bridge_0_m_axis": {
|
||||||
|
"interface_ports": [
|
||||||
|
"AXI4Stream_UART_0/S00_AXIS_TX",
|
||||||
|
"jstk_uart_bridge_0/m_axis"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
--Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
|
--Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
--Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
|
--Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
|
||||||
--Date : Fri May 16 16:28:03 2025
|
--Date : Fri May 16 22:32:02 2025
|
||||||
--Host : Davide-Samsung running 64-bit major release (build 9200)
|
--Host : DavideASUS running 64-bit major release (build 9200)
|
||||||
--Command : generate_target diligent_jstk_wrapper.bd
|
--Command : generate_target diligent_jstk_wrapper.bd
|
||||||
--Design : diligent_jstk_wrapper
|
--Design : diligent_jstk_wrapper
|
||||||
--Purpose : IP block netlist
|
--Purpose : IP block netlist
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import serial
|
import serial
|
||||||
import serial.tools.list_ports
|
import serial.tools.list_ports
|
||||||
import time
|
import time
|
||||||
|
import queue
|
||||||
|
import threading
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import matplotlib.animation as animation
|
import matplotlib.animation as animation
|
||||||
import threading
|
|
||||||
import queue
|
|
||||||
|
|
||||||
# CONFIGURAZIONE
|
# CONFIGURAZIONE
|
||||||
BASYS3_PID = 0x6010
|
BASYS3_PID = 0x6010
|
||||||
@@ -24,6 +24,14 @@ if not dev:
|
|||||||
PORT = dev
|
PORT = dev
|
||||||
|
|
||||||
def receive_mode(ser):
|
def receive_mode(ser):
|
||||||
|
print("Modalità ricezione. Premi Ctrl+C per uscire.\n")
|
||||||
|
while True:
|
||||||
|
if ser.in_waiting >= CHUNK_SIZE:
|
||||||
|
data = ser.read(CHUNK_SIZE)
|
||||||
|
hex_bytes = ' '.join(f"{b:02X}" for b in data)
|
||||||
|
print(f"HH | {hex_bytes}")
|
||||||
|
|
||||||
|
def receive_graph_mode(ser):
|
||||||
print("Modalità ricezione e visualizzazione coordinate in tempo reale. Premi Ctrl+C per uscire.\n")
|
print("Modalità ricezione e visualizzazione coordinate in tempo reale. Premi Ctrl+C per uscire.\n")
|
||||||
q = queue.Queue()
|
q = queue.Queue()
|
||||||
|
|
||||||
@@ -39,9 +47,7 @@ def receive_mode(ser):
|
|||||||
reader_thread = threading.Thread(target=serial_reader, daemon=True)
|
reader_thread = threading.Thread(target=serial_reader, daemon=True)
|
||||||
reader_thread.start()
|
reader_thread.start()
|
||||||
|
|
||||||
# Start with a single point at (0,0)
|
|
||||||
latest_point = [0, 0]
|
latest_point = [0, 0]
|
||||||
|
|
||||||
fig, ax = plt.subplots()
|
fig, ax = plt.subplots()
|
||||||
sc = ax.scatter([latest_point[0]], [latest_point[1]])
|
sc = ax.scatter([latest_point[0]], [latest_point[1]])
|
||||||
ax.set_xlim(0, 255)
|
ax.set_xlim(0, 255)
|
||||||
@@ -51,12 +57,11 @@ def receive_mode(ser):
|
|||||||
ax.set_title("Coordinate in tempo reale")
|
ax.set_title("Coordinate in tempo reale")
|
||||||
|
|
||||||
def update(frame):
|
def update(frame):
|
||||||
# Update only if new data is available
|
|
||||||
while not q.empty():
|
while not q.empty():
|
||||||
x, y = q.get()
|
x, y = q.get()
|
||||||
latest_point[0] = x
|
latest_point[0] = x
|
||||||
latest_point[1] = y
|
latest_point[1] = y
|
||||||
sc.set_offsets([latest_point]) # Note the extra brackets!
|
sc.set_offsets([latest_point])
|
||||||
return sc,
|
return sc,
|
||||||
|
|
||||||
ani = animation.FuncAnimation(fig, update, interval=30, blit=True)
|
ani = animation.FuncAnimation(fig, update, interval=30, blit=True)
|
||||||
@@ -89,8 +94,8 @@ def send_mode(ser):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
mode = ""
|
mode = ""
|
||||||
while mode not in ["r", "s", "4"]:
|
while mode not in ["r", "s", "g"]:
|
||||||
mode = input("Vuoi ricevere (r), inviare (s) ? [r/s]: ").strip().lower()
|
mode = input("Vuoi ricevere (r), inviare (s), o ricevere con grafico (g)? [r/s/g]: ").strip().lower()
|
||||||
|
|
||||||
ser = serial.Serial(PORT, BAUDRATE, timeout=1)
|
ser = serial.Serial(PORT, BAUDRATE, timeout=1)
|
||||||
print(f"Aperta porta seriale: {PORT} a {BAUDRATE} baud.\n")
|
print(f"Aperta porta seriale: {PORT} a {BAUDRATE} baud.\n")
|
||||||
@@ -99,6 +104,8 @@ try:
|
|||||||
receive_mode(ser)
|
receive_mode(ser)
|
||||||
elif mode == "s":
|
elif mode == "s":
|
||||||
send_mode(ser)
|
send_mode(ser)
|
||||||
|
elif mode == "g":
|
||||||
|
receive_graph_mode(ser)
|
||||||
else:
|
else:
|
||||||
print("Selezione non valida. Uscita...")
|
print("Selezione non valida. Uscita...")
|
||||||
ser.close()
|
ser.close()
|
||||||
|
|||||||
@@ -165,9 +165,7 @@
|
|||||||
<Runs Version="1" Minor="15">
|
<Runs Version="1" Minor="15">
|
||||||
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1">
|
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1">
|
||||||
<Strategy Version="1" Minor="2">
|
<Strategy Version="1" Minor="2">
|
||||||
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020">
|
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020"/>
|
||||||
<Desc>Vivado Synthesis Defaults</Desc>
|
|
||||||
</StratHandle>
|
|
||||||
<Step Id="synth_design"/>
|
<Step Id="synth_design"/>
|
||||||
</Strategy>
|
</Strategy>
|
||||||
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
|
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
|
||||||
@@ -177,9 +175,7 @@
|
|||||||
</Run>
|
</Run>
|
||||||
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1">
|
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1">
|
||||||
<Strategy Version="1" Minor="2">
|
<Strategy Version="1" Minor="2">
|
||||||
<StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2020">
|
<StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2020"/>
|
||||||
<Desc>Default settings for Implementation.</Desc>
|
|
||||||
</StratHandle>
|
|
||||||
<Step Id="init_design"/>
|
<Step Id="init_design"/>
|
||||||
<Step Id="opt_design"/>
|
<Step Id="opt_design"/>
|
||||||
<Step Id="power_opt_design"/>
|
<Step Id="power_opt_design"/>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user