diff options
author | Matt Ettus <matt@ettus.com> | 2010-06-10 11:34:18 -0700 |
---|---|---|
committer | Matt Ettus <matt@ettus.com> | 2010-06-10 11:34:18 -0700 |
commit | 45e5589ed9c555c604fb66be9f314c02ff5fb9e4 (patch) | |
tree | 06ec12796d2f60d4e6a01ae97356817202e13262 | |
parent | 8dbe0a6f5c4cb4d3d888d94287e788153762d14b (diff) | |
download | uhd-45e5589ed9c555c604fb66be9f314c02ff5fb9e4.tar.gz uhd-45e5589ed9c555c604fb66be9f314c02ff5fb9e4.tar.bz2 uhd-45e5589ed9c555c604fb66be9f314c02ff5fb9e4.zip |
first attempt at cleaning up the build system
-rw-r--r-- | usrp2/control_lib/Makefile.srcs | 44 | ||||
-rw-r--r-- | usrp2/coregen/Makefile.srcs | 19 | ||||
-rw-r--r-- | usrp2/extram/Makefile.srcs | 10 | ||||
-rw-r--r-- | usrp2/fifo/.gitignore (renamed from usrp2/control_lib/newfifo/.gitignore) | 0 | ||||
-rw-r--r-- | usrp2/fifo/Makefile.srcs | 23 | ||||
-rw-r--r-- | usrp2/fifo/buffer_int.v (renamed from usrp2/control_lib/newfifo/buffer_int.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/buffer_int_tb.v (renamed from usrp2/control_lib/newfifo/buffer_int_tb.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/buffer_pool.v (renamed from usrp2/control_lib/newfifo/buffer_pool.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/buffer_pool_tb.v (renamed from usrp2/control_lib/newfifo/buffer_pool_tb.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo19_to_fifo36.v (renamed from usrp2/control_lib/newfifo/fifo19_to_fifo36.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo19_to_ll8.v (renamed from usrp2/control_lib/newfifo/fifo19_to_ll8.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo36_to_fifo18.v (renamed from usrp2/control_lib/newfifo/fifo36_to_fifo18.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo36_to_fifo19.v (renamed from usrp2/control_lib/newfifo/fifo36_to_fifo19.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo36_to_ll8.v (renamed from usrp2/control_lib/newfifo/fifo36_to_ll8.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_2clock.v (renamed from usrp2/control_lib/newfifo/fifo_2clock.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_2clock_cascade.v (renamed from usrp2/control_lib/newfifo/fifo_2clock_cascade.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_cascade.v (renamed from usrp2/control_lib/newfifo/fifo_cascade.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_long.v (renamed from usrp2/control_lib/newfifo/fifo_long.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_new_tb.vcd (renamed from usrp2/control_lib/newfifo/fifo_new_tb.vcd) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_short.v (renamed from usrp2/control_lib/newfifo/fifo_short.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_spec.txt (renamed from usrp2/control_lib/newfifo/fifo_spec.txt) | 0 | ||||
-rw-r--r-- | usrp2/fifo/fifo_tb.v (renamed from usrp2/control_lib/newfifo/fifo_tb.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/ll8_shortfifo.v (renamed from usrp2/control_lib/newfifo/ll8_shortfifo.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/ll8_to_fifo19.v (renamed from usrp2/control_lib/newfifo/ll8_to_fifo19.v) | 0 | ||||
-rw-r--r-- | usrp2/fifo/ll8_to_fifo36.v (renamed from usrp2/control_lib/newfifo/ll8_to_fifo36.v) | 0 | ||||
-rw-r--r-- | usrp2/opencores/Makefile.srcs | 28 | ||||
-rw-r--r-- | usrp2/sdr_lib/Makefile.srcs | 37 | ||||
-rw-r--r-- | usrp2/sdr_lib/dsp_core_rx.v | 16 | ||||
-rw-r--r-- | usrp2/sdr_lib/dsp_core_rx_old.v | 183 | ||||
-rw-r--r-- | usrp2/serdes/Makefile.srcs | 14 | ||||
-rw-r--r-- | usrp2/simple_gemac/Makefile.srcs | 26 | ||||
-rw-r--r-- | usrp2/timing/Makefile.srcs | 16 | ||||
-rw-r--r-- | usrp2/top/Makefile.common | 84 | ||||
-rw-r--r-- | usrp2/top/u2_rev3/Makefile | 238 | ||||
-rw-r--r-- | usrp2/top/u2_rev3/Makefile.udp | 238 | ||||
-rw-r--r--[-rwxr-xr-x] | usrp2/top/u2_rev3/u2_core.v | 3 | ||||
-rw-r--r-- | usrp2/udp/Makefile.srcs | 13 | ||||
-rw-r--r-- | usrp2/vrt/Makefile.srcs | 13 |
38 files changed, 583 insertions, 422 deletions
diff --git a/usrp2/control_lib/Makefile.srcs b/usrp2/control_lib/Makefile.srcs new file mode 100644 index 000000000..5e2a96a53 --- /dev/null +++ b/usrp2/control_lib/Makefile.srcs @@ -0,0 +1,44 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Control Lib Sources +################################################## +CONTROL_LIB_SRCS = $(abspath $(addprefix $(BASE_DIR)/../control_lib/, \ +CRC16_D16.v \ +atr_controller.v \ +bin2gray.v \ +dcache.v \ +decoder_3_8.v \ +dpram32.v \ +gray2bin.v \ +gray_send.v \ +icache.v \ +mux4.v \ +mux8.v \ +nsgpio.v \ +ram_2port.v \ +ram_harv_cache.v \ +ram_loader.v \ +setting_reg.v \ +settings_bus.v \ +settings_bus_crossclock.v \ +srl.v \ +system_control.v \ +wb_1master.v \ +wb_readback_mux.v \ +simple_uart.v \ +simple_uart_tx.v \ +simple_uart_rx.v \ +oneshot_2clk.v \ +sd_spi.v \ +sd_spi_wb.v \ +wb_bridge_16_32.v \ +reset_sync.v \ +priority_enc.v \ +pic.v \ +longfifo.v \ +shortfifo.v \ +medfifo.v \ +)) diff --git a/usrp2/coregen/Makefile.srcs b/usrp2/coregen/Makefile.srcs new file mode 100644 index 000000000..7b29225ca --- /dev/null +++ b/usrp2/coregen/Makefile.srcs @@ -0,0 +1,19 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Coregen Sources +################################################## +COREGEN_SRCS = $(abspath $(addprefix $(BASE_DIR)/../coregen/, \ +fifo_xlnx_2Kx36_2clk.v \ +fifo_xlnx_2Kx36_2clk.xco \ +fifo_xlnx_512x36_2clk.v \ +fifo_xlnx_512x36_2clk.xco \ +fifo_xlnx_64x36_2clk.v \ +fifo_xlnx_64x36_2clk.xco \ +fifo_xlnx_16x19_2clk.v \ +fifo_xlnx_16x19_2clk.xco \ +fifo_xlnx_16x40_2clk.v \ +fifo_xlnx_16x40_2clk.xco \ +)) diff --git a/usrp2/extram/Makefile.srcs b/usrp2/extram/Makefile.srcs new file mode 100644 index 000000000..90be02142 --- /dev/null +++ b/usrp2/extram/Makefile.srcs @@ -0,0 +1,10 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Extram Sources +################################################## +EXTRAM_SRCS = $(abspath $(addprefix $(BASE_DIR)/../extram/, \ +wb_zbt16_b.v \ +)) diff --git a/usrp2/control_lib/newfifo/.gitignore b/usrp2/fifo/.gitignore index cba7efc8e..cba7efc8e 100644 --- a/usrp2/control_lib/newfifo/.gitignore +++ b/usrp2/fifo/.gitignore diff --git a/usrp2/fifo/Makefile.srcs b/usrp2/fifo/Makefile.srcs new file mode 100644 index 000000000..22867da7e --- /dev/null +++ b/usrp2/fifo/Makefile.srcs @@ -0,0 +1,23 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# FIFO Sources +################################################## +FIFO_SRCS = $(abspath $(addprefix $(BASE_DIR)/../fifo/, \ +buffer_int.v \ +buffer_pool.v \ +fifo_2clock.v \ +fifo_2clock_cascade.v \ +ll8_shortfifo.v \ +fifo_short.v \ +fifo_long.v \ +fifo_cascade.v \ +fifo36_to_ll8.v \ +ll8_to_fifo36.v \ +fifo19_to_ll8.v \ +ll8_to_fifo19.v \ +fifo36_to_fifo19.v \ +fifo19_to_fifo36.v \ +)) diff --git a/usrp2/control_lib/newfifo/buffer_int.v b/usrp2/fifo/buffer_int.v index b45ed3532..b45ed3532 100644 --- a/usrp2/control_lib/newfifo/buffer_int.v +++ b/usrp2/fifo/buffer_int.v diff --git a/usrp2/control_lib/newfifo/buffer_int_tb.v b/usrp2/fifo/buffer_int_tb.v index df54dcc0b..df54dcc0b 100644 --- a/usrp2/control_lib/newfifo/buffer_int_tb.v +++ b/usrp2/fifo/buffer_int_tb.v diff --git a/usrp2/control_lib/newfifo/buffer_pool.v b/usrp2/fifo/buffer_pool.v index 41ac1deb3..41ac1deb3 100644 --- a/usrp2/control_lib/newfifo/buffer_pool.v +++ b/usrp2/fifo/buffer_pool.v diff --git a/usrp2/control_lib/newfifo/buffer_pool_tb.v b/usrp2/fifo/buffer_pool_tb.v index 91a01d268..91a01d268 100644 --- a/usrp2/control_lib/newfifo/buffer_pool_tb.v +++ b/usrp2/fifo/buffer_pool_tb.v diff --git a/usrp2/control_lib/newfifo/fifo19_to_fifo36.v b/usrp2/fifo/fifo19_to_fifo36.v index 5f9aeff9b..5f9aeff9b 100644 --- a/usrp2/control_lib/newfifo/fifo19_to_fifo36.v +++ b/usrp2/fifo/fifo19_to_fifo36.v diff --git a/usrp2/control_lib/newfifo/fifo19_to_ll8.v b/usrp2/fifo/fifo19_to_ll8.v index 4707f7523..4707f7523 100644 --- a/usrp2/control_lib/newfifo/fifo19_to_ll8.v +++ b/usrp2/fifo/fifo19_to_ll8.v diff --git a/usrp2/control_lib/newfifo/fifo36_to_fifo18.v b/usrp2/fifo/fifo36_to_fifo18.v index b636ab9ca..b636ab9ca 100644 --- a/usrp2/control_lib/newfifo/fifo36_to_fifo18.v +++ b/usrp2/fifo/fifo36_to_fifo18.v diff --git a/usrp2/control_lib/newfifo/fifo36_to_fifo19.v b/usrp2/fifo/fifo36_to_fifo19.v index de249aaeb..de249aaeb 100644 --- a/usrp2/control_lib/newfifo/fifo36_to_fifo19.v +++ b/usrp2/fifo/fifo36_to_fifo19.v diff --git a/usrp2/control_lib/newfifo/fifo36_to_ll8.v b/usrp2/fifo/fifo36_to_ll8.v index 0dee1dfc6..0dee1dfc6 100644 --- a/usrp2/control_lib/newfifo/fifo36_to_ll8.v +++ b/usrp2/fifo/fifo36_to_ll8.v diff --git a/usrp2/control_lib/newfifo/fifo_2clock.v b/usrp2/fifo/fifo_2clock.v index 34c85ccb4..34c85ccb4 100644 --- a/usrp2/control_lib/newfifo/fifo_2clock.v +++ b/usrp2/fifo/fifo_2clock.v diff --git a/usrp2/control_lib/newfifo/fifo_2clock_cascade.v b/usrp2/fifo/fifo_2clock_cascade.v index 5ce726977..5ce726977 100644 --- a/usrp2/control_lib/newfifo/fifo_2clock_cascade.v +++ b/usrp2/fifo/fifo_2clock_cascade.v diff --git a/usrp2/control_lib/newfifo/fifo_cascade.v b/usrp2/fifo/fifo_cascade.v index fdd8449bc..fdd8449bc 100644 --- a/usrp2/control_lib/newfifo/fifo_cascade.v +++ b/usrp2/fifo/fifo_cascade.v diff --git a/usrp2/control_lib/newfifo/fifo_long.v b/usrp2/fifo/fifo_long.v index 0426779f6..0426779f6 100644 --- a/usrp2/control_lib/newfifo/fifo_long.v +++ b/usrp2/fifo/fifo_long.v diff --git a/usrp2/control_lib/newfifo/fifo_new_tb.vcd b/usrp2/fifo/fifo_new_tb.vcd index 796889e7d..796889e7d 100644 --- a/usrp2/control_lib/newfifo/fifo_new_tb.vcd +++ b/usrp2/fifo/fifo_new_tb.vcd diff --git a/usrp2/control_lib/newfifo/fifo_short.v b/usrp2/fifo/fifo_short.v index 53a7603c7..53a7603c7 100644 --- a/usrp2/control_lib/newfifo/fifo_short.v +++ b/usrp2/fifo/fifo_short.v diff --git a/usrp2/control_lib/newfifo/fifo_spec.txt b/usrp2/fifo/fifo_spec.txt index 133b9fa8e..133b9fa8e 100644 --- a/usrp2/control_lib/newfifo/fifo_spec.txt +++ b/usrp2/fifo/fifo_spec.txt diff --git a/usrp2/control_lib/newfifo/fifo_tb.v b/usrp2/fifo/fifo_tb.v index f561df7fa..f561df7fa 100644 --- a/usrp2/control_lib/newfifo/fifo_tb.v +++ b/usrp2/fifo/fifo_tb.v diff --git a/usrp2/control_lib/newfifo/ll8_shortfifo.v b/usrp2/fifo/ll8_shortfifo.v index 39ada9a4f..39ada9a4f 100644 --- a/usrp2/control_lib/newfifo/ll8_shortfifo.v +++ b/usrp2/fifo/ll8_shortfifo.v diff --git a/usrp2/control_lib/newfifo/ll8_to_fifo19.v b/usrp2/fifo/ll8_to_fifo19.v index af3b91afb..af3b91afb 100644 --- a/usrp2/control_lib/newfifo/ll8_to_fifo19.v +++ b/usrp2/fifo/ll8_to_fifo19.v diff --git a/usrp2/control_lib/newfifo/ll8_to_fifo36.v b/usrp2/fifo/ll8_to_fifo36.v index 108daa903..108daa903 100644 --- a/usrp2/control_lib/newfifo/ll8_to_fifo36.v +++ b/usrp2/fifo/ll8_to_fifo36.v diff --git a/usrp2/opencores/Makefile.srcs b/usrp2/opencores/Makefile.srcs new file mode 100644 index 000000000..30360a17d --- /dev/null +++ b/usrp2/opencores/Makefile.srcs @@ -0,0 +1,28 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Open Cores Sources +################################################## +OPENCORES_SRCS = $(abspath $(addprefix $(BASE_DIR)/../opencores/, \ +8b10b/decode_8b10b.v \ +8b10b/encode_8b10b.v \ +aemb/rtl/verilog/aeMB_bpcu.v \ +aemb/rtl/verilog/aeMB_core_BE.v \ +aemb/rtl/verilog/aeMB_ctrl.v \ +aemb/rtl/verilog/aeMB_edk32.v \ +aemb/rtl/verilog/aeMB_ibuf.v \ +aemb/rtl/verilog/aeMB_regf.v \ +aemb/rtl/verilog/aeMB_xecu.v \ +i2c/rtl/verilog/i2c_master_bit_ctrl.v \ +i2c/rtl/verilog/i2c_master_byte_ctrl.v \ +i2c/rtl/verilog/i2c_master_defines.v \ +i2c/rtl/verilog/i2c_master_top.v \ +i2c/rtl/verilog/timescale.v \ +spi/rtl/verilog/spi_clgen.v \ +spi/rtl/verilog/spi_defines.v \ +spi/rtl/verilog/spi_shift.v \ +spi/rtl/verilog/spi_top.v \ +spi/rtl/verilog/timescale.v \ +)) diff --git a/usrp2/sdr_lib/Makefile.srcs b/usrp2/sdr_lib/Makefile.srcs new file mode 100644 index 000000000..90eede20f --- /dev/null +++ b/usrp2/sdr_lib/Makefile.srcs @@ -0,0 +1,37 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# FIFO Sources +################################################## +SDR_LIB_SRCS = $(abspath $(addprefix $(BASE_DIR)/../sdr_lib/, \ +acc.v \ +add2.v \ +add2_and_round.v \ +add2_and_round_reg.v \ +add2_reg.v \ +cic_dec_shifter.v \ +cic_decim.v \ +cic_int_shifter.v \ +cic_interp.v \ +cic_strober.v \ +clip.v \ +clip_reg.v \ +cordic.v \ +cordic_z24.v \ +cordic_stage.v \ +dsp_core_rx.v \ +dsp_core_rx_old.v \ +dsp_core_tx.v \ +hb_dec.v \ +hb_interp.v \ +round.v \ +round_reg.v \ +rx_control.v \ +rx_dcoffset.v \ +sign_extend.v \ +small_hb_dec.v \ +small_hb_int.v \ +tx_control.v \ +)) diff --git a/usrp2/sdr_lib/dsp_core_rx.v b/usrp2/sdr_lib/dsp_core_rx.v index aba18fccb..1e689fc7f 100644 --- a/usrp2/sdr_lib/dsp_core_rx.v +++ b/usrp2/sdr_lib/dsp_core_rx.v @@ -1,6 +1,6 @@ -`define DSP_CORE_RX_BASE 160 module dsp_core_rx + #(parameter BASE = 160) (input clk, input rst, input set_stb, input [7:0] set_addr, input [31:0] set_data, @@ -37,33 +37,33 @@ module dsp_core_rx wire [31:4] UNUSED_2; wire [31:2] UNUSED_3; - setting_reg #(.my_addr(`DSP_CORE_RX_BASE+0)) sr_0 + setting_reg #(.my_addr(BASE+0)) sr_0 (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out(phase_inc),.changed()); - setting_reg #(.my_addr(`DSP_CORE_RX_BASE+1)) sr_1 + setting_reg #(.my_addr(BASE+1)) sr_1 (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out({scale_i,scale_q}),.changed()); - setting_reg #(.my_addr(`DSP_CORE_RX_BASE+2)) sr_2 + setting_reg #(.my_addr(BASE+2)) sr_2 (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out({UNUSED_1, enable_hb1, enable_hb2, cic_decim_rate}),.changed()); - rx_dcoffset #(.WIDTH(14),.ADDR(`DSP_CORE_RX_BASE+6)) rx_dcoffset_a + rx_dcoffset #(.WIDTH(14),.ADDR(BASE+3)) rx_dcoffset_a (.clk(clk),.rst(rst),.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data), .adc_in(adc_a),.adc_out(adc_a_ofs)); - rx_dcoffset #(.WIDTH(14),.ADDR(`DSP_CORE_RX_BASE+7)) rx_dcoffset_b + rx_dcoffset #(.WIDTH(14),.ADDR(BASE+4)) rx_dcoffset_b (.clk(clk),.rst(rst),.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data), .adc_in(adc_b),.adc_out(adc_b_ofs)); wire [3:0] muxctrl; - setting_reg #(.my_addr(`DSP_CORE_RX_BASE+8)) sr_8 + setting_reg #(.my_addr(BASE+5)) sr_8 (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out({UNUSED_2,muxctrl}),.changed()); wire [1:0] gpio_ena; - setting_reg #(.my_addr(`DSP_CORE_RX_BASE+9)) sr_9 + setting_reg #(.my_addr(BASE+6)) sr_9 (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out({UNUSED_3,gpio_ena}),.changed()); diff --git a/usrp2/sdr_lib/dsp_core_rx_old.v b/usrp2/sdr_lib/dsp_core_rx_old.v new file mode 100644 index 000000000..ba301e91b --- /dev/null +++ b/usrp2/sdr_lib/dsp_core_rx_old.v @@ -0,0 +1,183 @@ + +`define DSP_CORE_RX_BASE 160 +module dsp_core_rx_old + (input clk, input rst, + input set_stb, input [7:0] set_addr, input [31:0] set_data, + + input [13:0] adc_a, input adc_ovf_a, + input [13:0] adc_b, input adc_ovf_b, + + input [15:0] io_rx, + + output [31:0] sample, + input run, + output strobe, + output [31:0] debug + ); + + wire [15:0] scale_i, scale_q; + wire [13:0] adc_a_ofs, adc_b_ofs; + reg [13:0] adc_i, adc_q; + wire [31:0] phase_inc; + reg [31:0] phase; + + wire [35:0] prod_i, prod_q; + wire [23:0] i_cordic, q_cordic; + wire [23:0] i_cic, q_cic; + wire [17:0] i_cic_scaled, q_cic_scaled; + wire [17:0] i_hb1, q_hb1; + wire [17:0] i_hb2, q_hb2; + wire [15:0] i_out, q_out; + + wire strobe_cic, strobe_hb1, strobe_hb2; + wire enable_hb1, enable_hb2; + wire [7:0] cic_decim_rate; + + wire [31:10] UNUSED_1; + wire [31:4] UNUSED_2; + wire [31:2] UNUSED_3; + + setting_reg #(.my_addr(`DSP_CORE_RX_BASE+0)) sr_0 + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out(phase_inc),.changed()); + + setting_reg #(.my_addr(`DSP_CORE_RX_BASE+1)) sr_1 + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out({scale_i,scale_q}),.changed()); + + setting_reg #(.my_addr(`DSP_CORE_RX_BASE+2)) sr_2 + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out({UNUSED_1, enable_hb1, enable_hb2, cic_decim_rate}),.changed()); + + rx_dcoffset #(.WIDTH(14),.ADDR(`DSP_CORE_RX_BASE+6)) rx_dcoffset_a + (.clk(clk),.rst(rst),.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data), + .adc_in(adc_a),.adc_out(adc_a_ofs)); + + rx_dcoffset #(.WIDTH(14),.ADDR(`DSP_CORE_RX_BASE+7)) rx_dcoffset_b + (.clk(clk),.rst(rst),.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data), + .adc_in(adc_b),.adc_out(adc_b_ofs)); + + wire [3:0] muxctrl; + setting_reg #(.my_addr(`DSP_CORE_RX_BASE+8)) sr_8 + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out({UNUSED_2,muxctrl}),.changed()); + + wire [1:0] gpio_ena; + setting_reg #(.my_addr(`DSP_CORE_RX_BASE+9)) sr_9 + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out({UNUSED_3,gpio_ena}),.changed()); + + // The TVRX connects to what is called adc_b, thus A and B are + // swapped throughout the design. + // + // In the interest of expediency and keeping the s/w sane, we just remap them here. + // The I & Q fields are mapped the same: + // 0 -> "the real A" (as determined by the TVRX) + // 1 -> "the real B" + // 2 -> const zero + + always @(posedge clk) + case(muxctrl[1:0]) // The I mapping + 0: adc_i <= adc_b_ofs; // "the real A" + 1: adc_i <= adc_a_ofs; + 2: adc_i <= 0; + default: adc_i <= 0; + endcase // case(muxctrl[1:0]) + + always @(posedge clk) + case(muxctrl[3:2]) // The Q mapping + 0: adc_q <= adc_b_ofs; // "the real A" + 1: adc_q <= adc_a_ofs; + 2: adc_q <= 0; + default: adc_q <= 0; + endcase // case(muxctrl[3:2]) + + always @(posedge clk) + if(rst) + phase <= 0; + else if(~run) + phase <= 0; + else + phase <= phase + phase_inc; + + MULT18X18S mult_i + (.P(prod_i), // 36-bit multiplier output + .A({{4{adc_i[13]}},adc_i} ), // 18-bit multiplier input + .B({{2{scale_i[15]}},scale_i}), // 18-bit multiplier input + .C(clk), // Clock input + .CE(1), // Clock enable input + .R(rst) // Synchronous reset input + ); + + MULT18X18S mult_q + (.P(prod_q), // 36-bit multiplier output + .A({{4{adc_q[13]}},adc_q} ), // 18-bit multiplier input + .B({{2{scale_q[15]}},scale_q}), // 18-bit multiplier input + .C(clk), // Clock input + .CE(1), // Clock enable input + .R(rst) // Synchronous reset input + ); + + + cordic_z24 #(.bitwidth(24)) + cordic(.clock(clk), .reset(rst), .enable(run), + .xi(prod_i[23:0]),. yi(prod_q[23:0]), .zi(phase[31:8]), + .xo(i_cordic),.yo(q_cordic),.zo() ); + + cic_strober cic_strober(.clock(clk),.reset(rst),.enable(run),.rate(cic_decim_rate), + .strobe_fast(1),.strobe_slow(strobe_cic) ); + + cic_decim #(.bw(24)) + decim_i (.clock(clk),.reset(rst),.enable(run), + .rate(cic_decim_rate),.strobe_in(1'b1),.strobe_out(strobe_cic), + .signal_in(i_cordic),.signal_out(i_cic)); + + cic_decim #(.bw(24)) + decim_q (.clock(clk),.reset(rst),.enable(run), + .rate(cic_decim_rate),.strobe_in(1'b1),.strobe_out(strobe_cic), + .signal_in(q_cordic),.signal_out(q_cic)); + + round_reg #(.bits_in(24),.bits_out(18)) round_icic (.clk(clk),.in(i_cic),.out(i_cic_scaled)); + round_reg #(.bits_in(24),.bits_out(18)) round_qcic (.clk(clk),.in(q_cic),.out(q_cic_scaled)); + reg strobe_cic_d1; + always @(posedge clk) strobe_cic_d1 <= strobe_cic; + + small_hb_dec #(.WIDTH(18)) small_hb_i + (.clk(clk),.rst(rst),.bypass(~enable_hb1),.run(run), + .stb_in(strobe_cic_d1),.data_in(i_cic_scaled),.stb_out(strobe_hb1),.data_out(i_hb1)); + + small_hb_dec #(.WIDTH(18)) small_hb_q + (.clk(clk),.rst(rst),.bypass(~enable_hb1),.run(run), + .stb_in(strobe_cic_d1),.data_in(q_cic_scaled),.stb_out(),.data_out(q_hb1)); + + wire [8:0] cpi_hb = enable_hb1 ? {cic_decim_rate,1'b0} : {1'b0,cic_decim_rate}; + hb_dec #(.IWIDTH(18), .OWIDTH(18), .CWIDTH(18), .ACCWIDTH(24)) hb_i + (.clk(clk),.rst(rst),.bypass(~enable_hb2),.run(run),.cpi(cpi_hb), + .stb_in(strobe_hb1),.data_in(i_hb1),.stb_out(strobe_hb2),.data_out(i_hb2)); + + hb_dec #(.IWIDTH(18), .OWIDTH(18), .CWIDTH(18), .ACCWIDTH(24)) hb_q + (.clk(clk),.rst(rst),.bypass(~enable_hb2),.run(run),.cpi(cpi_hb), + .stb_in(strobe_hb1),.data_in(q_hb1),.stb_out(),.data_out(q_hb2)); + + round #(.bits_in(18),.bits_out(16)) round_iout (.in(i_hb2),.out(i_out)); + round #(.bits_in(18),.bits_out(16)) round_qout (.in(q_hb2),.out(q_out)); + + // Streaming GPIO + // + // io_rx[15] => I channel LSB if gpio_ena[0] high + // io_rx[14] => Q channel LSB if gpio_ena[1] high + + reg [31:0] sample_reg; + always @(posedge clk) + begin + sample_reg[31:17] <= i_out[15:1]; + sample_reg[15:1] <= q_out[15:1]; + sample_reg[16] <= gpio_ena[0] ? io_rx[15] : i_out[0]; + sample_reg[0] <= gpio_ena[1] ? io_rx[14] : q_out[0]; + end + + assign sample = sample_reg; + assign strobe = strobe_hb2; + assign debug = {enable_hb1, enable_hb2, run, strobe, strobe_cic, strobe_cic_d1, strobe_hb1, strobe_hb2}; + +endmodule // dsp_core_rx diff --git a/usrp2/serdes/Makefile.srcs b/usrp2/serdes/Makefile.srcs new file mode 100644 index 000000000..bade46ad1 --- /dev/null +++ b/usrp2/serdes/Makefile.srcs @@ -0,0 +1,14 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# SERDES Sources +################################################## +SERDES_SRCS = $(abspath $(addprefix $(BASE_DIR)/../serdes/, \ +serdes.v \ +serdes_fc_rx.v \ +serdes_fc_tx.v \ +serdes_rx.v \ +serdes_tx.v \ +)) diff --git a/usrp2/simple_gemac/Makefile.srcs b/usrp2/simple_gemac/Makefile.srcs new file mode 100644 index 000000000..6480cd5a4 --- /dev/null +++ b/usrp2/simple_gemac/Makefile.srcs @@ -0,0 +1,26 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Simple GEMAC Sources +################################################## +SIMPLE_GEMAC_SRCS = $(abspath $(addprefix $(BASE_DIR)/../simple_gemac/, \ +simple_gemac_wrapper.v \ +simple_gemac_wrapper19.v \ +simple_gemac.v \ +simple_gemac_wb.v \ +simple_gemac_tx.v \ +simple_gemac_rx.v \ +crc.v \ +delay_line.v \ +flow_ctrl_tx.v \ +flow_ctrl_rx.v \ +address_filter.v \ +ll8_to_txmac.v \ +rxmac_to_ll8.v \ +miim/eth_miim.v \ +miim/eth_clockgen.v \ +miim/eth_outputcontrol.v \ +miim/eth_shiftreg.v \ +)) diff --git a/usrp2/timing/Makefile.srcs b/usrp2/timing/Makefile.srcs new file mode 100644 index 000000000..0cf9372d3 --- /dev/null +++ b/usrp2/timing/Makefile.srcs @@ -0,0 +1,16 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# Timing Sources +################################################## +TIMING_SRCS = $(abspath $(addprefix $(BASE_DIR)/../timing/, \ +time_64bit.v \ +time_compare.v \ +time_receiver.v \ +time_sender.v \ +time_sync.v \ +timer.v \ +simple_timer.v \ +)) diff --git a/usrp2/top/Makefile.common b/usrp2/top/Makefile.common new file mode 100644 index 000000000..25c48d31a --- /dev/null +++ b/usrp2/top/Makefile.common @@ -0,0 +1,84 @@ +# +# Copyright 2008, 2009, 2010 Ettus Research LLC +# + +################################################## +# Constants +################################################## +BASE_DIR = $(abspath ..) +ISE_HELPER = xtclsh /home/matt/sourcerepo/mobfleet/system_board/fpga/scripts/ise_helper.tcl +#ISE_HELPER = xtclsh $(BASE_DIR)/tcl/ise_helper.tcl +ISE_FILE = $(BUILD_DIR)/$(TOP_MODULE).ise +BIN_FILE = $(BUILD_DIR)/$(TOP_MODULE).bit +MAKE_ACE = $(BUILD_DIR)/make_ace.cmd +ACE_FILE = $(BUILD_DIR)/xilinx.sys +MCS_FILE = $(BUILD_DIR)/$(TOP_MODULE).mcs +IMPACT_CMD = $(BUILD_DIR)/impact.cmd +IMPACT_CDF = $(BUILD_DIR)/impact.cdf + +################################################## +# Global Targets +################################################## +all: bin + +proj: $(ISE_FILE) + +check: $(ISE_FILE) + $(ISE_HELPER) "Check Syntax" + +synth: $(ISE_FILE) + $(ISE_HELPER) "Synthesize - XST" + +bin: $(BIN_FILE) + +ace: $(ACE_FILE) + +mcs: $(MCS_FILE) + +clean: + $(RM) -r $(BUILD_DIR) + +XIL_IMPACT_USE_LIBUSB=1 +jtag-install: $(IMPACT_CMD) + impact -batch $< + +.PHONY: all proj check synth bin ace mcs clean jtag-install + +################################################## +# Dependency Targets +################################################## +$(ISE_FILE): $(SOURCES) + @echo $@ + $(ISE_HELPER) "" + +$(BIN_FILE): $(ISE_FILE) + @echo $@ + $(ISE_HELPER) "Generate Programming File" + touch $@ + +$(MAKE_ACE): $(BASE_DIR)/scripts/make_ace.cmd.in + sed \ + -e 's|@BUILD_DIR[@]|$(BUILD_DIR)|g' \ + -e 's|@TOP_MODULE[@]|$(TOP_MODULE)|g' \ + -e 's|@BIN_FILE[@]|$(BIN_FILE)|g' \ + $< > $@ + +$(ACE_FILE): $(BIN_FILE) $(MAKE_ACE) + @echo $@ + impact -batch $(MAKE_ACE) + +$(MCS_FILE): $(BIN_FILE) + promgen -w -spi -p mcs -o $(MCS_FILE) -s 4096 -u 0 $(BIN_FILE) + +$(IMPACT_CDF): $(BASE_DIR)/scripts/impact.cdf.in + sed \ + -e 's|@BIN_FILE[@]|$(BIN_FILE)|g' \ + $< > $@ + +$(IMPACT_CMD): $(BASE_DIR)/scripts/impact.cmd.in $(IMPACT_CDF) + sed \ + -e 's|@PART_NAME[@]|xc5vsx50t|g' \ + -e 's|@CDF_FILE[@]|$(IMPACT_CDF)|g' \ + $< > $@ + +.EXPORT_ALL_VARIABLES: diff --git a/usrp2/top/u2_rev3/Makefile b/usrp2/top/u2_rev3/Makefile index 3a8edc9ac..86e5bf979 100644 --- a/usrp2/top/u2_rev3/Makefile +++ b/usrp2/top/u2_rev3/Makefile @@ -1,42 +1,30 @@ # # Copyright 2008 Ettus Research LLC -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# +# -################################################## -# xtclsh Shell and tcl Script Path -################################################## -#XTCLSH := /opt/Xilinx/10.1/ISE/bin/lin/xtclsh -XTCLSH := xtclsh -ISE_HELPER := ../tcl/ise_helper.tcl +include ../Makefile.common +include ../../fifo/Makefile.srcs +include ../../control_lib/Makefile.srcs +include ../../sdr_lib/Makefile.srcs +include ../../serdes/Makefile.srcs +include ../../simple_gemac/Makefile.srcs +include ../../timing/Makefile.srcs +include ../../opencores/Makefile.srcs +include ../../vrt/Makefile.srcs +include ../../udp/Makefile.srcs +include ../../coregen/Makefile.srcs +include ../../extram/Makefile.srcs ################################################## # Project Setup ################################################## -BUILD_DIR := build$(ISE)/ -export TOP_MODULE := u2_rev3 -export PROJ_FILE := $(BUILD_DIR)$(TOP_MODULE).ise +TOP_MODULE = u2_rev3 +BUILD_DIR = $(abspath build$(ISE)) ################################################## # Project Properties ################################################## -export PROJECT_PROPERTIES := \ +PROJECT_PROPERTIES = \ family Spartan3 \ device xc3s2000 \ package fg456 \ @@ -51,159 +39,20 @@ simulator "ISE Simulator (VHDL/Verilog)" \ ################################################## # Sources ################################################## -export SOURCE_ROOT := ../../../ -export SOURCES := \ -control_lib/CRC16_D16.v \ -control_lib/atr_controller.v \ -control_lib/bin2gray.v \ -control_lib/dcache.v \ -control_lib/decoder_3_8.v \ -control_lib/dpram32.v \ -control_lib/gray2bin.v \ -control_lib/gray_send.v \ -control_lib/icache.v \ -control_lib/mux4.v \ -control_lib/mux8.v \ -control_lib/nsgpio.v \ -control_lib/ram_2port.v \ -control_lib/ram_harv_cache.v \ -control_lib/ram_loader.v \ -control_lib/setting_reg.v \ -control_lib/settings_bus.v \ -control_lib/settings_bus_crossclock.v \ -control_lib/srl.v \ -control_lib/system_control.v \ -control_lib/wb_1master.v \ -control_lib/wb_readback_mux.v \ -control_lib/simple_uart.v \ -control_lib/simple_uart_tx.v \ -control_lib/simple_uart_rx.v \ -control_lib/oneshot_2clk.v \ -control_lib/sd_spi.v \ -control_lib/sd_spi_wb.v \ -control_lib/wb_bridge_16_32.v \ -control_lib/reset_sync.v \ -control_lib/priority_enc.v \ -control_lib/pic.v \ -vrt/vita_rx_control.v \ -vrt/vita_rx_framer.v \ -vrt/vita_tx_control.v \ -vrt/vita_tx_deframer.v \ -udp/udp_wrapper.v \ -udp/fifo19_rxrealign.v \ -udp/prot_eng_tx.v \ -udp/add_onescomp.v \ -simple_gemac/simple_gemac_wrapper.v \ -simple_gemac/simple_gemac_wrapper19.v \ -simple_gemac/simple_gemac.v \ -simple_gemac/simple_gemac_wb.v \ -simple_gemac/simple_gemac_tx.v \ -simple_gemac/simple_gemac_rx.v \ -simple_gemac/crc.v \ -simple_gemac/delay_line.v \ -simple_gemac/flow_ctrl_tx.v \ -simple_gemac/flow_ctrl_rx.v \ -simple_gemac/address_filter.v \ -simple_gemac/ll8_to_txmac.v \ -simple_gemac/rxmac_to_ll8.v \ -simple_gemac/miim/eth_miim.v \ -simple_gemac/miim/eth_clockgen.v \ -simple_gemac/miim/eth_outputcontrol.v \ -simple_gemac/miim/eth_shiftreg.v \ -control_lib/newfifo/buffer_int.v \ -control_lib/newfifo/buffer_pool.v \ -control_lib/newfifo/fifo_2clock.v \ -control_lib/newfifo/fifo_2clock_cascade.v \ -control_lib/newfifo/ll8_shortfifo.v \ -control_lib/newfifo/fifo_short.v \ -control_lib/newfifo/fifo_long.v \ -control_lib/newfifo/fifo_cascade.v \ -control_lib/newfifo/fifo36_to_ll8.v \ -control_lib/newfifo/ll8_to_fifo36.v \ -control_lib/newfifo/fifo19_to_ll8.v \ -control_lib/newfifo/ll8_to_fifo19.v \ -control_lib/newfifo/fifo36_to_fifo19.v \ -control_lib/newfifo/fifo19_to_fifo36.v \ -control_lib/longfifo.v \ -control_lib/shortfifo.v \ -control_lib/medfifo.v \ -coregen/fifo_xlnx_2Kx36_2clk.v \ -coregen/fifo_xlnx_2Kx36_2clk.xco \ -coregen/fifo_xlnx_512x36_2clk.v \ -coregen/fifo_xlnx_512x36_2clk.xco \ -coregen/fifo_xlnx_64x36_2clk.v \ -coregen/fifo_xlnx_64x36_2clk.xco \ -coregen/fifo_xlnx_16x19_2clk.v \ -coregen/fifo_xlnx_16x19_2clk.xco \ -coregen/fifo_xlnx_16x40_2clk.v \ -coregen/fifo_xlnx_16x40_2clk.xco \ -extram/wb_zbt16_b.v \ -opencores/8b10b/decode_8b10b.v \ -opencores/8b10b/encode_8b10b.v \ -opencores/aemb/rtl/verilog/aeMB_bpcu.v \ -opencores/aemb/rtl/verilog/aeMB_core_BE.v \ -opencores/aemb/rtl/verilog/aeMB_ctrl.v \ -opencores/aemb/rtl/verilog/aeMB_edk32.v \ -opencores/aemb/rtl/verilog/aeMB_ibuf.v \ -opencores/aemb/rtl/verilog/aeMB_regf.v \ -opencores/aemb/rtl/verilog/aeMB_xecu.v \ -opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v \ -opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v \ -opencores/i2c/rtl/verilog/i2c_master_defines.v \ -opencores/i2c/rtl/verilog/i2c_master_top.v \ -opencores/i2c/rtl/verilog/timescale.v \ -opencores/spi/rtl/verilog/spi_clgen.v \ -opencores/spi/rtl/verilog/spi_defines.v \ -opencores/spi/rtl/verilog/spi_shift.v \ -opencores/spi/rtl/verilog/spi_top.v \ -opencores/spi/rtl/verilog/timescale.v \ -sdr_lib/acc.v \ -sdr_lib/add2.v \ -sdr_lib/add2_and_round.v \ -sdr_lib/add2_and_round_reg.v \ -sdr_lib/add2_reg.v \ -sdr_lib/cic_dec_shifter.v \ -sdr_lib/cic_decim.v \ -sdr_lib/cic_int_shifter.v \ -sdr_lib/cic_interp.v \ -sdr_lib/cic_strober.v \ -sdr_lib/clip.v \ -sdr_lib/clip_reg.v \ -sdr_lib/cordic.v \ -sdr_lib/cordic_z24.v \ -sdr_lib/cordic_stage.v \ -sdr_lib/dsp_core_rx.v \ -sdr_lib/dsp_core_tx.v \ -sdr_lib/hb_dec.v \ -sdr_lib/hb_interp.v \ -sdr_lib/round.v \ -sdr_lib/round_reg.v \ -sdr_lib/rx_control.v \ -sdr_lib/rx_dcoffset.v \ -sdr_lib/sign_extend.v \ -sdr_lib/small_hb_dec.v \ -sdr_lib/small_hb_int.v \ -sdr_lib/tx_control.v \ -serdes/serdes.v \ -serdes/serdes_fc_rx.v \ -serdes/serdes_fc_tx.v \ -serdes/serdes_rx.v \ -serdes/serdes_tx.v \ -timing/time_64bit.v \ -timing/time_compare.v \ -timing/time_receiver.v \ -timing/time_sender.v \ -timing/time_sync.v \ -timing/timer.v \ -timing/simple_timer.v \ -top/u2_rev3/u2_core.v \ -top/u2_rev3/u2_rev3.ucf \ -top/u2_rev3/u2_rev3.v +TOP_SRCS = \ +u2_core.v \ +u2_rev3.v \ +u2_rev3.ucf + +SOURCES = $(abspath $(TOP_SRCS)) $(FIFO_SRCS) \ +$(CONTROL_LIB_SRCS) $(SDR_LIB_SRCS) $(SERDES_SRCS) \ +$(SIMPLE_GEMAC_SRCS) $(TIMING_SRCS) $(OPENCORES_SRCS) \ +$(VRT_SRCS) $(UDP_SRCS) $(COREGEN_SRCS) $(EXTRAM_SRCS) ################################################## # Process Properties ################################################## -export SYNTHESIZE_PROPERTIES := \ +SYNTHESIZE_PROPERTIES = \ "Number of Clock Buffers" 8 \ "Pack I/O Registers into IOBs" Yes \ "Optimization Effort" High \ @@ -213,10 +62,10 @@ export SYNTHESIZE_PROPERTIES := \ "Use Synchronous Reset" Auto \ "Use Synchronous Set" Auto -export TRANSLATE_PROPERTIES := \ +TRANSLATE_PROPERTIES = \ "Macro Search Path" "$(shell pwd)/../../coregen/" -export MAP_PROPERTIES := \ +MAP_PROPERTIES = \ "Allow Logic Optimization Across Hierarchy" TRUE \ "Map to Input Functions" 4 \ "Optimization Strategy (Cover Mode)" Speed \ @@ -227,41 +76,18 @@ export MAP_PROPERTIES := \ "Combinatorial Logic Optimization" TRUE \ "Register Duplication" TRUE -export PLACE_ROUTE_PROPERTIES := \ +PLACE_ROUTE_PROPERTIES = \ "Place & Route Effort Level (Overall)" High -export STATIC_TIMING_PROPERTIES := \ +STATIC_TIMING_PROPERTIES = \ "Number of Paths in Error/Verbose Report" 10 \ "Report Type" "Error Report" -export GEN_PROG_FILE_PROPERTIES := \ +GEN_PROG_FILE_PROPERTIES = \ "Configuration Rate" 6 \ "Create Binary Configuration File" TRUE \ "Done (Output Events)" 5 \ "Enable Bitstream Compression" TRUE \ "Enable Outputs (Output Events)" 6 -export SIM_MODEL_PROPERTIES := "" - -################################################## -# Make Options -################################################## -all: - @echo make proj, check, synth, bin, or clean - -proj: - PROCESS_RUN="" $(XTCLSH) $(ISE_HELPER) - -check: - PROCESS_RUN="Check Syntax" $(XTCLSH) $(ISE_HELPER) - -synth: - PROCESS_RUN="Synthesize - XST" $(XTCLSH) $(ISE_HELPER) - -bin: - PROCESS_RUN="Generate Programming File" $(XTCLSH) $(ISE_HELPER) - -clean: - rm -rf $(BUILD_DIR) - - +SIM_MODEL_PROPERTIES = "" diff --git a/usrp2/top/u2_rev3/Makefile.udp b/usrp2/top/u2_rev3/Makefile.udp index f6e6e5b15..90a5d88be 100644 --- a/usrp2/top/u2_rev3/Makefile.udp +++ b/usrp2/top/u2_rev3/Makefile.udp @@ -1,42 +1,30 @@ # # Copyright 2008 Ettus Research LLC -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# +# -################################################## -# xtclsh Shell and tcl Script Path -################################################## -#XTCLSH := /opt/Xilinx/10.1/ISE/bin/lin/xtclsh -XTCLSH := xtclsh -ISE_HELPER := ../tcl/ise_helper.tcl +include ../Makefile.common +include ../../fifo/Makefile.srcs +include ../../control_lib/Makefile.srcs +include ../../sdr_lib/Makefile.srcs +include ../../serdes/Makefile.srcs +include ../../simple_gemac/Makefile.srcs +include ../../timing/Makefile.srcs +include ../../opencores/Makefile.srcs +include ../../vrt/Makefile.srcs +include ../../udp/Makefile.srcs +include ../../coregen/Makefile.srcs +include ../../extram/Makefile.srcs ################################################## # Project Setup ################################################## -BUILD_DIR := build-udp$(ISE)/ -export TOP_MODULE := u2_rev3 -export PROJ_FILE := $(BUILD_DIR)$(TOP_MODULE).ise +TOP_MODULE = u2_rev3 +BUILD_DIR = $(abspath build-udp$(ISE)) ################################################## # Project Properties ################################################## -export PROJECT_PROPERTIES := \ +PROJECT_PROPERTIES = \ family Spartan3 \ device xc3s2000 \ package fg456 \ @@ -51,159 +39,20 @@ simulator "ISE Simulator (VHDL/Verilog)" \ ################################################## # Sources ################################################## -export SOURCE_ROOT := ../../../ -export SOURCES := \ -control_lib/CRC16_D16.v \ -control_lib/atr_controller.v \ -control_lib/bin2gray.v \ -control_lib/dcache.v \ -control_lib/decoder_3_8.v \ -control_lib/dpram32.v \ -control_lib/gray2bin.v \ -control_lib/gray_send.v \ -control_lib/icache.v \ -control_lib/mux4.v \ -control_lib/mux8.v \ -control_lib/nsgpio.v \ -control_lib/ram_2port.v \ -control_lib/ram_harv_cache.v \ -control_lib/ram_loader.v \ -control_lib/setting_reg.v \ -control_lib/settings_bus.v \ -control_lib/settings_bus_crossclock.v \ -control_lib/srl.v \ -control_lib/system_control.v \ -control_lib/wb_1master.v \ -control_lib/wb_readback_mux.v \ -control_lib/simple_uart.v \ -control_lib/simple_uart_tx.v \ -control_lib/simple_uart_rx.v \ -control_lib/oneshot_2clk.v \ -control_lib/sd_spi.v \ -control_lib/sd_spi_wb.v \ -control_lib/wb_bridge_16_32.v \ -control_lib/reset_sync.v \ -control_lib/priority_enc.v \ -control_lib/pic.v \ -vrt/vita_rx_control.v \ -vrt/vita_rx_framer.v \ -vrt/vita_tx_control.v \ -vrt/vita_tx_deframer.v \ -udp/udp_wrapper.v \ -udp/fifo19_rxrealign.v \ -udp/prot_eng_tx.v \ -udp/add_onescomp.v \ -simple_gemac/simple_gemac_wrapper.v \ -simple_gemac/simple_gemac_wrapper19.v \ -simple_gemac/simple_gemac.v \ -simple_gemac/simple_gemac_wb.v \ -simple_gemac/simple_gemac_tx.v \ -simple_gemac/simple_gemac_rx.v \ -simple_gemac/crc.v \ -simple_gemac/delay_line.v \ -simple_gemac/flow_ctrl_tx.v \ -simple_gemac/flow_ctrl_rx.v \ -simple_gemac/address_filter.v \ -simple_gemac/ll8_to_txmac.v \ -simple_gemac/rxmac_to_ll8.v \ -simple_gemac/miim/eth_miim.v \ -simple_gemac/miim/eth_clockgen.v \ -simple_gemac/miim/eth_outputcontrol.v \ -simple_gemac/miim/eth_shiftreg.v \ -control_lib/newfifo/buffer_int.v \ -control_lib/newfifo/buffer_pool.v \ -control_lib/newfifo/fifo_2clock.v \ -control_lib/newfifo/fifo_2clock_cascade.v \ -control_lib/newfifo/ll8_shortfifo.v \ -control_lib/newfifo/fifo_short.v \ -control_lib/newfifo/fifo_long.v \ -control_lib/newfifo/fifo_cascade.v \ -control_lib/newfifo/fifo36_to_ll8.v \ -control_lib/newfifo/ll8_to_fifo36.v \ -control_lib/newfifo/fifo19_to_ll8.v \ -control_lib/newfifo/ll8_to_fifo19.v \ -control_lib/newfifo/fifo36_to_fifo19.v \ -control_lib/newfifo/fifo19_to_fifo36.v \ -control_lib/longfifo.v \ -control_lib/shortfifo.v \ -control_lib/medfifo.v \ -coregen/fifo_xlnx_2Kx36_2clk.v \ -coregen/fifo_xlnx_2Kx36_2clk.xco \ -coregen/fifo_xlnx_512x36_2clk.v \ -coregen/fifo_xlnx_512x36_2clk.xco \ -coregen/fifo_xlnx_64x36_2clk.v \ -coregen/fifo_xlnx_64x36_2clk.xco \ -coregen/fifo_xlnx_16x19_2clk.v \ -coregen/fifo_xlnx_16x19_2clk.xco \ -coregen/fifo_xlnx_16x40_2clk.v \ -coregen/fifo_xlnx_16x40_2clk.xco \ -extram/wb_zbt16_b.v \ -opencores/8b10b/decode_8b10b.v \ -opencores/8b10b/encode_8b10b.v \ -opencores/aemb/rtl/verilog/aeMB_bpcu.v \ -opencores/aemb/rtl/verilog/aeMB_core_BE.v \ -opencores/aemb/rtl/verilog/aeMB_ctrl.v \ -opencores/aemb/rtl/verilog/aeMB_edk32.v \ -opencores/aemb/rtl/verilog/aeMB_ibuf.v \ -opencores/aemb/rtl/verilog/aeMB_regf.v \ -opencores/aemb/rtl/verilog/aeMB_xecu.v \ -opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v \ -opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v \ -opencores/i2c/rtl/verilog/i2c_master_defines.v \ -opencores/i2c/rtl/verilog/i2c_master_top.v \ -opencores/i2c/rtl/verilog/timescale.v \ -opencores/spi/rtl/verilog/spi_clgen.v \ -opencores/spi/rtl/verilog/spi_defines.v \ -opencores/spi/rtl/verilog/spi_shift.v \ -opencores/spi/rtl/verilog/spi_top.v \ -opencores/spi/rtl/verilog/timescale.v \ -sdr_lib/acc.v \ -sdr_lib/add2.v \ -sdr_lib/add2_and_round.v \ -sdr_lib/add2_and_round_reg.v \ -sdr_lib/add2_reg.v \ -sdr_lib/cic_dec_shifter.v \ -sdr_lib/cic_decim.v \ -sdr_lib/cic_int_shifter.v \ -sdr_lib/cic_interp.v \ -sdr_lib/cic_strober.v \ -sdr_lib/clip.v \ -sdr_lib/clip_reg.v \ -sdr_lib/cordic.v \ -sdr_lib/cordic_z24.v \ -sdr_lib/cordic_stage.v \ -sdr_lib/dsp_core_rx_udp.v \ -sdr_lib/dsp_core_tx.v \ -sdr_lib/hb_dec.v \ -sdr_lib/hb_interp.v \ -sdr_lib/round.v \ -sdr_lib/round_reg.v \ -sdr_lib/rx_control.v \ -sdr_lib/rx_dcoffset.v \ -sdr_lib/sign_extend.v \ -sdr_lib/small_hb_dec.v \ -sdr_lib/small_hb_int.v \ -sdr_lib/tx_control.v \ -serdes/serdes.v \ -serdes/serdes_fc_rx.v \ -serdes/serdes_fc_tx.v \ -serdes/serdes_rx.v \ -serdes/serdes_tx.v \ -timing/time_64bit.v \ -timing/time_compare.v \ -timing/time_receiver.v \ -timing/time_sender.v \ -timing/time_sync.v \ -timing/timer.v \ -timing/simple_timer.v \ -top/u2_rev3/u2_core_udp.v \ -top/u2_rev3/u2_rev3.ucf \ -top/u2_rev3/u2_rev3.v +TOP_SRCS = \ +u2_core_udp.v \ +u2_rev3.v \ +u2_rev3.ucf + +SOURCES = $(abspath $(TOP_SRCS)) $(FIFO_SRCS) \ +$(CONTROL_LIB_SRCS) $(SDR_LIB_SRCS) $(SERDES_SRCS) \ +$(SIMPLE_GEMAC_SRCS) $(TIMING_SRCS) $(OPENCORES_SRCS) \ +$(VRT_SRCS) $(UDP_SRCS) $(COREGEN_SRCS) $(EXTRAM_SRCS) ################################################## # Process Properties ################################################## -export SYNTHESIZE_PROPERTIES := \ +SYNTHESIZE_PROPERTIES = \ "Number of Clock Buffers" 8 \ "Pack I/O Registers into IOBs" Yes \ "Optimization Effort" High \ @@ -213,10 +62,10 @@ export SYNTHESIZE_PROPERTIES := \ "Use Synchronous Reset" Auto \ "Use Synchronous Set" Auto -export TRANSLATE_PROPERTIES := \ +TRANSLATE_PROPERTIES = \ "Macro Search Path" "$(shell pwd)/../../coregen/" -export MAP_PROPERTIES := \ +MAP_PROPERTIES = \ "Allow Logic Optimization Across Hierarchy" TRUE \ "Map to Input Functions" 4 \ "Optimization Strategy (Cover Mode)" Speed \ @@ -227,41 +76,18 @@ export MAP_PROPERTIES := \ "Combinatorial Logic Optimization" TRUE \ "Register Duplication" TRUE -export PLACE_ROUTE_PROPERTIES := \ +PLACE_ROUTE_PROPERTIES = \ "Place & Route Effort Level (Overall)" High -export STATIC_TIMING_PROPERTIES := \ +STATIC_TIMING_PROPERTIES = \ "Number of Paths in Error/Verbose Report" 10 \ "Report Type" "Error Report" -export GEN_PROG_FILE_PROPERTIES := \ +GEN_PROG_FILE_PROPERTIES = \ "Configuration Rate" 6 \ "Create Binary Configuration File" TRUE \ "Done (Output Events)" 5 \ "Enable Bitstream Compression" TRUE \ "Enable Outputs (Output Events)" 6 -export SIM_MODEL_PROPERTIES := "" - -################################################## -# Make Options -################################################## -all: - @echo make proj, check, synth, bin, or clean - -proj: - PROCESS_RUN="" $(XTCLSH) $(ISE_HELPER) - -check: - PROCESS_RUN="Check Syntax" $(XTCLSH) $(ISE_HELPER) - -synth: - PROCESS_RUN="Synthesize - XST" $(XTCLSH) $(ISE_HELPER) - -bin: - PROCESS_RUN="Generate Programming File" $(XTCLSH) $(ISE_HELPER) - -clean: - rm -rf $(BUILD_DIR) - - +SIM_MODEL_PROPERTIES = "" diff --git a/usrp2/top/u2_rev3/u2_core.v b/usrp2/top/u2_rev3/u2_core.v index c2e1bab63..b67d8edd6 100755..100644 --- a/usrp2/top/u2_rev3/u2_core.v +++ b/usrp2/top/u2_rev3/u2_core.v @@ -582,8 +582,7 @@ module u2_core .fifo_occupied(dsp_rx_occ),.fifo_full(dsp_rx_full),.fifo_empty(dsp_rx_empty), .debug_rx(debug_rx) ); - // dummy_rx dsp_core_rx - dsp_core_rx dsp_core_rx + dsp_core_rx_old dsp_core_rx_old (.clk(dsp_clk),.rst(dsp_rst), .set_stb(set_stb_dsp),.set_addr(set_addr_dsp),.set_data(set_data_dsp), .adc_a(adc_a),.adc_ovf_a(adc_ovf_a),.adc_b(adc_b),.adc_ovf_b(adc_ovf_b), diff --git a/usrp2/udp/Makefile.srcs b/usrp2/udp/Makefile.srcs new file mode 100644 index 000000000..293094abe --- /dev/null +++ b/usrp2/udp/Makefile.srcs @@ -0,0 +1,13 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# UDP Sources +################################################## +UDP_SRCS = $(abspath $(addprefix $(BASE_DIR)/../udp/, \ +udp_wrapper.v \ +fifo19_rxrealign.v \ +prot_eng_tx.v \ +add_onescomp.v \ +)) diff --git a/usrp2/vrt/Makefile.srcs b/usrp2/vrt/Makefile.srcs new file mode 100644 index 000000000..07c62224b --- /dev/null +++ b/usrp2/vrt/Makefile.srcs @@ -0,0 +1,13 @@ +# +# Copyright 2010 Ettus Research LLC +# + +################################################## +# VRT Sources +################################################## +VRT_SRCS = $(abspath $(addprefix $(BASE_DIR)/../vrt/, \ +vita_rx_control.v \ +vita_rx_framer.v \ +vita_tx_control.v \ +vita_tx_deframer.v \ +)) |