mirror of
https://github.com/marqs85/ossc
synced 2025-06-08 12:54:04 +03:00
integrate JTAG interface to Ibex
This commit is contained in:
parent
c572fb651a
commit
cc7c4766a5
@ -1 +1 @@
|
|||||||
Subproject commit 80569615842bf4e82f8efdef7c4937b0d9e0141e
|
Subproject commit 34749dfc1dec1fb8bbfdf52434bb06ab22f8f88e
|
34
rtl/ossc.v
34
rtl/ossc.v
@ -58,7 +58,12 @@ module ossc (
|
|||||||
|
|
||||||
output SD_CLK,
|
output SD_CLK,
|
||||||
inout SD_CMD,
|
inout SD_CMD,
|
||||||
inout [3:0] SD_DAT
|
inout [3:0] SD_DAT,
|
||||||
|
|
||||||
|
input altera_reserved_tms,
|
||||||
|
input altera_reserved_tck,
|
||||||
|
input altera_reserved_tdi,
|
||||||
|
output altera_reserved_tdo
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -86,6 +91,8 @@ wire clkmux_clkout;
|
|||||||
wire [15:0] ir_code;
|
wire [15:0] ir_code;
|
||||||
wire [7:0] ir_code_cnt;
|
wire [7:0] ir_code_cnt;
|
||||||
|
|
||||||
|
wire tms, tck, tdi, tdo;
|
||||||
|
|
||||||
wire [7:0] R_sc, G_sc, B_sc;
|
wire [7:0] R_sc, G_sc, B_sc;
|
||||||
wire HSYNC_sc, VSYNC_sc, DE_sc;
|
wire HSYNC_sc, VSYNC_sc, DE_sc;
|
||||||
wire pll_areset, pll_scanclk, pll_scanclkena, pll_configupdate, pll_scandata, pll_scandone, pll_activeclock;
|
wire pll_areset, pll_scanclk, pll_scanclkena, pll_configupdate, pll_scandata, pll_scandone, pll_activeclock;
|
||||||
@ -95,9 +102,9 @@ wire pclk_out = PCLK_sc;
|
|||||||
|
|
||||||
reg [7:0] po_reset_ctr = 0;
|
reg [7:0] po_reset_ctr = 0;
|
||||||
reg po_reset_n = 1'b0;
|
reg po_reset_n = 1'b0;
|
||||||
wire jtagm_reset_req, ndmreset_req;
|
wire ndmreset_req;
|
||||||
reg ndmreset_ack, ndmreset_pulse;
|
reg ndmreset_ack, ndmreset_pulse;
|
||||||
wire sys_reset_n = (po_reset_n & ~jtagm_reset_req & ~ndmreset_pulse);
|
wire sys_reset_n = (po_reset_n & ~ndmreset_pulse);
|
||||||
|
|
||||||
reg [7:0] TVP_R, TVP_G, TVP_B;
|
reg [7:0] TVP_R, TVP_G, TVP_B;
|
||||||
reg TVP_HS, TVP_VS, TVP_FID;
|
reg TVP_HS, TVP_VS, TVP_FID;
|
||||||
@ -378,7 +385,11 @@ sys sys_inst(
|
|||||||
.ibex_0_ndm_ndmreset_ack_i (ndmreset_ack),
|
.ibex_0_ndm_ndmreset_ack_i (ndmreset_ack),
|
||||||
.ibex_0_config_boot_addr_i (32'h02080000),
|
.ibex_0_config_boot_addr_i (32'h02080000),
|
||||||
.ibex_0_config_core_sleep_o (),
|
.ibex_0_config_core_sleep_o (),
|
||||||
.master_0_master_reset_reset (jtagm_reset_req),
|
.ibex_0_tck_clk (tck),
|
||||||
|
.ibex_0_jtag_tdi (tdi),
|
||||||
|
.ibex_0_jtag_tms (tms),
|
||||||
|
.ibex_0_jtag_tdo (tdo),
|
||||||
|
.ibex_0_jtag_trstn (),
|
||||||
.i2c_opencores_0_export_scl_pad_io (scl),
|
.i2c_opencores_0_export_scl_pad_io (scl),
|
||||||
.i2c_opencores_0_export_sda_pad_io (sda),
|
.i2c_opencores_0_export_sda_pad_io (sda),
|
||||||
.i2c_opencores_0_export_spi_miso_pad_i (1'b0),
|
.i2c_opencores_0_export_spi_miso_pad_i (1'b0),
|
||||||
@ -415,10 +426,6 @@ sys sys_inst(
|
|||||||
.pll_reconfig_0_pll_reconfig_if_scandone (pll_scandone)
|
.pll_reconfig_0_pll_reconfig_if_scandone (pll_scandone)
|
||||||
);
|
);
|
||||||
|
|
||||||
// These do not work in current Quartus version (23.1) and a patch file (scripts/qsys.patch) must be used after Qsys generation instead
|
|
||||||
defparam
|
|
||||||
sys_inst.master_0.fifo.USE_MEMORY_BLOCKS = 0;
|
|
||||||
|
|
||||||
scanconverter #(
|
scanconverter #(
|
||||||
.EMIF_ENABLE(0),
|
.EMIF_ENABLE(0),
|
||||||
.NUM_LINE_BUFFERS(2)
|
.NUM_LINE_BUFFERS(2)
|
||||||
@ -489,6 +496,17 @@ ir_rcv ir0 (
|
|||||||
.ir_code_cnt (ir_code_cnt)
|
.ir_code_cnt (ir_code_cnt)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
cycloneive_jtag jtag_inst(
|
||||||
|
.tms(altera_reserved_tms),
|
||||||
|
.tck(altera_reserved_tck),
|
||||||
|
.tdi(altera_reserved_tdi),
|
||||||
|
.tdo(altera_reserved_tdo),
|
||||||
|
.tmsutap(tms),
|
||||||
|
.tckutap(tck),
|
||||||
|
.tdiutap(tdi),
|
||||||
|
.tdouser(tdo)
|
||||||
|
);
|
||||||
|
|
||||||
/*lat_tester lt0 (
|
/*lat_tester lt0 (
|
||||||
.clk27 (clk27),
|
.clk27 (clk27),
|
||||||
.pclk (PCLK_sc),
|
.pclk (PCLK_sc),
|
||||||
|
132
sys.qsys
132
sys.qsys
@ -21,7 +21,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "8";
|
value = "7";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "9";
|
value = "8";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "10";
|
value = "9";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,14 +88,6 @@
|
|||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
element ibex_0.avalon_slave_dbgreg
|
|
||||||
{
|
|
||||||
datum _lockedAddress
|
|
||||||
{
|
|
||||||
value = "1";
|
|
||||||
type = "boolean";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
element ibex_0.avalon_slave_dm
|
element ibex_0.avalon_slave_dm
|
||||||
{
|
{
|
||||||
datum _lockedAddress
|
datum _lockedAddress
|
||||||
@ -108,7 +100,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "7";
|
value = "6";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -142,7 +134,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "6";
|
value = "5";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,14 +151,6 @@
|
|||||||
type = "String";
|
type = "String";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
element master_0
|
|
||||||
{
|
|
||||||
datum _sortIndex
|
|
||||||
{
|
|
||||||
value = "4";
|
|
||||||
type = "int";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
element onchip_memory2_0
|
element onchip_memory2_0
|
||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
@ -205,7 +189,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "14";
|
value = "13";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +210,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "11";
|
value = "10";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +231,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "12";
|
value = "11";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,7 +252,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "15";
|
value = "14";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,7 +281,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "13";
|
value = "12";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,7 +302,7 @@
|
|||||||
{
|
{
|
||||||
datum _sortIndex
|
datum _sortIndex
|
||||||
{
|
{
|
||||||
value = "5";
|
value = "4";
|
||||||
type = "int";
|
type = "int";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,12 +357,9 @@
|
|||||||
type="conduit"
|
type="conduit"
|
||||||
dir="end" />
|
dir="end" />
|
||||||
<interface name="ibex_0_dm" internal="ibex_0.dm" />
|
<interface name="ibex_0_dm" internal="ibex_0.dm" />
|
||||||
|
<interface name="ibex_0_jtag" internal="ibex_0.jtag" type="conduit" dir="end" />
|
||||||
<interface name="ibex_0_ndm" internal="ibex_0.ndm" type="conduit" dir="end" />
|
<interface name="ibex_0_ndm" internal="ibex_0.ndm" type="conduit" dir="end" />
|
||||||
<interface
|
<interface name="ibex_0_tck" internal="ibex_0.tck" type="clock" dir="end" />
|
||||||
name="master_0_master_reset"
|
|
||||||
internal="master_0.master_reset"
|
|
||||||
type="reset"
|
|
||||||
dir="start" />
|
|
||||||
<interface
|
<interface
|
||||||
name="osd_generator_0_osd_if"
|
name="osd_generator_0_osd_if"
|
||||||
internal="osd_generator_0.osd_if"
|
internal="osd_generator_0.osd_if"
|
||||||
@ -436,7 +417,7 @@
|
|||||||
<parameter name="dedicated_spi" value="1" />
|
<parameter name="dedicated_spi" value="1" />
|
||||||
</module>
|
</module>
|
||||||
<module name="ibex_0" kind="ibex" version="1.0" enabled="1">
|
<module name="ibex_0" kind="ibex" version="1.0" enabled="1">
|
||||||
<parameter name="AUTO_INTERRUPT_RECEIVER_INTERRUPTS_USED" value="15" />
|
<parameter name="AUTO_INTERRUPT_RECEIVER_INTERRUPTS_USED" value="11" />
|
||||||
<parameter name="IBEX_ICACHE" value="true" />
|
<parameter name="IBEX_ICACHE" value="true" />
|
||||||
<parameter name="IBEX_RV32E" value="true" />
|
<parameter name="IBEX_RV32E" value="true" />
|
||||||
</module>
|
</module>
|
||||||
@ -475,7 +456,7 @@
|
|||||||
name="jtag_uart_0"
|
name="jtag_uart_0"
|
||||||
kind="altera_avalon_jtag_uart"
|
kind="altera_avalon_jtag_uart"
|
||||||
version="24.1"
|
version="24.1"
|
||||||
enabled="1">
|
enabled="0">
|
||||||
<parameter name="allowMultipleConnections" value="false" />
|
<parameter name="allowMultipleConnections" value="false" />
|
||||||
<parameter name="avalonSpec" value="2.0" />
|
<parameter name="avalonSpec" value="2.0" />
|
||||||
<parameter name="clkFreq" value="27000000" />
|
<parameter name="clkFreq" value="27000000" />
|
||||||
@ -491,20 +472,6 @@
|
|||||||
<parameter name="writeBufferDepth" value="16" />
|
<parameter name="writeBufferDepth" value="16" />
|
||||||
<parameter name="writeIRQThreshold" value="8" />
|
<parameter name="writeIRQThreshold" value="8" />
|
||||||
</module>
|
</module>
|
||||||
<module
|
|
||||||
name="master_0"
|
|
||||||
kind="altera_jtag_avalon_master"
|
|
||||||
version="24.1"
|
|
||||||
enabled="1">
|
|
||||||
<parameter name="AUTO_DEVICE" value="EP4CE15E22C8" />
|
|
||||||
<parameter name="AUTO_DEVICE_FAMILY" value="Cyclone IV E" />
|
|
||||||
<parameter name="AUTO_DEVICE_SPEEDGRADE" value="8" />
|
|
||||||
<parameter name="COMPONENT_CLOCK" value="0" />
|
|
||||||
<parameter name="FAST_VER" value="0" />
|
|
||||||
<parameter name="FIFO_DEPTHS" value="2" />
|
|
||||||
<parameter name="PLI_PORT" value="50000" />
|
|
||||||
<parameter name="USE_PLI" value="0" />
|
|
||||||
</module>
|
|
||||||
<module
|
<module
|
||||||
name="onchip_memory2_0"
|
name="onchip_memory2_0"
|
||||||
kind="altera_avalon_onchip_memory2"
|
kind="altera_avalon_onchip_memory2"
|
||||||
@ -717,6 +684,33 @@
|
|||||||
<parameter name="baseAddress" value="0x00010000" />
|
<parameter name="baseAddress" value="0x00010000" />
|
||||||
<parameter name="defaultConnection" value="false" />
|
<parameter name="defaultConnection" value="false" />
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection
|
||||||
|
kind="avalon"
|
||||||
|
version="24.1"
|
||||||
|
start="ibex_0.avalon_master_bus_debug"
|
||||||
|
end="intel_generic_serial_flash_interface_top_0.avl_csr">
|
||||||
|
<parameter name="arbitrationPriority" value="1" />
|
||||||
|
<parameter name="baseAddress" value="0x00020100" />
|
||||||
|
<parameter name="defaultConnection" value="false" />
|
||||||
|
</connection>
|
||||||
|
<connection
|
||||||
|
kind="avalon"
|
||||||
|
version="24.1"
|
||||||
|
start="ibex_0.avalon_master_bus_debug"
|
||||||
|
end="intel_generic_serial_flash_interface_top_0.avl_mem">
|
||||||
|
<parameter name="arbitrationPriority" value="1" />
|
||||||
|
<parameter name="baseAddress" value="0x02000000" />
|
||||||
|
<parameter name="defaultConnection" value="false" />
|
||||||
|
</connection>
|
||||||
|
<connection
|
||||||
|
kind="avalon"
|
||||||
|
version="24.1"
|
||||||
|
start="ibex_0.avalon_master_bus_debug"
|
||||||
|
end="onchip_memory2_0.s2">
|
||||||
|
<parameter name="arbitrationPriority" value="1" />
|
||||||
|
<parameter name="baseAddress" value="0x00010000" />
|
||||||
|
<parameter name="defaultConnection" value="false" />
|
||||||
|
</connection>
|
||||||
<connection
|
<connection
|
||||||
kind="avalon"
|
kind="avalon"
|
||||||
version="24.1"
|
version="24.1"
|
||||||
@ -744,47 +738,10 @@
|
|||||||
<parameter name="baseAddress" value="0x00010000" />
|
<parameter name="baseAddress" value="0x00010000" />
|
||||||
<parameter name="defaultConnection" value="false" />
|
<parameter name="defaultConnection" value="false" />
|
||||||
</connection>
|
</connection>
|
||||||
<connection
|
|
||||||
kind="avalon"
|
|
||||||
version="24.1"
|
|
||||||
start="master_0.master"
|
|
||||||
end="ibex_0.avalon_slave_dbgreg">
|
|
||||||
<parameter name="arbitrationPriority" value="1" />
|
|
||||||
<parameter name="baseAddress" value="0x0000" />
|
|
||||||
<parameter name="defaultConnection" value="false" />
|
|
||||||
</connection>
|
|
||||||
<connection
|
|
||||||
kind="avalon"
|
|
||||||
version="24.1"
|
|
||||||
start="master_0.master"
|
|
||||||
end="intel_generic_serial_flash_interface_top_0.avl_csr">
|
|
||||||
<parameter name="arbitrationPriority" value="1" />
|
|
||||||
<parameter name="baseAddress" value="0x00020100" />
|
|
||||||
<parameter name="defaultConnection" value="false" />
|
|
||||||
</connection>
|
|
||||||
<connection
|
|
||||||
kind="avalon"
|
|
||||||
version="24.1"
|
|
||||||
start="master_0.master"
|
|
||||||
end="intel_generic_serial_flash_interface_top_0.avl_mem">
|
|
||||||
<parameter name="arbitrationPriority" value="1" />
|
|
||||||
<parameter name="baseAddress" value="0x02000000" />
|
|
||||||
<parameter name="defaultConnection" value="false" />
|
|
||||||
</connection>
|
|
||||||
<connection
|
|
||||||
kind="avalon"
|
|
||||||
version="24.1"
|
|
||||||
start="master_0.master"
|
|
||||||
end="onchip_memory2_0.s2">
|
|
||||||
<parameter name="arbitrationPriority" value="1" />
|
|
||||||
<parameter name="baseAddress" value="0x00010000" />
|
|
||||||
<parameter name="defaultConnection" value="false" />
|
|
||||||
</connection>
|
|
||||||
<connection kind="clock" version="24.1" start="clk_27.clk" end="jtag_uart_0.clk" />
|
<connection kind="clock" version="24.1" start="clk_27.clk" end="jtag_uart_0.clk" />
|
||||||
<connection kind="clock" version="24.1" start="clk_27.clk" end="pio_0.clk" />
|
<connection kind="clock" version="24.1" start="clk_27.clk" end="pio_0.clk" />
|
||||||
<connection kind="clock" version="24.1" start="clk_27.clk" end="pio_1.clk" />
|
<connection kind="clock" version="24.1" start="clk_27.clk" end="pio_1.clk" />
|
||||||
<connection kind="clock" version="24.1" start="clk_27.clk" end="timer_0.clk" />
|
<connection kind="clock" version="24.1" start="clk_27.clk" end="timer_0.clk" />
|
||||||
<connection kind="clock" version="24.1" start="clk_27.clk" end="master_0.clk" />
|
|
||||||
<connection
|
<connection
|
||||||
kind="clock"
|
kind="clock"
|
||||||
version="24.1"
|
version="24.1"
|
||||||
@ -924,11 +881,6 @@
|
|||||||
version="24.1"
|
version="24.1"
|
||||||
start="clk_27.clk_reset"
|
start="clk_27.clk_reset"
|
||||||
end="ibex_0.reset_sink" />
|
end="ibex_0.reset_sink" />
|
||||||
<connection
|
|
||||||
kind="reset"
|
|
||||||
version="24.1"
|
|
||||||
start="po_reset_bridge_0.out_reset"
|
|
||||||
end="master_0.clk_reset" />
|
|
||||||
<connection
|
<connection
|
||||||
kind="reset"
|
kind="reset"
|
||||||
version="24.1"
|
version="24.1"
|
||||||
|
2445
sys.sopcinfo
2445
sys.sopcinfo
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user