Updates to debug and python files
This commit is contained in:
parent
16e1d86ac7
commit
12fd25958b
|
@ -0,0 +1,29 @@
|
|||
class zcash_fpga:
|
||||
import serial
|
||||
import codecs
|
||||
def __init__(self, COM='COM4'):
|
||||
self.s = self.serial.Serial(COM, 921600, timeout=1)
|
||||
#Test getting FPGA status
|
||||
self.get_status()
|
||||
print("Connected...")
|
||||
|
||||
# FPGA status
|
||||
def get_status(self):
|
||||
self.s.write(self.codecs.decode('0800000001000000', 'hex'))
|
||||
# Parse reply
|
||||
res = self.s.read(1024)
|
||||
print(res)
|
||||
|
||||
|
||||
def close(self):
|
||||
self.s.close()
|
||||
print("Closed...")
|
||||
|
||||
|
||||
#Example usage:
|
||||
|
||||
zf = zcash_fpga()
|
||||
|
||||
zf.close()
|
||||
|
||||
|
|
@ -188,9 +188,9 @@
|
|||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUT7_USED">0</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLKOUTPHY_MODE">VCO</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_IN_SEL_PORT">clk_in_sel</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT1_PORT">clk_out100</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT2_PORT">clk_out200</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT3_PORT">clk_out300</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT1_PORT">clk_100</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT2_PORT">clk_200</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT3_PORT">clk_300</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT4_PORT">clk_out4</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT5_PORT">clk_out5</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_CLK_OUT6_PORT">clk_out6</spirit:configurableElementValue>
|
||||
|
@ -288,9 +288,9 @@
|
|||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_NUM_OUT_CLKS">3</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW0A"> Output Output Phase Duty Cycle Pk-to-Pk Phase</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW0B"> Clock Freq (MHz) (degrees) (%) Jitter (ps) Error (ps)</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW1">clk_out100___100.000______0.000______50.0______115.831_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW2">clk_out200___200.000______0.000______50.0______102.086_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW3">clk_out300___300.000______0.000______50.0_______94.862_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW1">_clk_100___100.000______0.000______50.0______115.831_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW2">_clk_200___200.000______0.000______50.0______102.086_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW3">_clk_300___300.000______0.000______50.0_______94.862_____87.180</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW4">no_CLK_OUT4_output</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW5">no_CLK_OUT5_output</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_OUTCLK_SUM_ROW6">no_CLK_OUT6_output</spirit:configurableElementValue>
|
||||
|
@ -472,11 +472,11 @@
|
|||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN1_BOARD_INTERFACE">Custom</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN2_BOARD_INTERFACE">Custom</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_IN_SEL_PORT">clk_in_sel</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT1_PORT">clk_out100</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT1_PORT">clk_100</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT1_USE_FINE_PS_GUI">false</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT2_PORT">clk_out200</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT2_PORT">clk_200</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT2_USE_FINE_PS_GUI">false</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT3_PORT">clk_out300</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT3_PORT">clk_300</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT3_USE_FINE_PS_GUI">false</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT4_PORT">clk_out4</spirit:configurableElementValue>
|
||||
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.CLK_OUT4_USE_FINE_PS_GUI">false</spirit:configurableElementValue>
|
||||
|
|
|
@ -126,9 +126,9 @@ interface if_axi_stream # (
|
|||
endtask;
|
||||
|
||||
// Task used in simulation to get data from a sink interface
|
||||
task automatic get_stream(ref logic [common_pkg::MAX_SIM_BYTS*8-1:0] data, ref integer signed len);
|
||||
task automatic get_stream(ref logic [common_pkg::MAX_SIM_BYTS*8-1:0] data, ref integer signed len, input integer bp = 0);
|
||||
logic sop_l = 0;
|
||||
rdy = 1;
|
||||
rdy = ($random % 100) >= bp;
|
||||
len = 0;
|
||||
data = 0;
|
||||
@(posedge i_clk);
|
||||
|
@ -145,7 +145,9 @@ interface if_axi_stream # (
|
|||
if (eop) break;
|
||||
end
|
||||
@(posedge i_clk);
|
||||
rdy = ($random % 100) >= bp;
|
||||
end
|
||||
rdy = 1;
|
||||
endtask
|
||||
|
||||
endinterface
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
module debug_if #(
|
||||
parameter DAT_BYTS,
|
||||
parameter DAT_BITS = DAT_BYTS*8,
|
||||
parameter MOD_BITS = $clog2(DAT_BYTS),
|
||||
parameter MOD_BITS = DAT_BYTS == 1 ? 1 :$clog2(DAT_BYTS),
|
||||
parameter CTL_BITS
|
||||
) (
|
||||
if_axi_stream i_if
|
||||
|
@ -35,15 +35,15 @@ module debug_if #(
|
|||
(* mark_debug = "true" *) logic [DAT_BITS-1:0] dat;
|
||||
(* mark_debug = "true" *) logic [MOD_BITS-1:0] mod;
|
||||
|
||||
always_comb begin
|
||||
rdy = i_if.rdy;
|
||||
val = i_if.val;
|
||||
err = i_if.err;
|
||||
sop = i_if.sop;
|
||||
eop = i_if.eop;
|
||||
ctl = i_if.ctl;
|
||||
dat = i_if.dat;
|
||||
mod = i_if.mod;
|
||||
always_ff @ (posedge i_if.i_clk) begin
|
||||
rdy <= i_if.rdy;
|
||||
val <= i_if.val;
|
||||
err <= i_if.err;
|
||||
sop <= i_if.sop;
|
||||
eop <= i_if.eop;
|
||||
ctl <= i_if.ctl;
|
||||
dat <= i_if.dat;
|
||||
mod <= i_if.mod;
|
||||
end
|
||||
|
||||
endmodule
|
Loading…
Reference in New Issue