summaryrefslogtreecommitdiff
path: root/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'usrp')
-rw-r--r--usrp/firmware/include/usrp_ids.h2
-rwxr-xr-xusrp/firmware/src/common/build_eeprom.py8
-rw-r--r--usrp/fpga/Makefile.am2
-rw-r--r--usrp/fpga/Makefile.extra181
-rw-r--r--usrp/fpga/README3
-rw-r--r--usrp/fpga/TODO23
-rwxr-xr-xusrp/fpga/gen_makefile_extra.py67
-rwxr-xr-xusrp/fpga/inband_lib/chan_fifo_reader.v219
-rw-r--r--usrp/fpga/inband_lib/channel_demux.v78
-rwxr-xr-xusrp/fpga/inband_lib/channel_ram.v107
-rwxr-xr-xusrp/fpga/inband_lib/cmd_reader.v305
-rwxr-xr-xusrp/fpga/inband_lib/packet_builder.v152
-rwxr-xr-xusrp/fpga/inband_lib/register_io.v82
-rwxr-xr-xusrp/fpga/inband_lib/rx_buffer_inband.v209
-rwxr-xr-xusrp/fpga/inband_lib/tx_buffer_inband.v143
-rw-r--r--usrp/fpga/inband_lib/tx_packer.v119
-rwxr-xr-xusrp/fpga/inband_lib/usb_packet_fifo.v112
-rw-r--r--usrp/fpga/megacells/.gitignore1
-rwxr-xr-xusrp/fpga/megacells/accum32.bsf86
-rwxr-xr-xusrp/fpga/megacells/accum32.cmp31
-rwxr-xr-xusrp/fpga/megacells/accum32.inc32
-rwxr-xr-xusrp/fpga/megacells/accum32.v765
-rwxr-xr-xusrp/fpga/megacells/accum32_bb.v35
-rwxr-xr-xusrp/fpga/megacells/accum32_inst.v7
-rwxr-xr-xusrp/fpga/megacells/add32.bsf62
-rwxr-xr-xusrp/fpga/megacells/add32.cmp29
-rwxr-xr-xusrp/fpga/megacells/add32.inc30
-rwxr-xr-xusrp/fpga/megacells/add32.v221
-rwxr-xr-xusrp/fpga/megacells/add32_bb.v31
-rwxr-xr-xusrp/fpga/megacells/add32_inst.v5
-rwxr-xr-xusrp/fpga/megacells/addsub16.bsf96
-rwxr-xr-xusrp/fpga/megacells/addsub16.cmp33
-rwxr-xr-xusrp/fpga/megacells/addsub16.inc34
-rwxr-xr-xusrp/fpga/megacells/addsub16.v438
-rwxr-xr-xusrp/fpga/megacells/addsub16_bb.v39
-rwxr-xr-xusrp/fpga/megacells/addsub16_inst.v9
-rwxr-xr-xusrp/fpga/megacells/bustri.bsf62
-rwxr-xr-xusrp/fpga/megacells/bustri.cmp29
-rwxr-xr-xusrp/fpga/megacells/bustri.inc30
-rwxr-xr-xusrp/fpga/megacells/bustri.v71
-rwxr-xr-xusrp/fpga/megacells/bustri_bb.v31
-rwxr-xr-xusrp/fpga/megacells/bustri_inst.v5
-rw-r--r--usrp/fpga/megacells/clk_doubler.v198
-rw-r--r--usrp/fpga/megacells/clk_doubler_bb.v143
-rw-r--r--usrp/fpga/megacells/dspclkpll.v237
-rw-r--r--usrp/fpga/megacells/dspclkpll_bb.v31
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16.bsf107
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16.cmp30
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16.inc31
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16.v175
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16_bb.v127
-rwxr-xr-xusrp/fpga/megacells/fifo_1kx16_inst.v12
-rw-r--r--usrp/fpga/megacells/fifo_2k.v3343
-rw-r--r--usrp/fpga/megacells/fifo_2k_bb.v131
-rw-r--r--usrp/fpga/megacells/fifo_4k.v3495
-rwxr-xr-xusrp/fpga/megacells/fifo_4k_18.v186
-rw-r--r--usrp/fpga/megacells/fifo_4k_bb.v131
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc.bsf117
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc.cmp31
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc.inc32
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc.v178
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc_bb.v130
-rwxr-xr-xusrp/fpga/megacells/fifo_4kx16_dc_inst.v13
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub.bsf80
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub.cmp31
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub.inc32
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub.v102
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub_bb.v35
-rwxr-xr-xusrp/fpga/megacells/mylpm_addsub_inst.v7
-rw-r--r--usrp/fpga/megacells/pll.v207
-rw-r--r--usrp/fpga/megacells/pll_bb.v29
-rw-r--r--usrp/fpga/megacells/pll_inst.v4
-rwxr-xr-xusrp/fpga/megacells/sub32.bsf87
-rwxr-xr-xusrp/fpga/megacells/sub32.cmp32
-rwxr-xr-xusrp/fpga/megacells/sub32.inc33
-rwxr-xr-xusrp/fpga/megacells/sub32.v675
-rwxr-xr-xusrp/fpga/megacells/sub32_bb.v37
-rwxr-xr-xusrp/fpga/megacells/sub32_inst.v8
-rw-r--r--usrp/fpga/models/bustri.v17
-rw-r--r--usrp/fpga/models/fifo.v82
-rw-r--r--usrp/fpga/models/fifo_1c_1k.v81
-rw-r--r--usrp/fpga/models/fifo_1c_2k.v81
-rw-r--r--usrp/fpga/models/fifo_1c_4k.v76
-rw-r--r--usrp/fpga/models/fifo_1k.v24
-rw-r--r--usrp/fpga/models/fifo_2k.v24
-rw-r--r--usrp/fpga/models/fifo_4k.v24
-rw-r--r--usrp/fpga/models/fifo_4k_18.v26
-rw-r--r--usrp/fpga/models/pll.v33
-rw-r--r--usrp/fpga/models/ssram.v38
-rw-r--r--usrp/fpga/sdr_lib/.gitignore2
-rw-r--r--usrp/fpga/sdr_lib/adc_interface.v71
-rw-r--r--usrp/fpga/sdr_lib/atr_delay.v83
-rw-r--r--usrp/fpga/sdr_lib/bidir_reg.v29
-rw-r--r--usrp/fpga/sdr_lib/cic_dec_shifter.v100
-rwxr-xr-xusrp/fpga/sdr_lib/cic_decim.v93
-rw-r--r--usrp/fpga/sdr_lib/cic_int_shifter.v94
-rwxr-xr-xusrp/fpga/sdr_lib/cic_interp.v90
-rwxr-xr-xusrp/fpga/sdr_lib/clk_divider.v43
-rwxr-xr-xusrp/fpga/sdr_lib/cordic.v109
-rwxr-xr-xusrp/fpga/sdr_lib/cordic_stage.v60
-rwxr-xr-xusrp/fpga/sdr_lib/ddc.v97
-rw-r--r--usrp/fpga/sdr_lib/dpram.v47
-rwxr-xr-xusrp/fpga/sdr_lib/duc.v95
-rw-r--r--usrp/fpga/sdr_lib/ext_fifo.v126
-rwxr-xr-xusrp/fpga/sdr_lib/gen_cordic_consts.py10
-rw-r--r--usrp/fpga/sdr_lib/gen_sync.v43
-rw-r--r--usrp/fpga/sdr_lib/hb/acc.v22
-rw-r--r--usrp/fpga/sdr_lib/hb/coeff_rom.v19
-rw-r--r--usrp/fpga/sdr_lib/hb/halfband_decim.v163
-rw-r--r--usrp/fpga/sdr_lib/hb/halfband_interp.v121
-rw-r--r--usrp/fpga/sdr_lib/hb/hbd_tb/HBD80
-rw-r--r--usrp/fpga/sdr_lib/hb/hbd_tb/really_golden142
-rw-r--r--usrp/fpga/sdr_lib/hb/hbd_tb/regression95
-rwxr-xr-xusrp/fpga/sdr_lib/hb/hbd_tb/run_hbd4
-rw-r--r--usrp/fpga/sdr_lib/hb/hbd_tb/test_hbd.v75
-rw-r--r--usrp/fpga/sdr_lib/hb/mac.v58
-rw-r--r--usrp/fpga/sdr_lib/hb/mult.v16
-rw-r--r--usrp/fpga/sdr_lib/hb/ram16_2port.v22
-rw-r--r--usrp/fpga/sdr_lib/hb/ram16_2sum.v27
-rw-r--r--usrp/fpga/sdr_lib/hb/ram32_2sum.v22
-rw-r--r--usrp/fpga/sdr_lib/io_pins.v52
-rw-r--r--usrp/fpga/sdr_lib/master_control.v163
-rw-r--r--usrp/fpga/sdr_lib/master_control_multi.v73
-rwxr-xr-xusrp/fpga/sdr_lib/phase_acc.v52
-rw-r--r--usrp/fpga/sdr_lib/ram.v16
-rw-r--r--usrp/fpga/sdr_lib/ram16.v17
-rw-r--r--usrp/fpga/sdr_lib/ram32.v17
-rw-r--r--usrp/fpga/sdr_lib/ram64.v16
-rw-r--r--usrp/fpga/sdr_lib/rssi.v30
-rw-r--r--usrp/fpga/sdr_lib/rx_buffer.v237
-rw-r--r--usrp/fpga/sdr_lib/rx_chain.v106
-rw-r--r--usrp/fpga/sdr_lib/rx_chain_dual.v103
-rw-r--r--usrp/fpga/sdr_lib/rx_dcoffset.v22
-rw-r--r--usrp/fpga/sdr_lib/serial_io.v118
-rw-r--r--usrp/fpga/sdr_lib/setting_reg.v23
-rw-r--r--usrp/fpga/sdr_lib/setting_reg_masked.v26
-rw-r--r--usrp/fpga/sdr_lib/sign_extend.v35
-rw-r--r--usrp/fpga/sdr_lib/strobe_gen.v46
-rw-r--r--usrp/fpga/sdr_lib/tx_buffer.v170
-rw-r--r--usrp/fpga/sdr_lib/tx_chain.v65
-rw-r--r--usrp/fpga/sdr_lib/tx_chain_hb.v76
-rw-r--r--usrp/fpga/tb/.gitignore3
-rw-r--r--usrp/fpga/tb/cbus_tb.v71
-rw-r--r--usrp/fpga/tb/cordic_tb.v61
-rw-r--r--usrp/fpga/tb/decim_tb.v108
-rwxr-xr-xusrp/fpga/tb/fullchip_tb.v174
-rwxr-xr-xusrp/fpga/tb/interp_tb.v108
-rw-r--r--usrp/fpga/tb/justinterp_tb.v73
-rwxr-xr-xusrp/fpga/tb/makesine.pl14
-rwxr-xr-xusrp/fpga/tb/run_cordic4
-rwxr-xr-xusrp/fpga/tb/run_fullchip4
-rwxr-xr-xusrp/fpga/tb/usrp_tasks.v145
-rw-r--r--usrp/fpga/toplevel/include/common_config_1rxhb_1tx.vh61
-rw-r--r--usrp/fpga/toplevel/include/common_config_2rx_0tx.vh61
-rw-r--r--usrp/fpga/toplevel/include/common_config_2rxhb_0tx.vh61
-rw-r--r--usrp/fpga/toplevel/include/common_config_2rxhb_2tx.vh61
-rw-r--r--usrp/fpga/toplevel/include/common_config_4rx_0tx.vh61
-rw-r--r--usrp/fpga/toplevel/include/common_config_bottom.vh104
-rw-r--r--usrp/fpga/toplevel/mrfm/.gitignore17
-rw-r--r--usrp/fpga/toplevel/mrfm/biquad_2stage.v131
-rw-r--r--usrp/fpga/toplevel/mrfm/biquad_6stage.v137
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.csf444
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.esf14
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.psf312
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.py129
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.qpf29
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.qsf411
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.v199
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm.vh21
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm_compensator.v80
-rwxr-xr-xusrp/fpga/toplevel/mrfm/mrfm_fft.py319
-rw-r--r--usrp/fpga/toplevel/mrfm/mrfm_proc.v96
-rw-r--r--usrp/fpga/toplevel/mrfm/shifter.v106
-rw-r--r--usrp/fpga/toplevel/sizetest/.gitignore15
-rw-r--r--usrp/fpga/toplevel/sizetest/sizetest.csf160
-rw-r--r--usrp/fpga/toplevel/sizetest/sizetest.psf228
-rw-r--r--usrp/fpga/toplevel/sizetest/sizetest.quartus19
-rw-r--r--usrp/fpga/toplevel/sizetest/sizetest.ssf14
-rw-r--r--usrp/fpga/toplevel/sizetest/sizetest.v39
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/.gitignore16
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/config.vh53
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.csf444
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.esf14
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.psf312
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qpf29
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qsf423
-rw-r--r--usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.v428
-rw-r--r--usrp/fpga/toplevel/usrp_multi/.gitignore16
-rw-r--r--usrp/fpga/toplevel/usrp_multi/config.vh62
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.csf444
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.esf14
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.psf312
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.qpf29
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.qsf408
-rw-r--r--usrp/fpga/toplevel/usrp_multi/usrp_multi.v379
-rw-r--r--usrp/fpga/toplevel/usrp_std/.gitignore17
-rw-r--r--usrp/fpga/toplevel/usrp_std/config.vh53
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.csf444
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.esf14
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.psf312
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.qpf29
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.qsf409
-rw-r--r--usrp/fpga/toplevel/usrp_std/usrp_std.v333
-rwxr-xr-xusrp/host/apps/burn-db-eeprom1
-rw-r--r--usrp/host/include/usrp/Makefile.am1
-rw-r--r--usrp/host/include/usrp/db_bitshark_rx.h56
-rw-r--r--usrp/host/lib/Makefile.am10
-rw-r--r--usrp/host/lib/circular_buffer.h69
-rw-r--r--usrp/host/lib/circular_linked_list.h34
-rw-r--r--usrp/host/lib/db_bitshark_rx.cc417
-rw-r--r--usrp/host/lib/db_boards.cc5
-rw-r--r--usrp/host/lib/db_wbxng.cc4
-rw-r--r--usrp/host/lib/fusb_darwin.cc97
-rw-r--r--usrp/host/lib/fusb_darwin.h13
-rw-r--r--usrp/host/lib/mld_threads.h275
-rw-r--r--usrp/host/lib/usrp_dbid.dat2
-rw-r--r--usrp/limbo/apps-inband/.gitignore35
-rw-r--r--usrp/limbo/apps-inband/Makefile.am77
-rw-r--r--usrp/limbo/apps-inband/read_packets.cc109
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_2rx.cc371
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_2tx.cc430
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_overrun.cc375
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_ping.cc374
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_registers.cc435
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_rx.cc362
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_timestamps.cc506
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_tx.cc411
-rw-r--r--usrp/limbo/apps-inband/test_usrp_inband_underrun.cc674
-rw-r--r--usrp/limbo/apps-inband/ui_nco.h202
-rw-r--r--usrp/limbo/apps-inband/ui_sincos.c81
-rw-r--r--usrp/limbo/apps-inband/ui_sincos.h39
-rw-r--r--usrp/limbo/inband/.gitignore20
-rw-r--r--usrp/limbo/inband/Makefile.am114
-rwxr-xr-xusrp/limbo/inband/dump_packets.py65
-rwxr-xr-xusrp/limbo/inband/gen_test_packets.py88
-rw-r--r--usrp/limbo/inband/qa_inband.cc35
-rw-r--r--usrp/limbo/inband/qa_inband.h35
-rw-r--r--usrp/limbo/inband/qa_inband_packet_prims.cc162
-rw-r--r--usrp/limbo/inband/qa_inband_packet_prims.h41
-rw-r--r--usrp/limbo/inband/qa_inband_usrp_server.cc1575
-rw-r--r--usrp/limbo/inband/qa_inband_usrp_server.h50
-rw-r--r--usrp/limbo/inband/symbols_usrp_channel.h40
-rw-r--r--usrp/limbo/inband/symbols_usrp_interface_cs.h43
-rw-r--r--usrp/limbo/inband/symbols_usrp_low_level_cs.h47
-rw-r--r--usrp/limbo/inband/symbols_usrp_rx.h36
-rw-r--r--usrp/limbo/inband/symbols_usrp_rx_cs.h32
-rw-r--r--usrp/limbo/inband/symbols_usrp_server_cs.h47
-rw-r--r--usrp/limbo/inband/symbols_usrp_tx.h32
-rw-r--r--usrp/limbo/inband/symbols_usrp_tx_cs.h32
-rw-r--r--usrp/limbo/inband/test_inband.cc36
-rw-r--r--usrp/limbo/inband/usb_packet.py115
-rw-r--r--usrp/limbo/inband/usrp_inband_usb_packet.cc793
-rw-r--r--usrp/limbo/inband/usrp_inband_usb_packet.h240
-rw-r--r--usrp/limbo/inband/usrp_interface.mbh88
-rw-r--r--usrp/limbo/inband/usrp_rx.cc184
-rw-r--r--usrp/limbo/inband/usrp_rx.h58
-rw-r--r--usrp/limbo/inband/usrp_rx_stub.cc227
-rw-r--r--usrp/limbo/inband/usrp_rx_stub.h79
-rw-r--r--usrp/limbo/inband/usrp_server.cc1861
-rw-r--r--usrp/limbo/inband/usrp_server.h131
-rw-r--r--usrp/limbo/inband/usrp_server.mbh255
-rw-r--r--usrp/limbo/inband/usrp_tx.cc150
-rw-r--r--usrp/limbo/inband/usrp_tx.h52
-rw-r--r--usrp/limbo/inband/usrp_tx_stub.cc344
-rw-r--r--usrp/limbo/inband/usrp_tx_stub.h61
-rw-r--r--usrp/limbo/inband/usrp_usb_interface.cc601
-rw-r--r--usrp/limbo/inband/usrp_usb_interface.h78
-rw-r--r--usrp/usrp.pc.in2
268 files changed, 597 insertions, 40133 deletions
diff --git a/usrp/firmware/include/usrp_ids.h b/usrp/firmware/include/usrp_ids.h
index dd5daed01..46a069434 100644
--- a/usrp/firmware/include/usrp_ids.h
+++ b/usrp/firmware/include/usrp_ids.h
@@ -55,6 +55,8 @@
#define USB_PID_FSF_BDALE_8 0x0012 // Bdale Garbee <bdale@gag.com>
#define USB_PID_FSF_BDALE_9 0x0013 // Bdale Garbee <bdale@gag.com>
#define USB_PID_FSF_HPSDR_HERMES 0x0014 // HPSDR Hermes
+#define USB_PID_FSF_THINKRF 0x0015 // Catalin Patulea <catalin.patulea@thinkrf.com>
+#define USB_PID_FSF_MSA 0x0016 // Hans de Bok <hdbok@dionaea.demon.nl> Scotty's Modular Spectrum Analyzer
#define USB_PID_FSF_LBNL_UXO 0x0018 // http://recycle.lbl.gov/~ldoolitt/uxo/
diff --git a/usrp/firmware/src/common/build_eeprom.py b/usrp/firmware/src/common/build_eeprom.py
index ed9bb56a4..00c2e3414 100755
--- a/usrp/firmware/src/common/build_eeprom.py
+++ b/usrp/firmware/src/common/build_eeprom.py
@@ -146,7 +146,7 @@ def build_shell_script (out, ihx_filename, rev, prefix):
out.write ('#!/bin/sh\n')
out.write ('usrper -x load_firmware ' + prefix + '/share/usrp/rev%d/std.ihx\n' % rev)
- out.write ('sleep 1\n')
+ out.write ('sleep 2\n')
# print "len(image) =", len(image)
@@ -161,7 +161,7 @@ def build_shell_script (out, ihx_filename, rev, prefix):
(i2c_addr, rom_addr, ''.join (hex_image[0:l])))
hex_image = hex_image[l:]
rom_addr = rom_addr + l
- out.write ('sleep 1\n')
+ out.write ('sleep 2\n')
if __name__ == '__main__':
usage = "usage: %prog -p PREFIX -r REV [options] bootfile.ihx"
@@ -182,10 +182,6 @@ if __name__ == '__main__':
sys.stderr.write (
"You must specify the install prefix with -p PREFIX\n")
sys.exit (1)
- if not os.path.isdir(options.prefix):
- sys.stderr.write (
- "PREFIX dir (" + options.prefix + "), does not exist\n")
- sys.exit (1)
ihx_filename = args[0]
diff --git a/usrp/fpga/Makefile.am b/usrp/fpga/Makefile.am
index 8721af4a7..901a66f0f 100644
--- a/usrp/fpga/Makefile.am
+++ b/usrp/fpga/Makefile.am
@@ -20,5 +20,3 @@
#
SUBDIRS = rbf
-
-include Makefile.extra
diff --git a/usrp/fpga/Makefile.extra b/usrp/fpga/Makefile.extra
deleted file mode 100644
index 56df23c98..000000000
--- a/usrp/fpga/Makefile.extra
+++ /dev/null
@@ -1,181 +0,0 @@
-EXTRA_DIST = \
- gen_makefile_extra.py \
- inband_lib/chan_fifo_reader.v \
- inband_lib/channel_demux.v \
- inband_lib/channel_ram.v \
- inband_lib/cmd_reader.v \
- inband_lib/packet_builder.v \
- inband_lib/register_io.v \
- inband_lib/rx_buffer_inband.v \
- inband_lib/tx_buffer_inband.v \
- inband_lib/tx_packer.v \
- inband_lib/usb_packet_fifo.v \
- megacells/accum32.bsf \
- megacells/accum32.cmp \
- megacells/accum32.inc \
- megacells/accum32.v \
- megacells/accum32_bb.v \
- megacells/accum32_inst.v \
- megacells/add32.bsf \
- megacells/add32.cmp \
- megacells/add32.inc \
- megacells/add32.v \
- megacells/add32_bb.v \
- megacells/add32_inst.v \
- megacells/addsub16.bsf \
- megacells/addsub16.cmp \
- megacells/addsub16.inc \
- megacells/addsub16.v \
- megacells/addsub16_bb.v \
- megacells/addsub16_inst.v \
- megacells/bustri.bsf \
- megacells/bustri.cmp \
- megacells/bustri.inc \
- megacells/bustri.v \
- megacells/bustri_bb.v \
- megacells/bustri_inst.v \
- megacells/clk_doubler.v \
- megacells/clk_doubler_bb.v \
- megacells/dspclkpll.v \
- megacells/dspclkpll_bb.v \
- megacells/fifo_1kx16.bsf \
- megacells/fifo_1kx16.cmp \
- megacells/fifo_1kx16.inc \
- megacells/fifo_1kx16.v \
- megacells/fifo_1kx16_bb.v \
- megacells/fifo_1kx16_inst.v \
- megacells/fifo_2k.v \
- megacells/fifo_2k_bb.v \
- megacells/fifo_4k.v \
- megacells/fifo_4k_18.v \
- megacells/fifo_4k_bb.v \
- megacells/fifo_4kx16_dc.bsf \
- megacells/fifo_4kx16_dc.cmp \
- megacells/fifo_4kx16_dc.inc \
- megacells/fifo_4kx16_dc.v \
- megacells/fifo_4kx16_dc_bb.v \
- megacells/fifo_4kx16_dc_inst.v \
- megacells/mylpm_addsub.bsf \
- megacells/mylpm_addsub.cmp \
- megacells/mylpm_addsub.inc \
- megacells/mylpm_addsub.v \
- megacells/mylpm_addsub_bb.v \
- megacells/mylpm_addsub_inst.v \
- megacells/pll.v \
- megacells/pll_bb.v \
- megacells/pll_inst.v \
- megacells/sub32.bsf \
- megacells/sub32.cmp \
- megacells/sub32.inc \
- megacells/sub32.v \
- megacells/sub32_bb.v \
- megacells/sub32_inst.v \
- models/bustri.v \
- models/fifo.v \
- models/fifo_1c_1k.v \
- models/fifo_1c_2k.v \
- models/fifo_1c_4k.v \
- models/fifo_1k.v \
- models/fifo_2k.v \
- models/fifo_4k.v \
- models/fifo_4k_18.v \
- models/pll.v \
- models/ssram.v \
- sdr_lib/adc_interface.v \
- sdr_lib/atr_delay.v \
- sdr_lib/bidir_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/clk_divider.v \
- sdr_lib/cordic.v \
- sdr_lib/cordic_stage.v \
- sdr_lib/ddc.v \
- sdr_lib/dpram.v \
- sdr_lib/duc.v \
- sdr_lib/ext_fifo.v \
- sdr_lib/gen_cordic_consts.py \
- sdr_lib/gen_sync.v \
- sdr_lib/hb/acc.v \
- sdr_lib/hb/coeff_rom.v \
- sdr_lib/hb/halfband_decim.v \
- sdr_lib/hb/halfband_interp.v \
- sdr_lib/hb/hbd_tb/test_hbd.v \
- sdr_lib/hb/mac.v \
- sdr_lib/hb/mult.v \
- sdr_lib/hb/ram16_2port.v \
- sdr_lib/hb/ram16_2sum.v \
- sdr_lib/hb/ram32_2sum.v \
- sdr_lib/io_pins.v \
- sdr_lib/master_control.v \
- sdr_lib/master_control_multi.v \
- sdr_lib/phase_acc.v \
- sdr_lib/ram.v \
- sdr_lib/ram16.v \
- sdr_lib/ram32.v \
- sdr_lib/ram64.v \
- sdr_lib/rssi.v \
- sdr_lib/rx_buffer.v \
- sdr_lib/rx_chain.v \
- sdr_lib/rx_chain_dual.v \
- sdr_lib/rx_dcoffset.v \
- sdr_lib/serial_io.v \
- sdr_lib/setting_reg.v \
- sdr_lib/setting_reg_masked.v \
- sdr_lib/sign_extend.v \
- sdr_lib/strobe_gen.v \
- sdr_lib/tx_buffer.v \
- sdr_lib/tx_chain.v \
- sdr_lib/tx_chain_hb.v \
- tb/cbus_tb.v \
- tb/cordic_tb.v \
- tb/decim_tb.v \
- tb/fullchip_tb.v \
- tb/interp_tb.v \
- tb/justinterp_tb.v \
- tb/usrp_tasks.v \
- toplevel/include/common_config_1rxhb_1tx.vh \
- toplevel/include/common_config_2rx_0tx.vh \
- toplevel/include/common_config_2rxhb_0tx.vh \
- toplevel/include/common_config_2rxhb_2tx.vh \
- toplevel/include/common_config_4rx_0tx.vh \
- toplevel/include/common_config_bottom.vh \
- toplevel/mrfm/biquad_2stage.v \
- toplevel/mrfm/biquad_6stage.v \
- toplevel/mrfm/mrfm.csf \
- toplevel/mrfm/mrfm.esf \
- toplevel/mrfm/mrfm.psf \
- toplevel/mrfm/mrfm.py \
- toplevel/mrfm/mrfm.qpf \
- toplevel/mrfm/mrfm.qsf \
- toplevel/mrfm/mrfm.v \
- toplevel/mrfm/mrfm.vh \
- toplevel/mrfm/mrfm_compensator.v \
- toplevel/mrfm/mrfm_fft.py \
- toplevel/mrfm/mrfm_proc.v \
- toplevel/mrfm/shifter.v \
- toplevel/sizetest/sizetest.csf \
- toplevel/sizetest/sizetest.psf \
- toplevel/sizetest/sizetest.v \
- toplevel/usrp_inband_usb/config.vh \
- toplevel/usrp_inband_usb/usrp_inband_usb.csf \
- toplevel/usrp_inband_usb/usrp_inband_usb.esf \
- toplevel/usrp_inband_usb/usrp_inband_usb.psf \
- toplevel/usrp_inband_usb/usrp_inband_usb.qpf \
- toplevel/usrp_inband_usb/usrp_inband_usb.qsf \
- toplevel/usrp_inband_usb/usrp_inband_usb.v \
- toplevel/usrp_multi/config.vh \
- toplevel/usrp_multi/usrp_multi.csf \
- toplevel/usrp_multi/usrp_multi.esf \
- toplevel/usrp_multi/usrp_multi.psf \
- toplevel/usrp_multi/usrp_multi.qpf \
- toplevel/usrp_multi/usrp_multi.qsf \
- toplevel/usrp_multi/usrp_multi.v \
- toplevel/usrp_std/config.vh \
- toplevel/usrp_std/usrp_std.csf \
- toplevel/usrp_std/usrp_std.esf \
- toplevel/usrp_std/usrp_std.psf \
- toplevel/usrp_std/usrp_std.qpf \
- toplevel/usrp_std/usrp_std.qsf \
- toplevel/usrp_std/usrp_std.v
diff --git a/usrp/fpga/README b/usrp/fpga/README
new file mode 100644
index 000000000..3d1e7ad99
--- /dev/null
+++ b/usrp/fpga/README
@@ -0,0 +1,3 @@
+The FPGA source content that used to be here is now hosted at:
+
+git://ettus.sourcerepo.com/ettus/fpga.git
diff --git a/usrp/fpga/TODO b/usrp/fpga/TODO
deleted file mode 100644
index 76287c3d4..000000000
--- a/usrp/fpga/TODO
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-Area Reduction
-==============
-Reduce one or both stages of dec/interp to max rate of 8 instead of 16
-Optimize CICs to minimize registers
-Reduce width of RX CORDIC
-Fix CORDIC wasted logic cells from bad synthesis
-Progressively narrow x,y,z on CORDIC
-16-bit wide FIFOs, split IQ/channels on other side (?)
-
-Enhancements
-============
-Halfband filter in Spartan 3
-Muxing of inputs
-Switch over to newfc
-RAM interface?
-
-Other
-=====
-Capture/Transmit straight samples (no DUC/DDC)
-
-
diff --git a/usrp/fpga/gen_makefile_extra.py b/usrp/fpga/gen_makefile_extra.py
deleted file mode 100755
index 9f48802a2..000000000
--- a/usrp/fpga/gen_makefile_extra.py
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006 Free Software Foundation, Inc.
-#
-# 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.
-#
-
-"""
-Generate Makefile.extra
-"""
-
-import sys
-import os.path
-
-extensions_we_like = (
- '.v', '.vh',
- '.csf', '.esf', '.psf', '.qpf', '.qsf',
- '.inc', '.cmp', '.bsf',
- '.py')
-
-def visit(keepers, dirname, names):
- if 'rbf' in names:
- names.remove('rbf')
- if 'CVS' in names:
- names.remove('CVS')
-
- if dirname == '.':
- dirname = ''
- if dirname.startswith('./'):
- dirname = dirname[2:]
-
- for n in names:
- base, ext = os.path.splitext(n)
- if ext in extensions_we_like:
- keepers.append(os.path.join(dirname, n))
-
-def generate(f):
- keepers = []
- os.path.walk('.', visit, keepers)
- keepers.sort()
- write_keepers(keepers, f)
-
-def write_keepers(files, outf):
- m = reduce(max, map(len, files), 0)
- e = 'EXTRA_DIST ='
- outf.write('%s%s \\\n' % (e, (m-len(e)+8) * ' '))
- for f in files[:-1]:
- outf.write('\t%s%s \\\n' % (f, (m-len(f)) * ' '))
- outf.write('\t%s\n' % (files[-1],))
-
-if __name__ == '__main__':
- generate(open('Makefile.extra','w'))
diff --git a/usrp/fpga/inband_lib/chan_fifo_reader.v b/usrp/fpga/inband_lib/chan_fifo_reader.v
deleted file mode 100755
index 69da9ec5a..000000000
--- a/usrp/fpga/inband_lib/chan_fifo_reader.v
+++ /dev/null
@@ -1,219 +0,0 @@
-module chan_fifo_reader
- (reset, tx_clock, tx_strobe, timestamp_clock, samples_format,
- fifodata, pkt_waiting, rdreq, skip, tx_q, tx_i,
- underrun, tx_empty, debug, rssi, threshhold, rssi_wait) ;
-
- input wire reset ;
- input wire tx_clock ;
- input wire tx_strobe ; //signal to output tx_i and tx_q
- input wire [31:0] timestamp_clock ; //current time
- input wire [3:0] samples_format ;// not useful at this point
- input wire [31:0] fifodata ; //the data input
- input wire pkt_waiting ; //signal the next packet is ready
- output reg rdreq ; //actually an ack to the current fifodata
- output reg skip ; //finish reading current packet
- output reg [15:0] tx_q ; //top 16 bit output of fifodata
- output reg [15:0] tx_i ; //bottom 16 bit output of fifodata
- output reg underrun ;
- output reg tx_empty ; //cause 0 to be the output
- input wire [31:0] rssi;
- input wire [31:0] threshhold;
- input wire [31:0] rssi_wait;
-
- output wire [14:0] debug;
- assign debug = {7'd0, rdreq, skip, reader_state, pkt_waiting, tx_strobe, tx_clock};
-
- //Samples format
- // 16 bits interleaved complex samples
- `define QI16 4'b0
-
- // States
- parameter IDLE = 3'd0;
- parameter HEADER = 3'd1;
- parameter TIMESTAMP = 3'd2;
- parameter WAIT = 3'd3;
- parameter WAITSTROBE = 3'd4;
- parameter SEND = 3'd5;
-
- // Header format
- `define PAYLOAD 8:2
- `define ENDOFBURST 27
- `define STARTOFBURST 28
- `define RSSI_FLAG 26
-
-
- /* State registers */
- reg [2:0] reader_state;
- /* Local registers */
- reg [6:0] payload_len;
- reg [6:0] read_len;
- reg [31:0] timestamp;
- reg burst;
- reg trash;
- reg rssi_flag;
- reg [31:0] time_wait;
-
- always @(posedge tx_clock)
- begin
- if (reset)
- begin
- reader_state <= IDLE;
- rdreq <= 0;
- skip <= 0;
- underrun <= 0;
- burst <= 0;
- tx_empty <= 1;
- tx_q <= 0;
- tx_i <= 0;
- trash <= 0;
- rssi_flag <= 0;
- time_wait <= 0;
- end
- else
- begin
- case (reader_state)
- IDLE:
- begin
- /*
- * reset all the variables and wait for a tx_strobe
- * it is assumed that the ram connected to this fifo_reader
- * is a short hand fifo meaning that the header to the next packet
- * is already available to this fifo_reader when pkt_waiting is on
- */
- skip <=0;
- time_wait <= 0;
- if (pkt_waiting == 1)
- begin
- reader_state <= HEADER;
- rdreq <= 1;
- underrun <= 0;
- end
- if (burst == 1 && pkt_waiting == 0)
- underrun <= 1;
- if (tx_strobe == 1)
- tx_empty <= 1 ;
- end
-
- /* Process header */
- HEADER:
- begin
- if (tx_strobe == 1)
- tx_empty <= 1 ;
-
- rssi_flag <= fifodata[`RSSI_FLAG]&fifodata[`STARTOFBURST];
- //Check Start/End burst flag
- if (fifodata[`STARTOFBURST] == 1
- && fifodata[`ENDOFBURST] == 1)
- burst <= 0;
- else if (fifodata[`STARTOFBURST] == 1)
- burst <= 1;
- else if (fifodata[`ENDOFBURST] == 1)
- burst <= 0;
-
- if (trash == 1 && fifodata[`STARTOFBURST] == 0)
- begin
- skip <= 1;
- reader_state <= IDLE;
- rdreq <= 0;
- end
- else
- begin
- payload_len <= fifodata[`PAYLOAD] ;
- read_len <= 0;
- rdreq <= 1;
- reader_state <= TIMESTAMP;
- end
- end
-
- TIMESTAMP:
- begin
- timestamp <= fifodata;
- reader_state <= WAIT;
- if (tx_strobe == 1)
- tx_empty <= 1 ;
- rdreq <= 0;
- end
-
- // Decide if we wait, send or discard samples
- WAIT:
- begin
- if (tx_strobe == 1)
- tx_empty <= 1 ;
-
- time_wait <= time_wait + 32'd1;
- // Outdated
- if ((timestamp < timestamp_clock) ||
- (time_wait >= rssi_wait && rssi_wait != 0 && rssi_flag))
- begin
- trash <= 1;
- reader_state <= IDLE;
- skip <= 1;
- end
- // Let's send it
- else if (timestamp == timestamp_clock
- || timestamp == 32'hFFFFFFFF)
- begin
- if (rssi <= threshhold || rssi_flag == 0)
- begin
- trash <= 0;
- reader_state <= WAITSTROBE;
- end
- else
- reader_state <= WAIT;
- end
- else
- reader_state <= WAIT;
- end
-
- // Wait for the transmit chain to be ready
- WAITSTROBE:
- begin
- // If end of payload...
- if (read_len == payload_len)
- begin
- reader_state <= IDLE;
- skip <= 1;
- if (tx_strobe == 1)
- tx_empty <= 1 ;
- end
- else if (tx_strobe == 1)
- begin
- reader_state <= SEND;
- rdreq <= 1;
- end
- end
-
- // Send the samples to the tx_chain
- SEND:
- begin
- reader_state <= WAITSTROBE;
- read_len <= read_len + 7'd1;
- tx_empty <= 0;
- rdreq <= 0;
-
- case(samples_format)
- `QI16:
- begin
- tx_i <= fifodata[15:0];
- tx_q <= fifodata[31:16];
- end
-
- // Assume 16 bits complex samples by default
- default:
- begin
- tx_i <= fifodata[15:0];
- tx_q <= fifodata[31:16];
- end
- endcase
- end
-
- default:
- begin
- //error handling
- reader_state <= IDLE;
- end
- endcase
- end
- end
-
-endmodule
diff --git a/usrp/fpga/inband_lib/channel_demux.v b/usrp/fpga/inband_lib/channel_demux.v
deleted file mode 100644
index cca5cdb65..000000000
--- a/usrp/fpga/inband_lib/channel_demux.v
+++ /dev/null
@@ -1,78 +0,0 @@
-module channel_demux
- #(parameter NUM_CHAN = 2) ( //usb Side
- input [31:0]usbdata_final,
- input WR_final,
- // TX Side
- input reset,
- input txclk,
- output reg [NUM_CHAN:0] WR_channel,
- output reg [31:0] ram_data,
- output reg [NUM_CHAN:0] WR_done_channel );
- /* Parse header and forward to ram */
-
- reg [2:0]reader_state;
- reg [4:0]channel ;
- reg [6:0]read_length ;
-
- // States
- parameter IDLE = 3'd0;
- parameter HEADER = 3'd1;
- parameter WAIT = 3'd2;
- parameter FORWARD = 3'd3;
-
- `define CHANNEL 20:16
- `define PKT_SIZE 127
- wire [4:0] true_channel;
- assign true_channel = (usbdata_final[`CHANNEL] == 5'h1f) ?
- NUM_CHAN : (usbdata_final[`CHANNEL]);
-
- always @(posedge txclk)
- begin
- if (reset)
- begin
- reader_state <= IDLE;
- WR_channel <= 0;
- WR_done_channel <= 0;
- end
- else
- case (reader_state)
- IDLE: begin
- if (WR_final)
- reader_state <= HEADER;
- end
-
- // Store channel and forware header
- HEADER: begin
- channel <= true_channel;
- WR_channel[true_channel] <= 1;
- ram_data <= usbdata_final;
- read_length <= 7'd0 ;
-
- reader_state <= WAIT;
- end
-
- WAIT: begin
- WR_channel[channel] <= 0;
-
- if (read_length == `PKT_SIZE)
- reader_state <= IDLE;
- else if (WR_final)
- reader_state <= FORWARD;
- end
-
- FORWARD: begin
- WR_channel[channel] <= 1;
- ram_data <= usbdata_final;
- read_length <= read_length + 7'd1;
-
- reader_state <= WAIT;
- end
-
- default:
- begin
- //error handling
- reader_state <= IDLE;
- end
- endcase
- end
-endmodule
diff --git a/usrp/fpga/inband_lib/channel_ram.v b/usrp/fpga/inband_lib/channel_ram.v
deleted file mode 100755
index 9621246c5..000000000
--- a/usrp/fpga/inband_lib/channel_ram.v
+++ /dev/null
@@ -1,107 +0,0 @@
-module channel_ram
- ( // System
- input txclk, input reset,
- // USB side
- input [31:0] datain, input WR, input WR_done, output have_space,
- // Reader side
- output [31:0] dataout, input RD, input RD_done, output packet_waiting);
-
- reg [6:0] wr_addr, rd_addr;
- reg [1:0] which_ram_wr, which_ram_rd;
- reg [2:0] nb_packets;
-
- reg [31:0] ram0 [0:127];
- reg [31:0] ram1 [0:127];
- reg [31:0] ram2 [0:127];
- reg [31:0] ram3 [0:127];
-
- reg [31:0] dataout0;
- reg [31:0] dataout1;
- reg [31:0] dataout2;
- reg [31:0] dataout3;
-
- wire wr_done_int;
- wire rd_done_int;
- wire [6:0] rd_addr_final;
- wire [1:0] which_ram_rd_final;
-
- // USB side
- always @(posedge txclk)
- if(WR & (which_ram_wr == 2'd0)) ram0[wr_addr] <= datain;
-
- always @(posedge txclk)
- if(WR & (which_ram_wr == 2'd1)) ram1[wr_addr] <= datain;
-
- always @(posedge txclk)
- if(WR & (which_ram_wr == 2'd2)) ram2[wr_addr] <= datain;
-
- always @(posedge txclk)
- if(WR & (which_ram_wr == 2'd3)) ram3[wr_addr] <= datain;
-
- assign wr_done_int = ((WR && (wr_addr == 7'd127)) || WR_done);
-
- always @(posedge txclk)
- if(reset)
- wr_addr <= 0;
- else if (WR_done)
- wr_addr <= 0;
- else if (WR)
- wr_addr <= wr_addr + 7'd1;
-
- always @(posedge txclk)
- if(reset)
- which_ram_wr <= 0;
- else if (wr_done_int)
- which_ram_wr <= which_ram_wr + 2'd1;
-
- assign have_space = (nb_packets < 3'd3);
-
- // Reader side
- // short hand fifo
- // rd_addr_final is what rd_addr is going to be next clock cycle
- // which_ram_rd_final is what which_ram_rd is going to be next clock cycle
- always @(posedge txclk) dataout0 <= ram0[rd_addr_final];
- always @(posedge txclk) dataout1 <= ram1[rd_addr_final];
- always @(posedge txclk) dataout2 <= ram2[rd_addr_final];
- always @(posedge txclk) dataout3 <= ram3[rd_addr_final];
-
- assign dataout = (which_ram_rd_final[1]) ?
- (which_ram_rd_final[0] ? dataout3 : dataout2) :
- (which_ram_rd_final[0] ? dataout1 : dataout0);
-
- //RD_done is the only way to signal the end of one packet
- assign rd_done_int = RD_done;
-
- always @(posedge txclk)
- if (reset)
- rd_addr <= 0;
- else if (RD_done)
- rd_addr <= 0;
- else if (RD)
- rd_addr <= rd_addr + 7'd1;
-
- assign rd_addr_final = (reset|RD_done) ? (6'd0) :
- ((RD)?(rd_addr+7'd1):rd_addr);
-
- always @(posedge txclk)
- if (reset)
- which_ram_rd <= 0;
- else if (rd_done_int)
- which_ram_rd <= which_ram_rd + 2'd1;
-
- assign which_ram_rd_final = (reset) ? (2'd0):
- ((rd_done_int) ? (which_ram_rd + 2'd1) : which_ram_rd);
-
- //packet_waiting is set to zero if rd_done_int is high
- //because there is no guarantee that nb_packets will be pos.
-
- assign packet_waiting = (nb_packets > 1) | ((nb_packets == 1)&(~rd_done_int));
- always @(posedge txclk)
- if (reset)
- nb_packets <= 0;
- else if (wr_done_int & ~rd_done_int)
- nb_packets <= nb_packets + 3'd1;
- else if (rd_done_int & ~wr_done_int)
- nb_packets <= nb_packets - 3'd1;
-
-endmodule
diff --git a/usrp/fpga/inband_lib/cmd_reader.v b/usrp/fpga/inband_lib/cmd_reader.v
deleted file mode 100755
index b69ea02b7..000000000
--- a/usrp/fpga/inband_lib/cmd_reader.v
+++ /dev/null
@@ -1,305 +0,0 @@
-module cmd_reader
- (//System
- input reset, input txclk, input [31:0] timestamp_clock,
- //FX2 Side
- output reg skip, output reg rdreq,
- input [31:0] fifodata, input pkt_waiting,
- //Rx side
- input rx_WR_enabled, output reg [15:0] rx_databus,
- output reg rx_WR, output reg rx_WR_done,
- //register io
- input wire [31:0] reg_data_out, output reg [31:0] reg_data_in,
- output reg [6:0] reg_addr, output reg [1:0] reg_io_enable,
- output wire [14:0] debug, output reg stop, output reg [15:0] stop_time);
-
- // States
- parameter IDLE = 4'd0;
- parameter HEADER = 4'd1;
- parameter TIMESTAMP = 4'd2;
- parameter WAIT = 4'd3;
- parameter TEST = 4'd4;
- parameter SEND = 4'd5;
- parameter PING = 4'd6;
- parameter WRITE_REG = 4'd7;
- parameter WRITE_REG_MASKED = 4'd8;
- parameter READ_REG = 4'd9;
- parameter DELAY = 4'd14;
-
- `define OP_PING_FIXED 8'd0
- `define OP_PING_FIXED_REPLY 8'd1
- `define OP_WRITE_REG 8'd2
- `define OP_WRITE_REG_MASKED 8'd3
- `define OP_READ_REG 8'd4
- `define OP_READ_REG_REPLY 8'd5
- `define OP_DELAY 8'd12
-
- reg [6:0] payload;
- reg [6:0] payload_read;
- reg [3:0] state;
- reg [15:0] high;
- reg [15:0] low;
- reg pending;
- reg [31:0] value0;
- reg [31:0] value1;
- reg [31:0] value2;
- reg [1:0] lines_in;
- reg [1:0] lines_out;
- reg [1:0] lines_out_total;
-
- `define JITTER 5
- `define OP_CODE 31:24
- `define PAYLOAD 8:2
-
- wire [7:0] ops;
- assign ops = value0[`OP_CODE];
- assign debug = {state[3:0], lines_out[1:0], pending, rx_WR, rx_WR_enabled, value0[2:0], ops[2:0]};
-
- always @(posedge txclk)
- if (reset)
- begin
- pending <= 0;
- state <= IDLE;
- skip <= 0;
- rdreq <= 0;
- rx_WR <= 0;
- reg_io_enable <= 0;
- reg_data_in <= 0;
- reg_addr <= 0;
- stop <= 0;
- end
- else case (state)
- IDLE :
- begin
- payload_read <= 0;
- skip <= 0;
- lines_in <= 0;
- if(pkt_waiting)
- begin
- state <= HEADER;
- rdreq <= 1;
- end
- end
-
- HEADER :
- begin
- payload <= fifodata[`PAYLOAD];
- state <= TIMESTAMP;
- end
-
- TIMESTAMP :
- begin
- value0 <= fifodata;
- state <= WAIT;
- rdreq <= 0;
- end
-
- WAIT :
- begin
- // Let's send it
- if ((value0 <= timestamp_clock + `JITTER
- && value0 > timestamp_clock)
- || value0 == 32'hFFFFFFFF)
- state <= TEST;
- // Wait a little bit more
- else if (value0 > timestamp_clock + `JITTER)
- state <= WAIT;
- // Outdated
- else if (value0 < timestamp_clock)
- begin
- state <= IDLE;
- skip <= 1;
- end
- end
-
- TEST :
- begin
- reg_io_enable <= 0;
- rx_WR <= 0;
- rx_WR_done <= 1;
- stop <= 0;
- if (payload_read == payload)
- begin
- skip <= 1;
- state <= IDLE;
- rdreq <= 0;
- end
- else
- begin
- value0 <= fifodata;
- lines_in <= 2'd1;
- rdreq <= 1;
- payload_read <= payload_read + 7'd1;
- lines_out <= 0;
- case (fifodata[`OP_CODE])
- `OP_PING_FIXED:
- begin
- state <= PING;
- end
- `OP_WRITE_REG:
- begin
- state <= WRITE_REG;
- pending <= 1;
- end
- `OP_WRITE_REG_MASKED:
- begin
- state <= WRITE_REG_MASKED;
- pending <= 1;
- end
- `OP_READ_REG:
- begin
- state <= READ_REG;
- end
- `OP_DELAY:
- begin
- state <= DELAY;
- end
- default:
- begin
- //error, skip this packet
- skip <= 1;
- state <= IDLE;
- end
- endcase
- end
- end
-
- SEND:
- begin
- rdreq <= 0;
- rx_WR_done <= 0;
- if (pending)
- begin
- rx_WR <= 1;
- rx_databus <= high;
- pending <= 0;
- if (lines_out == lines_out_total)
- state <= TEST;
- else case (ops)
- `OP_READ_REG:
- begin
- state <= READ_REG;
- end
- default:
- begin
- state <= TEST;
- end
- endcase
- end
- else
- begin
- if (rx_WR_enabled)
- begin
- rx_WR <= 1;
- rx_databus <= low;
- pending <= 1;
- lines_out <= lines_out + 2'd1;
- end
- else
- rx_WR <= 0;
- end
- end
-
- PING:
- begin
- rx_WR <= 0;
- rdreq <= 0;
- rx_WR_done <= 0;
- lines_out_total <= 2'd1;
- pending <= 0;
- state <= SEND;
- high <= {`OP_PING_FIXED_REPLY, 8'd2};
- low <= value0[15:0];
- end
-
- READ_REG:
- begin
- rx_WR <= 0;
- rx_WR_done <= 0;
- rdreq <= 0;
- lines_out_total <= 2'd2;
- pending <= 0;
- state <= SEND;
- if (lines_out == 0)
- begin
- high <= {`OP_READ_REG_REPLY, 8'd6};
- low <= value0[15:0];
- reg_io_enable <= 2'd3;
- reg_addr <= value0[6:0];
- end
- else
- begin
- high <= reg_data_out[31:16];
- low <= reg_data_out[15:0];
- end
- end
-
- WRITE_REG:
- begin
- rx_WR <= 0;
- if (pending)
- pending <= 0;
- else
- begin
- if (lines_in == 2'd1)
- begin
- payload_read <= payload_read + 7'd1;
- lines_in <= lines_in + 2'd1;
- value1 <= fifodata;
- rdreq <= 0;
- end
- else
- begin
- reg_io_enable <= 2'd2;
- reg_data_in <= value1;
- reg_addr <= value0[6:0];
- state <= TEST;
- end
- end
- end
-
- WRITE_REG_MASKED:
- begin
- rx_WR <= 0;
- if (pending)
- pending <= 0;
- else
- begin
- if (lines_in == 2'd1)
- begin
- rdreq <= 1;
- payload_read <= payload_read + 7'd1;
- lines_in <= lines_in + 2'd1;
- value1 <= fifodata;
- end
- else if (lines_in == 2'd2)
- begin
- rdreq <= 0;
- payload_read <= payload_read + 7'd1;
- lines_in <= lines_in + 2'd1;
- value2 <= fifodata;
- end
- else
- begin
- reg_io_enable <= 2'd2;
- reg_data_in <= (value1 & value2);
- reg_addr <= value0[6:0];
- state <= TEST;
- end
- end
- end
-
- DELAY :
- begin
- rdreq <= 0;
- stop <= 1;
- stop_time <= value0[15:0];
- state <= TEST;
- end
-
- default :
- begin
- //error state handling
- state <= IDLE;
- end
- endcase
-endmodule
diff --git a/usrp/fpga/inband_lib/packet_builder.v b/usrp/fpga/inband_lib/packet_builder.v
deleted file mode 100755
index 2c9122394..000000000
--- a/usrp/fpga/inband_lib/packet_builder.v
+++ /dev/null
@@ -1,152 +0,0 @@
-module packet_builder #(parameter NUM_CHAN = 2)(
- // System
- input rxclk,
- input reset,
- input [31:0] timestamp_clock,
- input [3:0] channels,
- // ADC side
- input [15:0]chan_fifodata,
- input [NUM_CHAN:0]chan_empty,
- input [9:0]chan_usedw,
- output reg [3:0]rd_select,
- output reg chan_rdreq,
- // FX2 side
- output reg WR,
- output reg [15:0]fifodata,
- input have_space,
- input wire [31:0]rssi_0, input wire [31:0]rssi_1, input wire [31:0]rssi_2,
- input wire [31:0]rssi_3, output wire [7:0] debugbus,
- input [NUM_CHAN:0] underrun);
-
-
- // States
- `define IDLE 3'd0
- `define HEADER1 3'd1
- `define HEADER2 3'd2
- `define TIMESTAMP 3'd3
- `define FORWARD 3'd4
-
- `define MAXPAYLOAD 504
-
- `define PAYLOAD_LEN 8:0
- `define TAG 12:9
- `define MBZ 15:13
-
- `define CHAN 4:0
- `define RSSI 10:5
- `define BURST 12:11
- `define DROPPED 13
- `define UNDERRUN 14
- `define OVERRUN 15
-
- reg [NUM_CHAN:0] overrun;
- reg [2:0] state;
- reg [8:0] read_length;
- reg [8:0] payload_len;
- reg timestamp_complete;
- reg [3:0] check_next;
-
- wire [31:0] true_rssi;
- wire [4:0] true_channel;
- wire ready_to_send;
-
- assign debugbus = {chan_empty[0], rd_select[0], have_space,
- (chan_usedw >= 10'd504), (chan_usedw ==0),
- ready_to_send, state[1:0]};
-
- assign true_rssi = (rd_select[1]) ? ((rd_select[0]) ? rssi_3:rssi_2) :
- ((rd_select[0]) ? rssi_1:rssi_0);
- assign true_channel = (check_next == 4'd0 ? 5'h1f : {1'd0, check_next - 4'd1});
- assign ready_to_send = (chan_usedw >= 10'd504) || (chan_usedw == 0) ||
- ((rd_select == NUM_CHAN)&&(chan_usedw > 0));
-
- always @(posedge rxclk)
- begin
- if (reset)
- begin
- overrun <= 0;
- WR <= 0;
- rd_select <= 0;
- chan_rdreq <= 0;
- timestamp_complete <= 0;
- check_next <= 0;
- state <= `IDLE;
- end
- else case (state)
- `IDLE: begin
- chan_rdreq <= #1 0;
- //check if the channel is full
- if(~chan_empty[check_next])
- begin
- if (have_space)
- begin
- //transmit if the usb buffer have space
- //check if we should send
- if (ready_to_send)
- state <= #1 `HEADER1;
-
- overrun[check_next] <= 0;
- end
- else
- begin
- state <= #1 `IDLE;
- overrun[check_next] <= 1;
- end
- rd_select <= #1 check_next;
- end
- check_next <= #1 (check_next == channels ? 4'd0 : check_next + 4'd1);
- end
-
- `HEADER1: begin
- fifodata[`PAYLOAD_LEN] <= #1 9'd504;
- payload_len <= #1 9'd504;
- fifodata[`TAG] <= #1 0;
- fifodata[`MBZ] <= #1 0;
- WR <= #1 1;
-
- state <= #1 `HEADER2;
- read_length <= #1 0;
- end
-
- `HEADER2: begin
- fifodata[`CHAN] <= #1 true_channel;
- fifodata[`RSSI] <= #1 true_rssi[5:0];
- fifodata[`BURST] <= #1 0;
- fifodata[`DROPPED] <= #1 0;
- fifodata[`UNDERRUN] <= #1 (check_next == 0) ? 1'b0 : underrun[true_channel];
- fifodata[`OVERRUN] <= #1 (check_next == 0) ? 1'b0 : overrun[true_channel];
- state <= #1 `TIMESTAMP;
- end
-
- `TIMESTAMP: begin
- fifodata <= #1 (timestamp_complete ? timestamp_clock[31:16] : timestamp_clock[15:0]);
- timestamp_complete <= #1 ~timestamp_complete;
-
- if (~timestamp_complete)
- chan_rdreq <= #1 1;
-
- state <= #1 (timestamp_complete ? `FORWARD : `TIMESTAMP);
- end
-
- `FORWARD: begin
- read_length <= #1 read_length + 9'd2;
- fifodata <= #1 (read_length >= payload_len ? 16'hDEAD : chan_fifodata);
-
- if (read_length >= `MAXPAYLOAD)
- begin
- WR <= #1 0;
- state <= #1 `IDLE;
- chan_rdreq <= #1 0;
- end
- else if (read_length == payload_len - 4)
- chan_rdreq <= #1 0;
- end
-
- default: begin
- //handling error state
- state <= `IDLE;
- end
- endcase
- end
-endmodule
-
diff --git a/usrp/fpga/inband_lib/register_io.v b/usrp/fpga/inband_lib/register_io.v
deleted file mode 100755
index 2b0cd1732..000000000
--- a/usrp/fpga/inband_lib/register_io.v
+++ /dev/null
@@ -1,82 +0,0 @@
-module register_io
- (clk, reset, enable, addr, datain, dataout, debugbus, addr_wr, data_wr, strobe_wr,
- rssi_0, rssi_1, rssi_2, rssi_3, threshhold, rssi_wait, reg_0, reg_1, reg_2, reg_3,
- debug_en, misc, txmux);
-
- input clk;
- input reset;
- input wire [1:0] enable;
- input wire [6:0] addr;
- input wire [31:0] datain;
- output reg [31:0] dataout;
- output wire [15:0] debugbus;
- output reg [6:0] addr_wr;
- output reg [31:0] data_wr;
- output wire strobe_wr;
- input wire [31:0] rssi_0;
- input wire [31:0] rssi_1;
- input wire [31:0] rssi_2;
- input wire [31:0] rssi_3;
- output wire [31:0] threshhold;
- output wire [31:0] rssi_wait;
- input wire [15:0] reg_0;
- input wire [15:0] reg_1;
- input wire [15:0] reg_2;
- input wire [15:0] reg_3;
- input wire [3:0] debug_en;
- input wire [7:0] misc;
- input wire [31:0] txmux;
-
- reg strobe;
- wire [31:0] out[2:1];
- assign debugbus = {clk, enable, addr[2:0], datain[4:0], dataout[4:0]};
- assign threshhold = out[1];
- assign rssi_wait = out[2];
- assign strobe_wr = strobe;
-
- always @(*)
- if (reset | ~enable[1])
- begin
- strobe <= 0;
- dataout <= 0;
- end
- else
- begin
- if (enable[0])
- begin
- //read
- if (addr <= 7'd52 && addr > 7'd50)
- dataout <= out[addr-7'd50];
- else
- dataout <= 32'hFFFFFFFF;
- strobe <= 0;
- end
- else
- begin
- //write
- dataout <= dataout;
- strobe <= 1;
- data_wr <= datain;
- addr_wr <= addr;
- end
- end
-
-//register declarations
- /*setting_reg #(50) setting_reg0(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[0]));*/
- setting_reg #(51) setting_reg1(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[1]));
- setting_reg #(52) setting_reg2(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[2]));
- /*setting_reg #(53) setting_reg3(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[3]));
- setting_reg #(54) setting_reg4(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[4]));
- setting_reg #(55) setting_reg5(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[5]));
- setting_reg #(56) setting_reg6(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[6]));
- setting_reg #(57) setting_reg7(.clock(clk),.reset(reset),
- .strobe(strobe_wr),.addr(addr_wr),.in(data_wr),.out(out[7]));*/
-
-endmodule
diff --git a/usrp/fpga/inband_lib/rx_buffer_inband.v b/usrp/fpga/inband_lib/rx_buffer_inband.v
deleted file mode 100755
index cbd2d8958..000000000
--- a/usrp/fpga/inband_lib/rx_buffer_inband.v
+++ /dev/null
@@ -1,209 +0,0 @@
-//`include "../../firmware/include/fpga_regs_common.v"
-//`include "../../firmware/include/fpga_regs_standard.v"
-module rx_buffer_inband
- ( input usbclk,
- input bus_reset,
- input reset, // DSP side reset (used here), do not reset registers
- input reset_regs, //Only reset registers
- output [15:0] usbdata,
- input RD,
- output wire have_pkt_rdy,
- output reg rx_overrun,
- input wire [3:0] channels,
- input wire [15:0] ch_0,
- input wire [15:0] ch_1,
- input wire [15:0] ch_2,
- input wire [15:0] ch_3,
- input wire [15:0] ch_4,
- input wire [15:0] ch_5,
- input wire [15:0] ch_6,
- input wire [15:0] ch_7,
- input rxclk,
- input rxstrobe,
- input clear_status,
- input [6:0] serial_addr,
- input [31:0] serial_data,
- input serial_strobe,
- output wire [15:0] debugbus,
-
- //Connection with tx_inband
- input rx_WR,
- input [15:0] rx_databus,
- input rx_WR_done,
- output reg rx_WR_enabled,
- //signal strength
- input wire [31:0] rssi_0, input wire [31:0] rssi_1,
- input wire [31:0] rssi_2, input wire [31:0] rssi_3,
- input wire [1:0] tx_underrun
- );
-
- parameter NUM_CHAN = 1;
- genvar i ;
-
- // FX2 Bug Fix
- reg [8:0] read_count;
- always @(negedge usbclk)
- if(bus_reset)
- read_count <= #1 9'd0;
- else if(RD & ~read_count[8])
- read_count <= #1 read_count + 9'd1;
- else
- read_count <= #1 RD ? read_count : 9'b0;
-
- // Time counter
- reg [31:0] timestamp_clock;
- always @(posedge rxclk)
- if (reset)
- timestamp_clock <= 0;
- else
- timestamp_clock <= timestamp_clock + 1;
-
- // USB side fifo
- wire [11:0] rdusedw;
- wire [11:0] wrusedw;
- wire [15:0] fifodata;
- wire [15:0] fifodata_il[0:NUM_CHAN];
- wire WR;
- wire have_space;
- reg sel;
- reg wr;
-
- always@(posedge rxclk)
- begin
- if(reset)
- begin
- sel<=1;
- wr<=0;
- end
- else if(rxstrobe)
- begin
- sel<=0;
- wr<=1;
- end
- else if(wr&~sel)
- sel<=1;
- else if(wr&sel)
- wr<=0;
- else
- wr<=0;
- end
-
- assign fifodata_il[0] = (sel)?ch_1:ch_0;
- assign fifodata_il[1] = (sel)?ch_3:ch_2;
-
- fifo_4kx16_dc rx_usb_fifo (
- .aclr ( reset ),
- .data ( fifodata ),
- .rdclk ( ~usbclk ),
- .rdreq ( RD & ~read_count[8] ),
- .wrclk ( rxclk ),
- .wrreq ( WR ),
- .q ( usbdata ),
- .rdempty ( ),
- .rdusedw ( rdusedw ),
- .wrfull ( ),
- .wrusedw ( wrusedw ) );
-
- assign have_pkt_rdy = (rdusedw >= 12'd256);
- assign have_space = (wrusedw < 12'd760);
-
- // Rx side fifos
- // These are of size [NUM_CHAN:0] because the extra channel is used for the
- // RX command channel. If there were no command channel, they would be
- // NUM_CHAN-1.
- wire chan_rdreq;
- wire [15:0] chan_fifodata;
- wire [9:0] chan_usedw;
- wire [NUM_CHAN:0] chan_empty;
- wire [3:0] rd_select;
- wire [NUM_CHAN:0] rx_full;
-
- packet_builder #(NUM_CHAN) rx_pkt_builer (
- .rxclk ( rxclk ),
- .reset ( reset ),
- .timestamp_clock ( timestamp_clock ),
- .channels ( NUM_CHAN ),
- .chan_rdreq ( chan_rdreq ),
- .chan_fifodata ( chan_fifodata ),
- .chan_empty ( chan_empty ),
- .rd_select ( rd_select ),
- .chan_usedw ( chan_usedw ),
- .WR ( WR ),
- .fifodata ( fifodata ),
- .have_space ( have_space ),
- .rssi_0(rssi_0), .rssi_1(rssi_1),
- .rssi_2(rssi_2),.rssi_3(rssi_3), .debugbus(debug),
- .underrun(tx_underrun));
-
- // Detect overrun
- always @(posedge rxclk)
- if(reset)
- rx_overrun <= 1'b0;
- else if(rx_full[0])
- rx_overrun <= 1'b1;
- else if(clear_status)
- rx_overrun <= 1'b0;
-
-
- // FIXME: what is the purpose of these two lines?
- wire [15:0]ch[NUM_CHAN:0];
- assign ch[0] = ch_0;
-
- wire cmd_empty;
-
- always @(posedge rxclk)
- if(reset)
- rx_WR_enabled <= 1;
- else if(cmd_empty)
- rx_WR_enabled <= 1;
- else if(rx_WR_done)
- rx_WR_enabled <= 0;
-
-
- // Of Size 0:NUM_CHAN due to extra command channel.
- wire [15:0] dataout [0:NUM_CHAN];
- wire [9:0] usedw [0:NUM_CHAN];
- wire empty[0:NUM_CHAN];
-
- generate for (i = 0 ; i < NUM_CHAN; i = i + 1)
- begin : generate_channel_fifos
-
- wire rdreq;
-
- assign rdreq = (rd_select == i) & chan_rdreq;
-
- fifo_1kx16 rx_chan_fifo (
- .aclr ( reset ),
- .clock ( rxclk ),
- .data ( fifodata_il[i] ),
- .rdreq ( rdreq ),
- .wrreq ( ~rx_full[i] & wr),
- .empty (empty[i]),
- .full (rx_full[i]),
- .q ( dataout[i]),
- .usedw ( usedw[i]),
- .almost_empty(chan_empty[i])
- );
- end
- endgenerate
-
- wire [7:0] debug;
-
- fifo_1kx16 rx_cmd_fifo (
- .aclr ( reset ),
- .clock ( rxclk ),
- .data ( rx_databus ),
- .rdreq ( (rd_select == NUM_CHAN) & chan_rdreq ),
- .wrreq ( rx_WR & rx_WR_enabled),
- .empty ( cmd_empty),
- .full ( rx_full[NUM_CHAN] ),
- .q ( dataout[NUM_CHAN]),
- .usedw ( usedw[NUM_CHAN] )
- );
-
- assign chan_empty[NUM_CHAN] = cmd_empty | rx_WR_enabled;
- assign chan_fifodata = dataout[rd_select];
- assign chan_usedw = usedw[rd_select];
- assign debugbus = {4'd0, rxclk, rxstrobe, rx_full[0], rx_full[1], sel, wr};
-
-endmodule
diff --git a/usrp/fpga/inband_lib/tx_buffer_inband.v b/usrp/fpga/inband_lib/tx_buffer_inband.v
deleted file mode 100755
index 2dd75f42f..000000000
--- a/usrp/fpga/inband_lib/tx_buffer_inband.v
+++ /dev/null
@@ -1,143 +0,0 @@
-module tx_buffer_inband
- ( //System
- input wire usbclk, input wire bus_reset, input wire reset,
- input wire [15:0] usbdata, output wire have_space, input wire [3:0] channels,
- //output transmit signals
- output wire [15:0] tx_i_0, output wire [15:0] tx_q_0,
- output wire [15:0] tx_i_1, output wire [15:0] tx_q_1,
- output wire [15:0] tx_i_2, output wire [15:0] tx_q_2,
- output wire [15:0] tx_i_3, output wire [15:0] tx_q_3,
- input wire txclk, input wire txstrobe, input wire WR,
- input wire clear_status, output wire tx_empty, output wire [15:0] debugbus,
- //command reader io
- output wire [15:0] rx_databus, output wire rx_WR, output wire rx_WR_done,
- input wire rx_WR_enabled,
- //register io
- output wire [1:0] reg_io_enable, output wire [31:0] reg_data_in, output wire [6:0] reg_addr,
- input wire [31:0] reg_data_out,
- //input characteristic signals
- input wire [31:0] rssi_0, input wire [31:0] rssi_1, input wire [31:0] rssi_2,
- input wire [31:0] rssi_3, input wire [31:0] rssi_wait, input wire [31:0] threshhold,
- output wire [1:0] tx_underrun,
- //system stop
- output wire stop, output wire [15:0] stop_time);
-
- parameter NUM_CHAN = 1 ;
-
- /* To generate channel readers */
- genvar i ;
-
- /* These will eventually be external register */
- reg [31:0] timestamp_clock ;
- wire [7:0] txstrobe_rate [NUM_CHAN-1:0] ;
- wire [31:0] rssi [3:0];
- assign rssi[0] = rssi_0;
- assign rssi[1] = rssi_1;
- assign rssi[2] = rssi_2;
- assign rssi[3] = rssi_3;
-
- always @(posedge txclk)
- if (reset)
- timestamp_clock <= 0;
- else
- timestamp_clock <= timestamp_clock + 1;
-
-
- /* Connections between tx_usb_fifo_reader and
- cnannel/command processing blocks */
- wire [31:0] tx_data_bus ;
- wire [NUM_CHAN:0] chan_WR ;
- wire [NUM_CHAN:0] chan_done ;
-
- /* Connections between data block and the
- FX2/TX chains */
- wire [NUM_CHAN:0] chan_underrun;
- wire [NUM_CHAN:0] chan_txempty;
-
- /* Conections between tx_data_packet_fifo and
- its reader + strobe generator */
- wire [31:0] chan_fifodata [NUM_CHAN:0] ;
- wire chan_pkt_waiting [NUM_CHAN:0] ;
- wire chan_rdreq [NUM_CHAN:0] ;
- wire chan_skip [NUM_CHAN:0] ;
- wire chan_have_space [NUM_CHAN:0] ;
-
- wire [14:0] debug [NUM_CHAN:0];
-
- /* Outputs to transmit chains */
- wire [15:0] tx_i [NUM_CHAN:0] ;
- wire [15:0] tx_q [NUM_CHAN:0] ;
-
- assign tx_i[NUM_CHAN] = 0;
- assign tx_q[NUM_CHAN] = 0;
-
- assign have_space = chan_have_space[0] & chan_have_space[1];
- assign tx_empty = chan_txempty[0] & chan_txempty[1] ;
-
- assign tx_i_0 = chan_txempty[0] ? 16'b0 : tx_i[0] ;
- assign tx_q_0 = chan_txempty[0] ? 16'b0 : tx_q[0] ;
- assign tx_i_1 = chan_txempty[1] ? 16'b0 : tx_i[1] ;
- assign tx_q_1 = chan_txempty[1] ? 16'b0 : tx_q[1] ;
-
- assign tx_q_2 = 16'b0 ;
- assign tx_i_2 = 16'b0 ;
- assign tx_q_3 = 16'b0 ;
- assign tx_i_3 = 16'b0 ;
- assign tx_i_3 = 16'b0 ;
-
- assign debugbus = {have_space, txclk, WR, WR_final, chan_WR, chan_done,
- chan_pkt_waiting[0], chan_pkt_waiting[1],
- chan_rdreq[0], chan_rdreq[1], chan_txempty[0], chan_txempty[1]};
-
- wire [31:0] usbdata_final;
- wire WR_final;
-
- tx_packer tx_usb_packer
- (.bus_reset(bus_reset), .usbclk(usbclk), .WR_fx2(WR),
- .usbdata(usbdata), .reset(reset), .txclk(txclk),
- .usbdata_final(usbdata_final), .WR_final(WR_final));
-
- channel_demux #(NUM_CHAN) channel_demuxer
- (.usbdata_final(usbdata_final), .WR_final(WR_final),
- .reset(reset), .txclk(txclk), .WR_channel(chan_WR),
- .WR_done_channel(chan_done), .ram_data(tx_data_bus));
-
- generate for (i = 0 ; i < NUM_CHAN; i = i + 1)
- begin : generate_channel_readers
- assign tx_underrun[i] = chan_underrun[i];
-
- channel_ram tx_data_packet_fifo
- (.reset(reset), .txclk(txclk), .datain(tx_data_bus),
- .WR(chan_WR[i]), .WR_done(chan_done[i]),
- .have_space(chan_have_space[i]), .dataout(chan_fifodata[i]),
- .packet_waiting(chan_pkt_waiting[i]), .RD(chan_rdreq[i]),
- .RD_done(chan_skip[i]));
-
- chan_fifo_reader tx_chan_reader
- (.reset(reset), .tx_clock(txclk), .tx_strobe(txstrobe),
- .timestamp_clock(timestamp_clock), .samples_format(4'b0),
- .tx_q(tx_q[i]), .tx_i(tx_i[i]), .underrun(chan_underrun[i]),
- .skip(chan_skip[i]), .rdreq(chan_rdreq[i]),
- .fifodata(chan_fifodata[i]), .pkt_waiting(chan_pkt_waiting[i]),
- .tx_empty(chan_txempty[i]), .rssi(rssi[i]), .debug(debug[i]),
- .threshhold(threshhold), .rssi_wait(rssi_wait));
- end
- endgenerate
-
-
- channel_ram tx_cmd_packet_fifo
- (.reset(reset), .txclk(txclk), .datain(tx_data_bus), .WR(chan_WR[NUM_CHAN]),
- .WR_done(chan_done[NUM_CHAN]), .have_space(chan_have_space[NUM_CHAN]),
- .dataout(chan_fifodata[NUM_CHAN]), .packet_waiting(chan_pkt_waiting[NUM_CHAN]),
- .RD(chan_rdreq[NUM_CHAN]), .RD_done(chan_skip[NUM_CHAN]));
-
- cmd_reader tx_cmd_reader
- (.reset(reset), .txclk(txclk), .timestamp_clock(timestamp_clock), .skip(chan_skip[NUM_CHAN]),
- .rdreq(chan_rdreq[NUM_CHAN]), .fifodata(chan_fifodata[NUM_CHAN]),
- .pkt_waiting(chan_pkt_waiting[NUM_CHAN]), .rx_databus(rx_databus),
- .rx_WR(rx_WR), .rx_WR_done(rx_WR_done), .rx_WR_enabled(rx_WR_enabled),
- .reg_data_in(reg_data_in), .reg_data_out(reg_data_out), .reg_addr(reg_addr),
- .reg_io_enable(reg_io_enable), .debug(debug[NUM_CHAN]), .stop(stop), .stop_time(stop_time));
-
-endmodule // tx_buffer
-
diff --git a/usrp/fpga/inband_lib/tx_packer.v b/usrp/fpga/inband_lib/tx_packer.v
deleted file mode 100644
index 2f19b21f3..000000000
--- a/usrp/fpga/inband_lib/tx_packer.v
+++ /dev/null
@@ -1,119 +0,0 @@
-module tx_packer
- ( //FX2 Side
- input bus_reset,
- input usbclk,
- input WR_fx2,
- input [15:0]usbdata,
-
- // TX Side
- input reset,
- input txclk,
- output reg [31:0] usbdata_final,
- output reg WR_final);
-
- reg [8:0] write_count;
-
- /* Fix FX2 bug */
- always @(posedge usbclk)
- begin
- if(bus_reset) // Use bus reset because this is on usbclk
- write_count <= #1 0;
- else if(WR_fx2 & ~write_count[8])
- write_count <= #1 write_count + 9'd1;
- else
- write_count <= #1 WR_fx2 ? write_count : 9'b0;
- end
-
- reg WR_fx2_fixed;
- reg [15:0]usbdata_fixed;
-
- always @(posedge usbclk)
- begin
- WR_fx2_fixed <= WR_fx2 & ~write_count[8];
- usbdata_fixed <= usbdata;
- end
-
- /* Used to convert 16 bits bus_data to the 32 bits wide fifo */
- reg word_complete ;
- reg [15:0] usbdata_delayed ;
- reg writing ;
- wire [31:0] usbdata_packed ;
- wire WR_packed ;
-
- always @(posedge usbclk)
- begin
- if (bus_reset)
- begin
- word_complete <= 0 ;
- writing <= 0 ;
- end
- else if (WR_fx2_fixed)
- begin
- writing <= 1 ;
- if (word_complete)
- word_complete <= 0 ;
- else
- begin
- usbdata_delayed <= usbdata_fixed ;
- word_complete <= 1 ;
- end
- end
- else
- writing <= 0 ;
- end
-
- assign usbdata_packed = {usbdata_fixed, usbdata_delayed} ;
- assign WR_packed = word_complete & writing ;
-
- /* Make sure data are sync with usbclk */
- reg [31:0]usbdata_usbclk;
- reg WR_usbclk;
-
- always @(posedge usbclk)
- begin
- if (WR_packed)
- usbdata_usbclk <= usbdata_packed;
- WR_usbclk <= WR_packed;
- end
-
- /* Cross clock boundaries */
- reg [31:0] usbdata_tx ;
- reg WR_tx;
- reg WR_1;
- reg WR_2;
-
- always @(posedge txclk) usbdata_tx <= usbdata_usbclk;
-
- always @(posedge txclk)
- if (reset)
- WR_1 <= 0;
- else
- WR_1 <= WR_usbclk;
-
- always @(posedge txclk)
- if (reset)
- WR_2 <= 0;
- else
- WR_2 <= WR_1;
-
- always @(posedge txclk)
- begin
- if (reset)
- WR_tx <= 0;
- else
- WR_tx <= WR_1 & ~WR_2;
- end
-
- always @(posedge txclk)
- begin
- if (reset)
- WR_final <= 0;
- else
- begin
- WR_final <= WR_tx;
- if (WR_tx)
- usbdata_final <= usbdata_tx;
- end
- end
-
-endmodule
diff --git a/usrp/fpga/inband_lib/usb_packet_fifo.v b/usrp/fpga/inband_lib/usb_packet_fifo.v
deleted file mode 100755
index c416e2bdb..000000000
--- a/usrp/fpga/inband_lib/usb_packet_fifo.v
+++ /dev/null
@@ -1,112 +0,0 @@
-module usb_packet_fifo
- ( input reset,
- input clock_in,
- input clock_out,
- input [15:0]ram_data_in,
- input write_enable,
- output reg [15:0]ram_data_out,
- output reg pkt_waiting,
- output reg have_space,
- input read_enable,
- input skip_packet ) ;
-
- /* Some parameters for usage later on */
- parameter DATA_WIDTH = 16 ;
- parameter NUM_PACKETS = 4 ;
-
- /* Create the RAM here */
- reg [DATA_WIDTH-1:0] usb_ram [256*NUM_PACKETS-1:0] ;
-
- /* Create the address signals */
- reg [7-2+NUM_PACKETS:0] usb_ram_ain ;
- reg [7:0] usb_ram_offset ;
- reg [1:0] usb_ram_packet ;
-
- wire [7-2+NUM_PACKETS:0] usb_ram_aout ;
- reg isfull;
-
- assign usb_ram_aout = {usb_ram_packet,usb_ram_offset} ;
-
- // Check if there is one full packet to process
- always @(usb_ram_ain, usb_ram_aout)
- begin
- if (reset)
- pkt_waiting <= 0;
- else if (usb_ram_ain == usb_ram_aout)
- pkt_waiting <= isfull;
- else if (usb_ram_ain > usb_ram_aout)
- pkt_waiting <= (usb_ram_ain - usb_ram_aout) >= 256;
- else
- pkt_waiting <= (usb_ram_ain + 10'b1111111111 - usb_ram_aout) >= 256;
- end
-
- // Check if there is room
- always @(usb_ram_ain, usb_ram_aout)
- begin
- if (reset)
- have_space <= 1;
- else if (usb_ram_ain == usb_ram_aout)
- have_space <= ~isfull;
- else if (usb_ram_ain > usb_ram_aout)
- have_space <= (usb_ram_ain - usb_ram_aout) <= 256 * (NUM_PACKETS - 1);
- else
- have_space <= (usb_ram_aout - usb_ram_ain) >= 256;
- end
-
- /* RAM Write Address process */
- always @(posedge clock_in)
- begin
- if( reset )
- usb_ram_ain <= 0 ;
- else
- if( write_enable )
- begin
- usb_ram_ain <= usb_ram_ain + 1 ;
- if (usb_ram_ain + 1 == usb_ram_aout)
- isfull <= 1;
- end
- end
-
- /* RAM Writing process */
- always @(posedge clock_in)
- begin
- if( write_enable )
- begin
- usb_ram[usb_ram_ain] <= ram_data_in ;
- end
- end
-
- /* RAM Read Address process */
- always @(posedge clock_out)
- begin
- if( reset )
- begin
- usb_ram_packet <= 0 ;
- usb_ram_offset <= 0 ;
- isfull <= 0;
- end
- else
- if( skip_packet )
- begin
- usb_ram_packet <= usb_ram_packet + 1 ;
- usb_ram_offset <= 0 ;
- end
- else if(read_enable)
- if( usb_ram_offset == 8'b11111111 )
- begin
- usb_ram_offset <= 0 ;
- usb_ram_packet <= usb_ram_packet + 1 ;
- end
- else
- usb_ram_offset <= usb_ram_offset + 1 ;
- if (usb_ram_ain == usb_ram_aout)
- isfull <= 0;
- end
-
- /* RAM Reading Process */
- always @(posedge clock_out)
- begin
- ram_data_out <= usb_ram[usb_ram_aout] ;
- end
-
-endmodule \ No newline at end of file
diff --git a/usrp/fpga/megacells/.gitignore b/usrp/fpga/megacells/.gitignore
deleted file mode 100644
index c2de89b27..000000000
--- a/usrp/fpga/megacells/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/db
diff --git a/usrp/fpga/megacells/accum32.bsf b/usrp/fpga/megacells/accum32.bsf
deleted file mode 100755
index 494a8200f..000000000
--- a/usrp/fpga/megacells/accum32.bsf
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 240 120)
- (text "accum32" (rect 87 2 166 21)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 101 31 116)(font "Arial" ))
- (port
- (pt 0 40)
- (input)
- (text "data[31..0]" (rect 0 0 73 16)(font "Arial" (font_size 8)))
- (text "data[31..0]" (rect 20 24 82 40)(font "Arial" (font_size 8)))
- (line (pt 0 40)(pt 16 40)(line_width 3))
- )
- (port
- (pt 0 56)
- (input)
- (text "clock" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clock" (rect 20 40 51 56)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 16 56)(line_width 1))
- )
- (port
- (pt 0 72)
- (input)
- (text "clken" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clken" (rect 20 56 51 72)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 16 72)(line_width 1))
- )
- (port
- (pt 0 96)
- (input)
- (text "aclr" (rect 0 0 24 16)(font "Arial" (font_size 8)))
- (text "aclr" (rect 20 80 41 96)(font "Arial" (font_size 8)))
- (line (pt 0 96)(pt 16 96)(line_width 1))
- )
- (port
- (pt 240 56)
- (output)
- (text "result[31..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "result[31..0]" (rect 152 40 221 56)(font "Arial" (font_size 8)))
- (line (pt 240 56)(pt 224 56)(line_width 3))
- )
- (drawing
- (text "acc" (rect 102 48 123 64)(font "Arial" (font_size 8)))
- (text "SIGNED" (rect 177 18 214 32)(font "Arial" ))
- (line (pt 16 16)(pt 224 16)(line_width 1))
- (line (pt 16 16)(pt 16 104)(line_width 1))
- (line (pt 16 104)(pt 224 104)(line_width 1))
- (line (pt 224 16)(pt 224 104)(line_width 1))
- (line (pt 88 24)(pt 136 48)(line_width 1))
- (line (pt 136 64)(pt 136 48)(line_width 1))
- (line (pt 88 88)(pt 136 64)(line_width 1))
- (line (pt 88 24)(pt 88 88)(line_width 1))
- (line (pt 16 40)(pt 88 40)(line_width 1))
- (line (pt 16 56)(pt 88 56)(line_width 1))
- (line (pt 136 56)(pt 224 56)(line_width 1))
- (line (pt 16 72)(pt 88 72)(line_width 1))
- (line (pt 16 72)(pt 88 72)(line_width 1))
- (line (pt 16 96)(pt 104 96)(line_width 1))
- (line (pt 104 96)(pt 104 80)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/accum32.cmp b/usrp/fpga/megacells/accum32.cmp
deleted file mode 100755
index 55b5fdc22..000000000
--- a/usrp/fpga/megacells/accum32.cmp
+++ /dev/null
@@ -1,31 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component accum32
- PORT
- (
- data : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
- clock : IN STD_LOGIC := '0';
- clken : IN STD_LOGIC := '1';
- aclr : IN STD_LOGIC := '0';
- result : OUT STD_LOGIC_VECTOR (31 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/accum32.inc b/usrp/fpga/megacells/accum32.inc
deleted file mode 100755
index 6c6690025..000000000
--- a/usrp/fpga/megacells/accum32.inc
+++ /dev/null
@@ -1,32 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION accum32
-(
- data[31..0],
- clock,
- clken,
- aclr
-)
-
-RETURNS (
- result[31..0]
-);
diff --git a/usrp/fpga/megacells/accum32.v b/usrp/fpga/megacells/accum32.v
deleted file mode 100755
index ce50cbbf1..000000000
--- a/usrp/fpga/megacells/accum32.v
+++ /dev/null
@@ -1,765 +0,0 @@
-// megafunction wizard: %ALTACCUMULATE%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: altaccumulate
-
-// ============================================================
-// File Name: accum32.v
-// Megafunction Name(s):
-// altaccumulate
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-//altaccumulate DEVICE_FAMILY=Cyclone LPM_REPRESENTATION=SIGNED WIDTH_IN=32 WIDTH_OUT=32 aclr clken clock data result
-//VERSION_BEGIN 3.0 cbx_altaccumulate 2003:04:08:16:04:48:SJ cbx_mgl 2003:06:11:11:00:44:SJ cbx_stratix 2003:05:16:10:26:50:SJ VERSION_END
-
-//synthesis_resources = lut 32
-module accum32_accum_nta
- (
- aclr,
- clken,
- clock,
- data,
- result) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clken;
- input clock;
- input [31:0] data;
- output [31:0] result;
-
- wire [0:0] wire_acc_cella_0cout;
- wire [0:0] wire_acc_cella_1cout;
- wire [0:0] wire_acc_cella_2cout;
- wire [0:0] wire_acc_cella_3cout;
- wire [0:0] wire_acc_cella_4cout;
- wire [0:0] wire_acc_cella_5cout;
- wire [0:0] wire_acc_cella_6cout;
- wire [0:0] wire_acc_cella_7cout;
- wire [0:0] wire_acc_cella_8cout;
- wire [0:0] wire_acc_cella_9cout;
- wire [0:0] wire_acc_cella_10cout;
- wire [0:0] wire_acc_cella_11cout;
- wire [0:0] wire_acc_cella_12cout;
- wire [0:0] wire_acc_cella_13cout;
- wire [0:0] wire_acc_cella_14cout;
- wire [0:0] wire_acc_cella_15cout;
- wire [0:0] wire_acc_cella_16cout;
- wire [0:0] wire_acc_cella_17cout;
- wire [0:0] wire_acc_cella_18cout;
- wire [0:0] wire_acc_cella_19cout;
- wire [0:0] wire_acc_cella_20cout;
- wire [0:0] wire_acc_cella_21cout;
- wire [0:0] wire_acc_cella_22cout;
- wire [0:0] wire_acc_cella_23cout;
- wire [0:0] wire_acc_cella_24cout;
- wire [0:0] wire_acc_cella_25cout;
- wire [0:0] wire_acc_cella_26cout;
- wire [0:0] wire_acc_cella_27cout;
- wire [0:0] wire_acc_cella_28cout;
- wire [0:0] wire_acc_cella_29cout;
- wire [0:0] wire_acc_cella_30cout;
- wire [31:0] wire_acc_cella_dataa;
- wire [31:0] wire_acc_cella_datab;
- wire [31:0] wire_acc_cella_datac;
- wire [31:0] wire_acc_cella_regout;
- wire sload;
-
- stratix_lcell acc_cella_0
- (
- .aclr(aclr),
- .cin(1'b0),
- .clk(clock),
- .cout(wire_acc_cella_0cout[0:0]),
- .dataa(wire_acc_cella_dataa[0:0]),
- .datab(wire_acc_cella_datab[0:0]),
- .datac(wire_acc_cella_datac[0:0]),
- .ena(clken),
- .regout(wire_acc_cella_regout[0:0]),
- .sload(sload));
- defparam
- acc_cella_0.cin_used = "true",
- acc_cella_0.lut_mask = "96e8",
- acc_cella_0.operation_mode = "arithmetic",
- acc_cella_0.sum_lutc_input = "cin",
- acc_cella_0.synch_mode = "on",
- acc_cella_0.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_1
- (
- .aclr(aclr),
- .cin(wire_acc_cella_0cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_1cout[0:0]),
- .dataa(wire_acc_cella_dataa[1:1]),
- .datab(wire_acc_cella_datab[1:1]),
- .datac(wire_acc_cella_datac[1:1]),
- .ena(clken),
- .regout(wire_acc_cella_regout[1:1]),
- .sload(sload));
- defparam
- acc_cella_1.cin_used = "true",
- acc_cella_1.lut_mask = "96e8",
- acc_cella_1.operation_mode = "arithmetic",
- acc_cella_1.sum_lutc_input = "cin",
- acc_cella_1.synch_mode = "on",
- acc_cella_1.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_2
- (
- .aclr(aclr),
- .cin(wire_acc_cella_1cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_2cout[0:0]),
- .dataa(wire_acc_cella_dataa[2:2]),
- .datab(wire_acc_cella_datab[2:2]),
- .datac(wire_acc_cella_datac[2:2]),
- .ena(clken),
- .regout(wire_acc_cella_regout[2:2]),
- .sload(sload));
- defparam
- acc_cella_2.cin_used = "true",
- acc_cella_2.lut_mask = "96e8",
- acc_cella_2.operation_mode = "arithmetic",
- acc_cella_2.sum_lutc_input = "cin",
- acc_cella_2.synch_mode = "on",
- acc_cella_2.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_3
- (
- .aclr(aclr),
- .cin(wire_acc_cella_2cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_3cout[0:0]),
- .dataa(wire_acc_cella_dataa[3:3]),
- .datab(wire_acc_cella_datab[3:3]),
- .datac(wire_acc_cella_datac[3:3]),
- .ena(clken),
- .regout(wire_acc_cella_regout[3:3]),
- .sload(sload));
- defparam
- acc_cella_3.cin_used = "true",
- acc_cella_3.lut_mask = "96e8",
- acc_cella_3.operation_mode = "arithmetic",
- acc_cella_3.sum_lutc_input = "cin",
- acc_cella_3.synch_mode = "on",
- acc_cella_3.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_4
- (
- .aclr(aclr),
- .cin(wire_acc_cella_3cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_4cout[0:0]),
- .dataa(wire_acc_cella_dataa[4:4]),
- .datab(wire_acc_cella_datab[4:4]),
- .datac(wire_acc_cella_datac[4:4]),
- .ena(clken),
- .regout(wire_acc_cella_regout[4:4]),
- .sload(sload));
- defparam
- acc_cella_4.cin_used = "true",
- acc_cella_4.lut_mask = "96e8",
- acc_cella_4.operation_mode = "arithmetic",
- acc_cella_4.sum_lutc_input = "cin",
- acc_cella_4.synch_mode = "on",
- acc_cella_4.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_5
- (
- .aclr(aclr),
- .cin(wire_acc_cella_4cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_5cout[0:0]),
- .dataa(wire_acc_cella_dataa[5:5]),
- .datab(wire_acc_cella_datab[5:5]),
- .datac(wire_acc_cella_datac[5:5]),
- .ena(clken),
- .regout(wire_acc_cella_regout[5:5]),
- .sload(sload));
- defparam
- acc_cella_5.cin_used = "true",
- acc_cella_5.lut_mask = "96e8",
- acc_cella_5.operation_mode = "arithmetic",
- acc_cella_5.sum_lutc_input = "cin",
- acc_cella_5.synch_mode = "on",
- acc_cella_5.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_6
- (
- .aclr(aclr),
- .cin(wire_acc_cella_5cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_6cout[0:0]),
- .dataa(wire_acc_cella_dataa[6:6]),
- .datab(wire_acc_cella_datab[6:6]),
- .datac(wire_acc_cella_datac[6:6]),
- .ena(clken),
- .regout(wire_acc_cella_regout[6:6]),
- .sload(sload));
- defparam
- acc_cella_6.cin_used = "true",
- acc_cella_6.lut_mask = "96e8",
- acc_cella_6.operation_mode = "arithmetic",
- acc_cella_6.sum_lutc_input = "cin",
- acc_cella_6.synch_mode = "on",
- acc_cella_6.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_7
- (
- .aclr(aclr),
- .cin(wire_acc_cella_6cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_7cout[0:0]),
- .dataa(wire_acc_cella_dataa[7:7]),
- .datab(wire_acc_cella_datab[7:7]),
- .datac(wire_acc_cella_datac[7:7]),
- .ena(clken),
- .regout(wire_acc_cella_regout[7:7]),
- .sload(sload));
- defparam
- acc_cella_7.cin_used = "true",
- acc_cella_7.lut_mask = "96e8",
- acc_cella_7.operation_mode = "arithmetic",
- acc_cella_7.sum_lutc_input = "cin",
- acc_cella_7.synch_mode = "on",
- acc_cella_7.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_8
- (
- .aclr(aclr),
- .cin(wire_acc_cella_7cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_8cout[0:0]),
- .dataa(wire_acc_cella_dataa[8:8]),
- .datab(wire_acc_cella_datab[8:8]),
- .datac(wire_acc_cella_datac[8:8]),
- .ena(clken),
- .regout(wire_acc_cella_regout[8:8]),
- .sload(sload));
- defparam
- acc_cella_8.cin_used = "true",
- acc_cella_8.lut_mask = "96e8",
- acc_cella_8.operation_mode = "arithmetic",
- acc_cella_8.sum_lutc_input = "cin",
- acc_cella_8.synch_mode = "on",
- acc_cella_8.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_9
- (
- .aclr(aclr),
- .cin(wire_acc_cella_8cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_9cout[0:0]),
- .dataa(wire_acc_cella_dataa[9:9]),
- .datab(wire_acc_cella_datab[9:9]),
- .datac(wire_acc_cella_datac[9:9]),
- .ena(clken),
- .regout(wire_acc_cella_regout[9:9]),
- .sload(sload));
- defparam
- acc_cella_9.cin_used = "true",
- acc_cella_9.lut_mask = "96e8",
- acc_cella_9.operation_mode = "arithmetic",
- acc_cella_9.sum_lutc_input = "cin",
- acc_cella_9.synch_mode = "on",
- acc_cella_9.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_10
- (
- .aclr(aclr),
- .cin(wire_acc_cella_9cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_10cout[0:0]),
- .dataa(wire_acc_cella_dataa[10:10]),
- .datab(wire_acc_cella_datab[10:10]),
- .datac(wire_acc_cella_datac[10:10]),
- .ena(clken),
- .regout(wire_acc_cella_regout[10:10]),
- .sload(sload));
- defparam
- acc_cella_10.cin_used = "true",
- acc_cella_10.lut_mask = "96e8",
- acc_cella_10.operation_mode = "arithmetic",
- acc_cella_10.sum_lutc_input = "cin",
- acc_cella_10.synch_mode = "on",
- acc_cella_10.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_11
- (
- .aclr(aclr),
- .cin(wire_acc_cella_10cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_11cout[0:0]),
- .dataa(wire_acc_cella_dataa[11:11]),
- .datab(wire_acc_cella_datab[11:11]),
- .datac(wire_acc_cella_datac[11:11]),
- .ena(clken),
- .regout(wire_acc_cella_regout[11:11]),
- .sload(sload));
- defparam
- acc_cella_11.cin_used = "true",
- acc_cella_11.lut_mask = "96e8",
- acc_cella_11.operation_mode = "arithmetic",
- acc_cella_11.sum_lutc_input = "cin",
- acc_cella_11.synch_mode = "on",
- acc_cella_11.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_12
- (
- .aclr(aclr),
- .cin(wire_acc_cella_11cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_12cout[0:0]),
- .dataa(wire_acc_cella_dataa[12:12]),
- .datab(wire_acc_cella_datab[12:12]),
- .datac(wire_acc_cella_datac[12:12]),
- .ena(clken),
- .regout(wire_acc_cella_regout[12:12]),
- .sload(sload));
- defparam
- acc_cella_12.cin_used = "true",
- acc_cella_12.lut_mask = "96e8",
- acc_cella_12.operation_mode = "arithmetic",
- acc_cella_12.sum_lutc_input = "cin",
- acc_cella_12.synch_mode = "on",
- acc_cella_12.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_13
- (
- .aclr(aclr),
- .cin(wire_acc_cella_12cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_13cout[0:0]),
- .dataa(wire_acc_cella_dataa[13:13]),
- .datab(wire_acc_cella_datab[13:13]),
- .datac(wire_acc_cella_datac[13:13]),
- .ena(clken),
- .regout(wire_acc_cella_regout[13:13]),
- .sload(sload));
- defparam
- acc_cella_13.cin_used = "true",
- acc_cella_13.lut_mask = "96e8",
- acc_cella_13.operation_mode = "arithmetic",
- acc_cella_13.sum_lutc_input = "cin",
- acc_cella_13.synch_mode = "on",
- acc_cella_13.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_14
- (
- .aclr(aclr),
- .cin(wire_acc_cella_13cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_14cout[0:0]),
- .dataa(wire_acc_cella_dataa[14:14]),
- .datab(wire_acc_cella_datab[14:14]),
- .datac(wire_acc_cella_datac[14:14]),
- .ena(clken),
- .regout(wire_acc_cella_regout[14:14]),
- .sload(sload));
- defparam
- acc_cella_14.cin_used = "true",
- acc_cella_14.lut_mask = "96e8",
- acc_cella_14.operation_mode = "arithmetic",
- acc_cella_14.sum_lutc_input = "cin",
- acc_cella_14.synch_mode = "on",
- acc_cella_14.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_15
- (
- .aclr(aclr),
- .cin(wire_acc_cella_14cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_15cout[0:0]),
- .dataa(wire_acc_cella_dataa[15:15]),
- .datab(wire_acc_cella_datab[15:15]),
- .datac(wire_acc_cella_datac[15:15]),
- .ena(clken),
- .regout(wire_acc_cella_regout[15:15]),
- .sload(sload));
- defparam
- acc_cella_15.cin_used = "true",
- acc_cella_15.lut_mask = "96e8",
- acc_cella_15.operation_mode = "arithmetic",
- acc_cella_15.sum_lutc_input = "cin",
- acc_cella_15.synch_mode = "on",
- acc_cella_15.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_16
- (
- .aclr(aclr),
- .cin(wire_acc_cella_15cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_16cout[0:0]),
- .dataa(wire_acc_cella_dataa[16:16]),
- .datab(wire_acc_cella_datab[16:16]),
- .datac(wire_acc_cella_datac[16:16]),
- .ena(clken),
- .regout(wire_acc_cella_regout[16:16]),
- .sload(sload));
- defparam
- acc_cella_16.cin_used = "true",
- acc_cella_16.lut_mask = "96e8",
- acc_cella_16.operation_mode = "arithmetic",
- acc_cella_16.sum_lutc_input = "cin",
- acc_cella_16.synch_mode = "on",
- acc_cella_16.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_17
- (
- .aclr(aclr),
- .cin(wire_acc_cella_16cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_17cout[0:0]),
- .dataa(wire_acc_cella_dataa[17:17]),
- .datab(wire_acc_cella_datab[17:17]),
- .datac(wire_acc_cella_datac[17:17]),
- .ena(clken),
- .regout(wire_acc_cella_regout[17:17]),
- .sload(sload));
- defparam
- acc_cella_17.cin_used = "true",
- acc_cella_17.lut_mask = "96e8",
- acc_cella_17.operation_mode = "arithmetic",
- acc_cella_17.sum_lutc_input = "cin",
- acc_cella_17.synch_mode = "on",
- acc_cella_17.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_18
- (
- .aclr(aclr),
- .cin(wire_acc_cella_17cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_18cout[0:0]),
- .dataa(wire_acc_cella_dataa[18:18]),
- .datab(wire_acc_cella_datab[18:18]),
- .datac(wire_acc_cella_datac[18:18]),
- .ena(clken),
- .regout(wire_acc_cella_regout[18:18]),
- .sload(sload));
- defparam
- acc_cella_18.cin_used = "true",
- acc_cella_18.lut_mask = "96e8",
- acc_cella_18.operation_mode = "arithmetic",
- acc_cella_18.sum_lutc_input = "cin",
- acc_cella_18.synch_mode = "on",
- acc_cella_18.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_19
- (
- .aclr(aclr),
- .cin(wire_acc_cella_18cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_19cout[0:0]),
- .dataa(wire_acc_cella_dataa[19:19]),
- .datab(wire_acc_cella_datab[19:19]),
- .datac(wire_acc_cella_datac[19:19]),
- .ena(clken),
- .regout(wire_acc_cella_regout[19:19]),
- .sload(sload));
- defparam
- acc_cella_19.cin_used = "true",
- acc_cella_19.lut_mask = "96e8",
- acc_cella_19.operation_mode = "arithmetic",
- acc_cella_19.sum_lutc_input = "cin",
- acc_cella_19.synch_mode = "on",
- acc_cella_19.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_20
- (
- .aclr(aclr),
- .cin(wire_acc_cella_19cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_20cout[0:0]),
- .dataa(wire_acc_cella_dataa[20:20]),
- .datab(wire_acc_cella_datab[20:20]),
- .datac(wire_acc_cella_datac[20:20]),
- .ena(clken),
- .regout(wire_acc_cella_regout[20:20]),
- .sload(sload));
- defparam
- acc_cella_20.cin_used = "true",
- acc_cella_20.lut_mask = "96e8",
- acc_cella_20.operation_mode = "arithmetic",
- acc_cella_20.sum_lutc_input = "cin",
- acc_cella_20.synch_mode = "on",
- acc_cella_20.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_21
- (
- .aclr(aclr),
- .cin(wire_acc_cella_20cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_21cout[0:0]),
- .dataa(wire_acc_cella_dataa[21:21]),
- .datab(wire_acc_cella_datab[21:21]),
- .datac(wire_acc_cella_datac[21:21]),
- .ena(clken),
- .regout(wire_acc_cella_regout[21:21]),
- .sload(sload));
- defparam
- acc_cella_21.cin_used = "true",
- acc_cella_21.lut_mask = "96e8",
- acc_cella_21.operation_mode = "arithmetic",
- acc_cella_21.sum_lutc_input = "cin",
- acc_cella_21.synch_mode = "on",
- acc_cella_21.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_22
- (
- .aclr(aclr),
- .cin(wire_acc_cella_21cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_22cout[0:0]),
- .dataa(wire_acc_cella_dataa[22:22]),
- .datab(wire_acc_cella_datab[22:22]),
- .datac(wire_acc_cella_datac[22:22]),
- .ena(clken),
- .regout(wire_acc_cella_regout[22:22]),
- .sload(sload));
- defparam
- acc_cella_22.cin_used = "true",
- acc_cella_22.lut_mask = "96e8",
- acc_cella_22.operation_mode = "arithmetic",
- acc_cella_22.sum_lutc_input = "cin",
- acc_cella_22.synch_mode = "on",
- acc_cella_22.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_23
- (
- .aclr(aclr),
- .cin(wire_acc_cella_22cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_23cout[0:0]),
- .dataa(wire_acc_cella_dataa[23:23]),
- .datab(wire_acc_cella_datab[23:23]),
- .datac(wire_acc_cella_datac[23:23]),
- .ena(clken),
- .regout(wire_acc_cella_regout[23:23]),
- .sload(sload));
- defparam
- acc_cella_23.cin_used = "true",
- acc_cella_23.lut_mask = "96e8",
- acc_cella_23.operation_mode = "arithmetic",
- acc_cella_23.sum_lutc_input = "cin",
- acc_cella_23.synch_mode = "on",
- acc_cella_23.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_24
- (
- .aclr(aclr),
- .cin(wire_acc_cella_23cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_24cout[0:0]),
- .dataa(wire_acc_cella_dataa[24:24]),
- .datab(wire_acc_cella_datab[24:24]),
- .datac(wire_acc_cella_datac[24:24]),
- .ena(clken),
- .regout(wire_acc_cella_regout[24:24]),
- .sload(sload));
- defparam
- acc_cella_24.cin_used = "true",
- acc_cella_24.lut_mask = "96e8",
- acc_cella_24.operation_mode = "arithmetic",
- acc_cella_24.sum_lutc_input = "cin",
- acc_cella_24.synch_mode = "on",
- acc_cella_24.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_25
- (
- .aclr(aclr),
- .cin(wire_acc_cella_24cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_25cout[0:0]),
- .dataa(wire_acc_cella_dataa[25:25]),
- .datab(wire_acc_cella_datab[25:25]),
- .datac(wire_acc_cella_datac[25:25]),
- .ena(clken),
- .regout(wire_acc_cella_regout[25:25]),
- .sload(sload));
- defparam
- acc_cella_25.cin_used = "true",
- acc_cella_25.lut_mask = "96e8",
- acc_cella_25.operation_mode = "arithmetic",
- acc_cella_25.sum_lutc_input = "cin",
- acc_cella_25.synch_mode = "on",
- acc_cella_25.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_26
- (
- .aclr(aclr),
- .cin(wire_acc_cella_25cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_26cout[0:0]),
- .dataa(wire_acc_cella_dataa[26:26]),
- .datab(wire_acc_cella_datab[26:26]),
- .datac(wire_acc_cella_datac[26:26]),
- .ena(clken),
- .regout(wire_acc_cella_regout[26:26]),
- .sload(sload));
- defparam
- acc_cella_26.cin_used = "true",
- acc_cella_26.lut_mask = "96e8",
- acc_cella_26.operation_mode = "arithmetic",
- acc_cella_26.sum_lutc_input = "cin",
- acc_cella_26.synch_mode = "on",
- acc_cella_26.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_27
- (
- .aclr(aclr),
- .cin(wire_acc_cella_26cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_27cout[0:0]),
- .dataa(wire_acc_cella_dataa[27:27]),
- .datab(wire_acc_cella_datab[27:27]),
- .datac(wire_acc_cella_datac[27:27]),
- .ena(clken),
- .regout(wire_acc_cella_regout[27:27]),
- .sload(sload));
- defparam
- acc_cella_27.cin_used = "true",
- acc_cella_27.lut_mask = "96e8",
- acc_cella_27.operation_mode = "arithmetic",
- acc_cella_27.sum_lutc_input = "cin",
- acc_cella_27.synch_mode = "on",
- acc_cella_27.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_28
- (
- .aclr(aclr),
- .cin(wire_acc_cella_27cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_28cout[0:0]),
- .dataa(wire_acc_cella_dataa[28:28]),
- .datab(wire_acc_cella_datab[28:28]),
- .datac(wire_acc_cella_datac[28:28]),
- .ena(clken),
- .regout(wire_acc_cella_regout[28:28]),
- .sload(sload));
- defparam
- acc_cella_28.cin_used = "true",
- acc_cella_28.lut_mask = "96e8",
- acc_cella_28.operation_mode = "arithmetic",
- acc_cella_28.sum_lutc_input = "cin",
- acc_cella_28.synch_mode = "on",
- acc_cella_28.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_29
- (
- .aclr(aclr),
- .cin(wire_acc_cella_28cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_29cout[0:0]),
- .dataa(wire_acc_cella_dataa[29:29]),
- .datab(wire_acc_cella_datab[29:29]),
- .datac(wire_acc_cella_datac[29:29]),
- .ena(clken),
- .regout(wire_acc_cella_regout[29:29]),
- .sload(sload));
- defparam
- acc_cella_29.cin_used = "true",
- acc_cella_29.lut_mask = "96e8",
- acc_cella_29.operation_mode = "arithmetic",
- acc_cella_29.sum_lutc_input = "cin",
- acc_cella_29.synch_mode = "on",
- acc_cella_29.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_30
- (
- .aclr(aclr),
- .cin(wire_acc_cella_29cout[0:0]),
- .clk(clock),
- .cout(wire_acc_cella_30cout[0:0]),
- .dataa(wire_acc_cella_dataa[30:30]),
- .datab(wire_acc_cella_datab[30:30]),
- .datac(wire_acc_cella_datac[30:30]),
- .ena(clken),
- .regout(wire_acc_cella_regout[30:30]),
- .sload(sload));
- defparam
- acc_cella_30.cin_used = "true",
- acc_cella_30.lut_mask = "96e8",
- acc_cella_30.operation_mode = "arithmetic",
- acc_cella_30.sum_lutc_input = "cin",
- acc_cella_30.synch_mode = "on",
- acc_cella_30.lpm_type = "stratix_lcell";
- stratix_lcell acc_cella_31
- (
- .aclr(aclr),
- .cin(wire_acc_cella_30cout[0:0]),
- .clk(clock),
- .dataa(wire_acc_cella_dataa[31:31]),
- .datab(wire_acc_cella_datab[31:31]),
- .datac(wire_acc_cella_datac[31:31]),
- .ena(clken),
- .regout(wire_acc_cella_regout[31:31]),
- .sload(sload));
- defparam
- acc_cella_31.cin_used = "true",
- acc_cella_31.lut_mask = "9696",
- acc_cella_31.operation_mode = "normal",
- acc_cella_31.sum_lutc_input = "cin",
- acc_cella_31.synch_mode = "on",
- acc_cella_31.lpm_type = "stratix_lcell";
- assign
- wire_acc_cella_dataa = data,
- wire_acc_cella_datab = wire_acc_cella_regout,
- wire_acc_cella_datac = data;
- assign
- result = wire_acc_cella_regout,
- sload = 1'b0;
-endmodule //accum32_accum_nta
-//VALID FILE
-
-
-module accum32 (
- data,
- clock,
- clken,
- aclr,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [31:0] data;
- input clock;
- input clken;
- input aclr;
- output [31:0] result;
-
- wire [31:0] sub_wire0;
- wire [31:0] result = sub_wire0[31:0];
-
- accum32_accum_nta accum32_accum_nta_component (
- .clken (clken),
- .aclr (aclr),
- .clock (clock),
- .data (data),
- .result (sub_wire0));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: WIDTH_IN NUMERIC "32"
-// Retrieval info: PRIVATE: WIDTH_OUT NUMERIC "32"
-// Retrieval info: PRIVATE: LPM_REPRESENTATION NUMERIC "0"
-// Retrieval info: PRIVATE: SLOAD NUMERIC "0"
-// Retrieval info: PRIVATE: ADD_SUB NUMERIC "0"
-// Retrieval info: PRIVATE: CIN NUMERIC "0"
-// Retrieval info: PRIVATE: CLKEN NUMERIC "1"
-// Retrieval info: PRIVATE: ACLR NUMERIC "1"
-// Retrieval info: PRIVATE: COUT NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW NUMERIC "0"
-// Retrieval info: PRIVATE: LATENCY NUMERIC "0"
-// Retrieval info: PRIVATE: EXTRA_LATENCY NUMERIC "0"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: WIDTH_IN NUMERIC "32"
-// Retrieval info: CONSTANT: WIDTH_OUT NUMERIC "32"
-// Retrieval info: CONSTANT: LPM_REPRESENTATION STRING "SIGNED"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "altaccumulate"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: data 0 0 32 0 INPUT NODEFVAL data[31..0]
-// Retrieval info: USED_PORT: result 0 0 32 0 OUTPUT NODEFVAL result[31..0]
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT GND clock
-// Retrieval info: USED_PORT: clken 0 0 0 0 INPUT VCC clken
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: CONNECT: @data 0 0 32 0 data 0 0 32 0
-// Retrieval info: CONNECT: result 0 0 32 0 @result 0 0 32 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: CONNECT: @clken 0 0 0 0 clken 0 0 0 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
diff --git a/usrp/fpga/megacells/accum32_bb.v b/usrp/fpga/megacells/accum32_bb.v
deleted file mode 100755
index 142bde88c..000000000
--- a/usrp/fpga/megacells/accum32_bb.v
+++ /dev/null
@@ -1,35 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module accum32 (
- data,
- clock,
- clken,
- aclr,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [31:0] data;
- input clock;
- input clken;
- input aclr;
- output [31:0] result;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/accum32_inst.v b/usrp/fpga/megacells/accum32_inst.v
deleted file mode 100755
index c354accae..000000000
--- a/usrp/fpga/megacells/accum32_inst.v
+++ /dev/null
@@ -1,7 +0,0 @@
-accum32 accum32_inst (
- .data ( data_sig ),
- .clock ( clock_sig ),
- .clken ( clken_sig ),
- .aclr ( aclr_sig ),
- .result ( result_sig )
- );
diff --git a/usrp/fpga/megacells/add32.bsf b/usrp/fpga/megacells/add32.bsf
deleted file mode 100755
index b2da9fc2a..000000000
--- a/usrp/fpga/megacells/add32.bsf
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 96)
- (text "add32" (rect 58 2 111 21)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 77 31 92)(font "Arial" ))
- (port
- (pt 0 40)
- (input)
- (text "dataa[7..0]" (rect 0 0 73 16)(font "Arial" (font_size 8)))
- (text "dataa[7..0]" (rect 4 24 66 40)(font "Arial" (font_size 8)))
- (line (pt 0 40)(pt 64 40)(line_width 3))
- )
- (port
- (pt 0 72)
- (input)
- (text "datab[7..0]" (rect 0 0 73 16)(font "Arial" (font_size 8)))
- (text "datab[7..0]" (rect 4 56 66 72)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 64 72)(line_width 3))
- )
- (port
- (pt 160 56)
- (output)
- (text "result[7..0]" (rect 0 0 73 16)(font "Arial" (font_size 8)))
- (text "result[7..0]" (rect 95 40 157 56)(font "Arial" (font_size 8)))
- (line (pt 160 56)(pt 96 56)(line_width 3))
- )
- (drawing
- (text "A" (rect 66 32 75 48)(font "Arial" (font_size 8)))
- (text "B" (rect 66 64 75 80)(font "Arial" (font_size 8)))
- (text "A+B" (rect 68 48 94 64)(font "Arial" (font_size 8)))
- (line (pt 64 32)(pt 96 40)(line_width 1))
- (line (pt 96 40)(pt 96 72)(line_width 1))
- (line (pt 96 72)(pt 64 80)(line_width 1))
- (line (pt 64 80)(pt 64 32)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/add32.cmp b/usrp/fpga/megacells/add32.cmp
deleted file mode 100755
index 3b120176d..000000000
--- a/usrp/fpga/megacells/add32.cmp
+++ /dev/null
@@ -1,29 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component add32
- PORT
- (
- dataa : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
- datab : IN STD_LOGIC_VECTOR (7 DOWNTO 0);
- result : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/add32.inc b/usrp/fpga/megacells/add32.inc
deleted file mode 100755
index 675525713..000000000
--- a/usrp/fpga/megacells/add32.inc
+++ /dev/null
@@ -1,30 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION add32
-(
- dataa[7..0],
- datab[7..0]
-)
-
-RETURNS (
- result[7..0]
-);
diff --git a/usrp/fpga/megacells/add32.v b/usrp/fpga/megacells/add32.v
deleted file mode 100755
index d8090617a..000000000
--- a/usrp/fpga/megacells/add32.v
+++ /dev/null
@@ -1,221 +0,0 @@
-// megafunction wizard: %LPM_ADD_SUB%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: lpm_add_sub
-
-// ============================================================
-// File Name: add32.v
-// Megafunction Name(s):
-// lpm_add_sub
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-//lpm_add_sub DEVICE_FAMILY=Cyclone LPM_DIRECTION=ADD LPM_WIDTH=8 dataa datab result
-//VERSION_BEGIN 3.0 cbx_lpm_add_sub 2003:04:10:18:28:42:SJ cbx_mgl 2003:06:11:11:00:44:SJ cbx_stratix 2003:05:16:10:26:50:SJ VERSION_END
-
-//synthesis_resources = lut 8
-module add32_add_sub_nq7
- (
- dataa,
- datab,
- result) /* synthesis synthesis_clearbox=1 */;
- input [7:0] dataa;
- input [7:0] datab;
- output [7:0] result;
-
- wire [7:0] wire_add_sub_cella_combout;
- wire [0:0] wire_add_sub_cella_0cout;
- wire [0:0] wire_add_sub_cella_1cout;
- wire [0:0] wire_add_sub_cella_2cout;
- wire [0:0] wire_add_sub_cella_3cout;
- wire [0:0] wire_add_sub_cella_4cout;
- wire [0:0] wire_add_sub_cella_5cout;
- wire [0:0] wire_add_sub_cella_6cout;
- wire [7:0] wire_add_sub_cella_dataa;
- wire [7:0] wire_add_sub_cella_datab;
-
- stratix_lcell add_sub_cella_0
- (
- .cin(1'b0),
- .combout(wire_add_sub_cella_combout[0:0]),
- .cout(wire_add_sub_cella_0cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[0:0]),
- .datab(wire_add_sub_cella_datab[0:0]));
- defparam
- add_sub_cella_0.cin_used = "true",
- add_sub_cella_0.lut_mask = "96e8",
- add_sub_cella_0.operation_mode = "arithmetic",
- add_sub_cella_0.sum_lutc_input = "cin",
- add_sub_cella_0.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_1
- (
- .cin(wire_add_sub_cella_0cout[0:0]),
- .combout(wire_add_sub_cella_combout[1:1]),
- .cout(wire_add_sub_cella_1cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[1:1]),
- .datab(wire_add_sub_cella_datab[1:1]));
- defparam
- add_sub_cella_1.cin_used = "true",
- add_sub_cella_1.lut_mask = "96e8",
- add_sub_cella_1.operation_mode = "arithmetic",
- add_sub_cella_1.sum_lutc_input = "cin",
- add_sub_cella_1.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_2
- (
- .cin(wire_add_sub_cella_1cout[0:0]),
- .combout(wire_add_sub_cella_combout[2:2]),
- .cout(wire_add_sub_cella_2cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[2:2]),
- .datab(wire_add_sub_cella_datab[2:2]));
- defparam
- add_sub_cella_2.cin_used = "true",
- add_sub_cella_2.lut_mask = "96e8",
- add_sub_cella_2.operation_mode = "arithmetic",
- add_sub_cella_2.sum_lutc_input = "cin",
- add_sub_cella_2.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_3
- (
- .cin(wire_add_sub_cella_2cout[0:0]),
- .combout(wire_add_sub_cella_combout[3:3]),
- .cout(wire_add_sub_cella_3cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[3:3]),
- .datab(wire_add_sub_cella_datab[3:3]));
- defparam
- add_sub_cella_3.cin_used = "true",
- add_sub_cella_3.lut_mask = "96e8",
- add_sub_cella_3.operation_mode = "arithmetic",
- add_sub_cella_3.sum_lutc_input = "cin",
- add_sub_cella_3.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_4
- (
- .cin(wire_add_sub_cella_3cout[0:0]),
- .combout(wire_add_sub_cella_combout[4:4]),
- .cout(wire_add_sub_cella_4cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[4:4]),
- .datab(wire_add_sub_cella_datab[4:4]));
- defparam
- add_sub_cella_4.cin_used = "true",
- add_sub_cella_4.lut_mask = "96e8",
- add_sub_cella_4.operation_mode = "arithmetic",
- add_sub_cella_4.sum_lutc_input = "cin",
- add_sub_cella_4.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_5
- (
- .cin(wire_add_sub_cella_4cout[0:0]),
- .combout(wire_add_sub_cella_combout[5:5]),
- .cout(wire_add_sub_cella_5cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[5:5]),
- .datab(wire_add_sub_cella_datab[5:5]));
- defparam
- add_sub_cella_5.cin_used = "true",
- add_sub_cella_5.lut_mask = "96e8",
- add_sub_cella_5.operation_mode = "arithmetic",
- add_sub_cella_5.sum_lutc_input = "cin",
- add_sub_cella_5.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_6
- (
- .cin(wire_add_sub_cella_5cout[0:0]),
- .combout(wire_add_sub_cella_combout[6:6]),
- .cout(wire_add_sub_cella_6cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[6:6]),
- .datab(wire_add_sub_cella_datab[6:6]));
- defparam
- add_sub_cella_6.cin_used = "true",
- add_sub_cella_6.lut_mask = "96e8",
- add_sub_cella_6.operation_mode = "arithmetic",
- add_sub_cella_6.sum_lutc_input = "cin",
- add_sub_cella_6.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_7
- (
- .cin(wire_add_sub_cella_6cout[0:0]),
- .combout(wire_add_sub_cella_combout[7:7]),
- .dataa(wire_add_sub_cella_dataa[7:7]),
- .datab(wire_add_sub_cella_datab[7:7]));
- defparam
- add_sub_cella_7.cin_used = "true",
- add_sub_cella_7.lut_mask = "9696",
- add_sub_cella_7.operation_mode = "normal",
- add_sub_cella_7.sum_lutc_input = "cin",
- add_sub_cella_7.lpm_type = "stratix_lcell";
- assign
- wire_add_sub_cella_dataa = dataa,
- wire_add_sub_cella_datab = datab;
- assign
- result = wire_add_sub_cella_combout;
-endmodule //add32_add_sub_nq7
-//VALID FILE
-
-
-module add32 (
- dataa,
- datab,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [7:0] dataa;
- input [7:0] datab;
- output [7:0] result;
-
- wire [7:0] sub_wire0;
- wire [7:0] result = sub_wire0[7:0];
-
- add32_add_sub_nq7 add32_add_sub_nq7_component (
- .dataa (dataa),
- .datab (datab),
- .result (sub_wire0));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: nBit NUMERIC "8"
-// Retrieval info: PRIVATE: Function NUMERIC "0"
-// Retrieval info: PRIVATE: WhichConstant NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantA NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantB NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtA NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtB NUMERIC "0"
-// Retrieval info: PRIVATE: CarryIn NUMERIC "0"
-// Retrieval info: PRIVATE: CarryOut NUMERIC "0"
-// Retrieval info: PRIVATE: Overflow NUMERIC "0"
-// Retrieval info: PRIVATE: Latency NUMERIC "0"
-// Retrieval info: PRIVATE: aclr NUMERIC "0"
-// Retrieval info: PRIVATE: clken NUMERIC "0"
-// Retrieval info: PRIVATE: LPM_PIPELINE NUMERIC "0"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "8"
-// Retrieval info: CONSTANT: LPM_DIRECTION STRING "ADD"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_ADD_SUB"
-// Retrieval info: CONSTANT: LPM_HINT STRING "ONE_INPUT_IS_CONSTANT=NO"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: result 0 0 8 0 OUTPUT NODEFVAL result[7..0]
-// Retrieval info: USED_PORT: dataa 0 0 8 0 INPUT NODEFVAL dataa[7..0]
-// Retrieval info: USED_PORT: datab 0 0 8 0 INPUT NODEFVAL datab[7..0]
-// Retrieval info: CONNECT: result 0 0 8 0 @result 0 0 8 0
-// Retrieval info: CONNECT: @dataa 0 0 8 0 dataa 0 0 8 0
-// Retrieval info: CONNECT: @datab 0 0 8 0 datab 0 0 8 0
-// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
diff --git a/usrp/fpga/megacells/add32_bb.v b/usrp/fpga/megacells/add32_bb.v
deleted file mode 100755
index 8d1588cc6..000000000
--- a/usrp/fpga/megacells/add32_bb.v
+++ /dev/null
@@ -1,31 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module add32 (
- dataa,
- datab,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [7:0] dataa;
- input [7:0] datab;
- output [7:0] result;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/add32_inst.v b/usrp/fpga/megacells/add32_inst.v
deleted file mode 100755
index bc7e6d441..000000000
--- a/usrp/fpga/megacells/add32_inst.v
+++ /dev/null
@@ -1,5 +0,0 @@
-add32 add32_inst (
- .dataa ( dataa_sig ),
- .datab ( datab_sig ),
- .result ( result_sig )
- );
diff --git a/usrp/fpga/megacells/addsub16.bsf b/usrp/fpga/megacells/addsub16.bsf
deleted file mode 100755
index 9ed6b72ae..000000000
--- a/usrp/fpga/megacells/addsub16.bsf
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 144)
- (text "addsub16" (rect 45 2 128 21)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 125 31 140)(font "Arial" ))
- (port
- (pt 0 56)
- (input)
- (text "dataa[15..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "dataa[15..0]" (rect 4 40 73 56)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 64 56)(line_width 3))
- )
- (port
- (pt 0 88)
- (input)
- (text "datab[15..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "datab[15..0]" (rect 4 72 73 88)(font "Arial" (font_size 8)))
- (line (pt 0 88)(pt 64 88)(line_width 3))
- )
- (port
- (pt 0 72)
- (input)
- (text "clock" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clock" (rect 4 56 35 72)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 64 72)(line_width 1))
- )
- (port
- (pt 0 32)
- (input)
- (text "add_sub" (rect 0 0 57 16)(font "Arial" (font_size 8)))
- (text "add_sub" (rect 4 16 53 32)(font "Arial" (font_size 8)))
- (line (pt 0 32)(pt 80 32)(line_width 1))
- )
- (port
- (pt 0 112)
- (input)
- (text "clken" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clken" (rect 4 96 35 112)(font "Arial" (font_size 8)))
- (line (pt 0 112)(pt 74 112)(line_width 1))
- )
- (port
- (pt 0 128)
- (input)
- (text "aclr" (rect 0 0 24 16)(font "Arial" (font_size 8)))
- (text "aclr" (rect 4 112 25 128)(font "Arial" (font_size 8)))
- (line (pt 0 128)(pt 85 128)(line_width 1))
- )
- (port
- (pt 160 72)
- (output)
- (text "result[15..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "result[15..0]" (rect 88 56 157 72)(font "Arial" (font_size 8)))
- (line (pt 160 72)(pt 96 72)(line_width 3))
- )
- (drawing
- (text "A" (rect 66 48 75 64)(font "Arial" (font_size 8)))
- (text "B" (rect 66 80 75 96)(font "Arial" (font_size 8)))
- (text "A+B/A-B" (rect 82 37 134 53)(font "Arial" (font_size 8)))
- (line (pt 64 48)(pt 96 56)(line_width 1))
- (line (pt 96 56)(pt 96 88)(line_width 1))
- (line (pt 96 88)(pt 64 96)(line_width 1))
- (line (pt 64 96)(pt 64 48)(line_width 1))
- (line (pt 80 32)(pt 80 52)(line_width 1))
- (line (pt 106 40)(pt 125 40)(line_width 1))
- (line (pt 74 112)(pt 74 93)(line_width 1))
- (line (pt 85 128)(pt 85 90)(line_width 1))
- (line (pt 64 66)(pt 70 72)(line_width 1))
- (line (pt 70 72)(pt 64 78)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/addsub16.cmp b/usrp/fpga/megacells/addsub16.cmp
deleted file mode 100755
index e32e01b31..000000000
--- a/usrp/fpga/megacells/addsub16.cmp
+++ /dev/null
@@ -1,33 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component addsub16
- PORT
- (
- add_sub : IN STD_LOGIC ;
- dataa : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- datab : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- clock : IN STD_LOGIC ;
- aclr : IN STD_LOGIC ;
- clken : IN STD_LOGIC ;
- result : OUT STD_LOGIC_VECTOR (15 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/addsub16.inc b/usrp/fpga/megacells/addsub16.inc
deleted file mode 100755
index 846f301d2..000000000
--- a/usrp/fpga/megacells/addsub16.inc
+++ /dev/null
@@ -1,34 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION addsub16
-(
- add_sub,
- dataa[15..0],
- datab[15..0],
- clock,
- aclr,
- clken
-)
-
-RETURNS (
- result[15..0]
-);
diff --git a/usrp/fpga/megacells/addsub16.v b/usrp/fpga/megacells/addsub16.v
deleted file mode 100755
index 431af3e43..000000000
--- a/usrp/fpga/megacells/addsub16.v
+++ /dev/null
@@ -1,438 +0,0 @@
-// megafunction wizard: %LPM_ADD_SUB%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: lpm_add_sub
-
-// ============================================================
-// File Name: addsub16.v
-// Megafunction Name(s):
-// lpm_add_sub
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-//lpm_add_sub DEVICE_FAMILY=Cyclone LPM_PIPELINE=1 LPM_WIDTH=16 aclr add_sub clken clock dataa datab result
-//VERSION_BEGIN 3.0 cbx_lpm_add_sub 2003:04:10:18:28:42:SJ cbx_mgl 2003:06:11:11:00:44:SJ cbx_stratix 2003:05:16:10:26:50:SJ VERSION_END
-
-//synthesis_resources = lut 17
-module addsub16_add_sub_gp9
- (
- aclr,
- add_sub,
- clken,
- clock,
- dataa,
- datab,
- result) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input add_sub;
- input clken;
- input clock;
- input [15:0] dataa;
- input [15:0] datab;
- output [15:0] result;
-
- wire [0:0] wire_add_sub_cella_0cout;
- wire [0:0] wire_add_sub_cella_1cout;
- wire [0:0] wire_add_sub_cella_2cout;
- wire [0:0] wire_add_sub_cella_3cout;
- wire [0:0] wire_add_sub_cella_4cout;
- wire [0:0] wire_add_sub_cella_5cout;
- wire [0:0] wire_add_sub_cella_6cout;
- wire [0:0] wire_add_sub_cella_7cout;
- wire [0:0] wire_add_sub_cella_8cout;
- wire [0:0] wire_add_sub_cella_9cout;
- wire [0:0] wire_add_sub_cella_10cout;
- wire [0:0] wire_add_sub_cella_11cout;
- wire [0:0] wire_add_sub_cella_12cout;
- wire [0:0] wire_add_sub_cella_13cout;
- wire [0:0] wire_add_sub_cella_14cout;
- wire [15:0] wire_add_sub_cella_dataa;
- wire [15:0] wire_add_sub_cella_datab;
- wire [15:0] wire_add_sub_cella_regout;
- wire wire_strx_lcell1_cout;
-
- stratix_lcell add_sub_cella_0
- (
- .aclr(aclr),
- .cin(wire_strx_lcell1_cout),
- .clk(clock),
- .cout(wire_add_sub_cella_0cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[0:0]),
- .datab(wire_add_sub_cella_datab[0:0]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[0:0]));
- defparam
- add_sub_cella_0.cin_used = "true",
- add_sub_cella_0.lut_mask = "96e8",
- add_sub_cella_0.operation_mode = "arithmetic",
- add_sub_cella_0.sum_lutc_input = "cin",
- add_sub_cella_0.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_1
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_0cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_1cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[1:1]),
- .datab(wire_add_sub_cella_datab[1:1]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[1:1]));
- defparam
- add_sub_cella_1.cin_used = "true",
- add_sub_cella_1.lut_mask = "96e8",
- add_sub_cella_1.operation_mode = "arithmetic",
- add_sub_cella_1.sum_lutc_input = "cin",
- add_sub_cella_1.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_2
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_1cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_2cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[2:2]),
- .datab(wire_add_sub_cella_datab[2:2]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[2:2]));
- defparam
- add_sub_cella_2.cin_used = "true",
- add_sub_cella_2.lut_mask = "96e8",
- add_sub_cella_2.operation_mode = "arithmetic",
- add_sub_cella_2.sum_lutc_input = "cin",
- add_sub_cella_2.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_3
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_2cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_3cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[3:3]),
- .datab(wire_add_sub_cella_datab[3:3]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[3:3]));
- defparam
- add_sub_cella_3.cin_used = "true",
- add_sub_cella_3.lut_mask = "96e8",
- add_sub_cella_3.operation_mode = "arithmetic",
- add_sub_cella_3.sum_lutc_input = "cin",
- add_sub_cella_3.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_4
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_3cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_4cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[4:4]),
- .datab(wire_add_sub_cella_datab[4:4]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[4:4]));
- defparam
- add_sub_cella_4.cin_used = "true",
- add_sub_cella_4.lut_mask = "96e8",
- add_sub_cella_4.operation_mode = "arithmetic",
- add_sub_cella_4.sum_lutc_input = "cin",
- add_sub_cella_4.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_5
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_4cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_5cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[5:5]),
- .datab(wire_add_sub_cella_datab[5:5]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[5:5]));
- defparam
- add_sub_cella_5.cin_used = "true",
- add_sub_cella_5.lut_mask = "96e8",
- add_sub_cella_5.operation_mode = "arithmetic",
- add_sub_cella_5.sum_lutc_input = "cin",
- add_sub_cella_5.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_6
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_5cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_6cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[6:6]),
- .datab(wire_add_sub_cella_datab[6:6]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[6:6]));
- defparam
- add_sub_cella_6.cin_used = "true",
- add_sub_cella_6.lut_mask = "96e8",
- add_sub_cella_6.operation_mode = "arithmetic",
- add_sub_cella_6.sum_lutc_input = "cin",
- add_sub_cella_6.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_7
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_6cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_7cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[7:7]),
- .datab(wire_add_sub_cella_datab[7:7]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[7:7]));
- defparam
- add_sub_cella_7.cin_used = "true",
- add_sub_cella_7.lut_mask = "96e8",
- add_sub_cella_7.operation_mode = "arithmetic",
- add_sub_cella_7.sum_lutc_input = "cin",
- add_sub_cella_7.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_8
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_7cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_8cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[8:8]),
- .datab(wire_add_sub_cella_datab[8:8]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[8:8]));
- defparam
- add_sub_cella_8.cin_used = "true",
- add_sub_cella_8.lut_mask = "96e8",
- add_sub_cella_8.operation_mode = "arithmetic",
- add_sub_cella_8.sum_lutc_input = "cin",
- add_sub_cella_8.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_9
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_8cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_9cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[9:9]),
- .datab(wire_add_sub_cella_datab[9:9]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[9:9]));
- defparam
- add_sub_cella_9.cin_used = "true",
- add_sub_cella_9.lut_mask = "96e8",
- add_sub_cella_9.operation_mode = "arithmetic",
- add_sub_cella_9.sum_lutc_input = "cin",
- add_sub_cella_9.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_10
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_9cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_10cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[10:10]),
- .datab(wire_add_sub_cella_datab[10:10]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[10:10]));
- defparam
- add_sub_cella_10.cin_used = "true",
- add_sub_cella_10.lut_mask = "96e8",
- add_sub_cella_10.operation_mode = "arithmetic",
- add_sub_cella_10.sum_lutc_input = "cin",
- add_sub_cella_10.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_11
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_10cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_11cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[11:11]),
- .datab(wire_add_sub_cella_datab[11:11]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[11:11]));
- defparam
- add_sub_cella_11.cin_used = "true",
- add_sub_cella_11.lut_mask = "96e8",
- add_sub_cella_11.operation_mode = "arithmetic",
- add_sub_cella_11.sum_lutc_input = "cin",
- add_sub_cella_11.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_12
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_11cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_12cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[12:12]),
- .datab(wire_add_sub_cella_datab[12:12]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[12:12]));
- defparam
- add_sub_cella_12.cin_used = "true",
- add_sub_cella_12.lut_mask = "96e8",
- add_sub_cella_12.operation_mode = "arithmetic",
- add_sub_cella_12.sum_lutc_input = "cin",
- add_sub_cella_12.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_13
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_12cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_13cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[13:13]),
- .datab(wire_add_sub_cella_datab[13:13]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[13:13]));
- defparam
- add_sub_cella_13.cin_used = "true",
- add_sub_cella_13.lut_mask = "96e8",
- add_sub_cella_13.operation_mode = "arithmetic",
- add_sub_cella_13.sum_lutc_input = "cin",
- add_sub_cella_13.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_14
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_13cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_14cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[14:14]),
- .datab(wire_add_sub_cella_datab[14:14]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[14:14]));
- defparam
- add_sub_cella_14.cin_used = "true",
- add_sub_cella_14.lut_mask = "96e8",
- add_sub_cella_14.operation_mode = "arithmetic",
- add_sub_cella_14.sum_lutc_input = "cin",
- add_sub_cella_14.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_15
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_14cout[0:0]),
- .clk(clock),
- .dataa(wire_add_sub_cella_dataa[15:15]),
- .datab(wire_add_sub_cella_datab[15:15]),
- .ena(clken),
- .inverta((~ add_sub)),
- .regout(wire_add_sub_cella_regout[15:15]));
- defparam
- add_sub_cella_15.cin_used = "true",
- add_sub_cella_15.lut_mask = "9696",
- add_sub_cella_15.operation_mode = "normal",
- add_sub_cella_15.sum_lutc_input = "cin",
- add_sub_cella_15.lpm_type = "stratix_lcell";
- assign
- wire_add_sub_cella_dataa = datab,
- wire_add_sub_cella_datab = dataa;
- stratix_lcell strx_lcell1
- (
- .cout(wire_strx_lcell1_cout),
- .dataa(1'b0),
- .datab((~ add_sub)),
- .inverta((~ add_sub)));
- defparam
- strx_lcell1.cin_used = "false",
- strx_lcell1.lut_mask = "00cc",
- strx_lcell1.operation_mode = "arithmetic",
- strx_lcell1.lpm_type = "stratix_lcell";
- assign
- result = wire_add_sub_cella_regout;
-endmodule //addsub16_add_sub_gp9
-//VALID FILE
-
-
-module addsub16 (
- add_sub,
- dataa,
- datab,
- clock,
- aclr,
- clken,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input add_sub;
- input [15:0] dataa;
- input [15:0] datab;
- input clock;
- input aclr;
- input clken;
- output [15:0] result;
-
- wire [15:0] sub_wire0;
- wire [15:0] result = sub_wire0[15:0];
-
- addsub16_add_sub_gp9 addsub16_add_sub_gp9_component (
- .dataa (dataa),
- .add_sub (add_sub),
- .datab (datab),
- .clken (clken),
- .aclr (aclr),
- .clock (clock),
- .result (sub_wire0));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: nBit NUMERIC "16"
-// Retrieval info: PRIVATE: Function NUMERIC "2"
-// Retrieval info: PRIVATE: WhichConstant NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantA NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantB NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtA NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtB NUMERIC "0"
-// Retrieval info: PRIVATE: CarryIn NUMERIC "0"
-// Retrieval info: PRIVATE: CarryOut NUMERIC "0"
-// Retrieval info: PRIVATE: Overflow NUMERIC "0"
-// Retrieval info: PRIVATE: Latency NUMERIC "1"
-// Retrieval info: PRIVATE: aclr NUMERIC "1"
-// Retrieval info: PRIVATE: clken NUMERIC "1"
-// Retrieval info: PRIVATE: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_DIRECTION STRING "UNUSED"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_ADD_SUB"
-// Retrieval info: CONSTANT: LPM_HINT STRING "ONE_INPUT_IS_CONSTANT=NO"
-// Retrieval info: CONSTANT: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: add_sub 0 0 0 0 INPUT NODEFVAL add_sub
-// Retrieval info: USED_PORT: result 0 0 16 0 OUTPUT NODEFVAL result[15..0]
-// Retrieval info: USED_PORT: dataa 0 0 16 0 INPUT NODEFVAL dataa[15..0]
-// Retrieval info: USED_PORT: datab 0 0 16 0 INPUT NODEFVAL datab[15..0]
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL aclr
-// Retrieval info: USED_PORT: clken 0 0 0 0 INPUT NODEFVAL clken
-// Retrieval info: CONNECT: @add_sub 0 0 0 0 add_sub 0 0 0 0
-// Retrieval info: CONNECT: result 0 0 16 0 @result 0 0 16 0
-// Retrieval info: CONNECT: @dataa 0 0 16 0 dataa 0 0 16 0
-// Retrieval info: CONNECT: @datab 0 0 16 0 datab 0 0 16 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: CONNECT: @clken 0 0 0 0 clken 0 0 0 0
-// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
diff --git a/usrp/fpga/megacells/addsub16_bb.v b/usrp/fpga/megacells/addsub16_bb.v
deleted file mode 100755
index 8e1e7c69f..000000000
--- a/usrp/fpga/megacells/addsub16_bb.v
+++ /dev/null
@@ -1,39 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module addsub16 (
- add_sub,
- dataa,
- datab,
- clock,
- aclr,
- clken,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input add_sub;
- input [15:0] dataa;
- input [15:0] datab;
- input clock;
- input aclr;
- input clken;
- output [15:0] result;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/addsub16_inst.v b/usrp/fpga/megacells/addsub16_inst.v
deleted file mode 100755
index 4a81ff2ee..000000000
--- a/usrp/fpga/megacells/addsub16_inst.v
+++ /dev/null
@@ -1,9 +0,0 @@
-addsub16 addsub16_inst (
- .add_sub ( add_sub_sig ),
- .dataa ( dataa_sig ),
- .datab ( datab_sig ),
- .clock ( clock_sig ),
- .aclr ( aclr_sig ),
- .clken ( clken_sig ),
- .result ( result_sig )
- );
diff --git a/usrp/fpga/megacells/bustri.bsf b/usrp/fpga/megacells/bustri.bsf
deleted file mode 100755
index f1bc3ca7f..000000000
--- a/usrp/fpga/megacells/bustri.bsf
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 80 40)
- (text "bustri" (rect 24 1 61 17)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 24 25 36)(font "Arial" ))
- (port
- (pt 40 40)
- (input)
- (text "enabledt" (rect 0 0 48 14)(font "Arial" (font_size 8)))
- (text "enabledt" (rect 40 -6 53 36)(font "Arial" (font_size 8))(invisible))
- (line (pt 40 40)(pt 40 28)(line_width 1))
- )
- (port
- (pt 0 24)
- (input)
- (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8)))
- (text "data[15..0]" (rect -3 -27 10 24)(font "Arial" (font_size 8))(invisible))
- (line (pt 0 24)(pt 32 24)(line_width 3))
- )
- (port
- (pt 80 24)
- (bidir)
- (text "tridata[15..0]" (rect 0 0 70 14)(font "Arial" (font_size 8)))
- (text "tridata[15..0]" (rect 84 -36 97 24)(font "Arial" (font_size 8))(invisible))
- (line (pt 80 24)(pt 48 24)(line_width 3))
- )
- (drawing
- (text "16" (rect 61 25 71 37)(font "Arial" ))
- (text "16" (rect 13 25 23 37)(font "Arial" ))
- (line (pt 32 16)(pt 48 24)(line_width 1))
- (line (pt 48 24)(pt 32 32)(line_width 1))
- (line (pt 32 32)(pt 32 16)(line_width 1))
- (line (pt 56 28)(pt 64 20)(line_width 1))
- (line (pt 8 28)(pt 16 20)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/bustri.cmp b/usrp/fpga/megacells/bustri.cmp
deleted file mode 100755
index 87599ca66..000000000
--- a/usrp/fpga/megacells/bustri.cmp
+++ /dev/null
@@ -1,29 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component bustri
- PORT
- (
- data : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- enabledt : IN STD_LOGIC ;
- tridata : INOUT STD_LOGIC_VECTOR (15 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/bustri.inc b/usrp/fpga/megacells/bustri.inc
deleted file mode 100755
index 399950389..000000000
--- a/usrp/fpga/megacells/bustri.inc
+++ /dev/null
@@ -1,30 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION bustri
-(
- data[15..0],
- enabledt
-)
-
-RETURNS (
- tridata[15..0]
-);
diff --git a/usrp/fpga/megacells/bustri.v b/usrp/fpga/megacells/bustri.v
deleted file mode 100755
index e40c69476..000000000
--- a/usrp/fpga/megacells/bustri.v
+++ /dev/null
@@ -1,71 +0,0 @@
-// megafunction wizard: %LPM_BUSTRI%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: lpm_bustri
-
-// ============================================================
-// File Name: bustri.v
-// Megafunction Name(s):
-// lpm_bustri
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-module bustri (
- data,
- enabledt,
- tridata);
-
- input [15:0] data;
- input enabledt;
- inout [15:0] tridata;
-
-
- lpm_bustri lpm_bustri_component (
- .tridata (tridata),
- .enabledt (enabledt),
- .data (data));
- defparam
- lpm_bustri_component.lpm_width = 16,
- lpm_bustri_component.lpm_type = "LPM_BUSTRI";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: nBit NUMERIC "16"
-// Retrieval info: PRIVATE: BiDir NUMERIC "0"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_BUSTRI"
-// Retrieval info: USED_PORT: tridata 0 0 16 0 BIDIR NODEFVAL tridata[15..0]
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: enabledt 0 0 0 0 INPUT NODEFVAL enabledt
-// Retrieval info: CONNECT: tridata 0 0 16 0 @tridata 0 0 16 0
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: @enabledt 0 0 0 0 enabledt 0 0 0 0
-// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
diff --git a/usrp/fpga/megacells/bustri_bb.v b/usrp/fpga/megacells/bustri_bb.v
deleted file mode 100755
index 4cbc1609c..000000000
--- a/usrp/fpga/megacells/bustri_bb.v
+++ /dev/null
@@ -1,31 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module bustri (
- data,
- enabledt,
- tridata);
-
- input [15:0] data;
- input enabledt;
- inout [15:0] tridata;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/bustri_inst.v b/usrp/fpga/megacells/bustri_inst.v
deleted file mode 100755
index 2b4e49638..000000000
--- a/usrp/fpga/megacells/bustri_inst.v
+++ /dev/null
@@ -1,5 +0,0 @@
-bustri bustri_inst (
- .data ( data_sig ),
- .enabledt ( enabledt_sig ),
- .tridata ( tridata_sig )
- );
diff --git a/usrp/fpga/megacells/clk_doubler.v b/usrp/fpga/megacells/clk_doubler.v
deleted file mode 100644
index b3762a960..000000000
--- a/usrp/fpga/megacells/clk_doubler.v
+++ /dev/null
@@ -1,198 +0,0 @@
-// megafunction wizard: %ALTPLL%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: altpll
-
-// ============================================================
-// File Name: clk_doubler.v
-// Megafunction Name(s):
-// altpll
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 4.2 Build 156 11/29/2004 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module clk_doubler (
- inclk0,
- c0);
-
- input inclk0;
- output c0;
-
- wire [5:0] sub_wire0;
- wire [0:0] sub_wire4 = 1'h0;
- wire [0:0] sub_wire1 = sub_wire0[0:0];
- wire c0 = sub_wire1;
- wire sub_wire2 = inclk0;
- wire [1:0] sub_wire3 = {sub_wire4, sub_wire2};
-
- altpll altpll_component (
- .inclk (sub_wire3),
- .clk (sub_wire0)
- // synopsys translate_off
- ,
- .activeclock (),
- .areset (),
- .clkbad (),
- .clkena (),
- .clkloss (),
- .clkswitch (),
- .enable0 (),
- .enable1 (),
- .extclk (),
- .extclkena (),
- .fbin (),
- .locked (),
- .pfdena (),
- .pllena (),
- .scanaclr (),
- .scanclk (),
- .scandata (),
- .scandataout (),
- .scandone (),
- .scanread (),
- .scanwrite (),
- .sclkout0 (),
- .sclkout1 ()
- // synopsys translate_on
- );
- defparam
- altpll_component.clk0_duty_cycle = 50,
- altpll_component.lpm_type = "altpll",
- altpll_component.clk0_multiply_by = 2,
- altpll_component.inclk0_input_frequency = 15625,
- altpll_component.clk0_divide_by = 1,
- altpll_component.pll_type = "AUTO",
- altpll_component.intended_device_family = "Cyclone",
- altpll_component.operation_mode = "NORMAL",
- altpll_component.compensate_clock = "CLK0",
- altpll_component.clk0_phase_shift = "0";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-// Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-// Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-// Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-// Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "2"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-// Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-// Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-// Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
-// Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-// Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_CUSTOM STRING "0"
-// Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-// Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-// Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-// Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-// Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-// Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-// Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-// Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-// Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "e0"
-// Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-// Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-// Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-// Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "512.000"
-// Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-// Retrieval info: PRIVATE: PLL_ENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "64.000"
-// Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-// Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.000"
-// Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-// Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-// Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-// Retrieval info: PRIVATE: DEV_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LOCK_LOSS_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-// Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-// Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-// Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: DEVICE_FAMILY NUMERIC "11"
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-// Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "2"
-// Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "15625"
-// Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1"
-// Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-// Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-// Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-// Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT VCC "c0"
-// Retrieval info: USED_PORT: @clk 0 0 6 0 OUTPUT VCC "@clk[5..0]"
-// Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT GND "inclk0"
-// Retrieval info: USED_PORT: @extclk 0 0 4 0 OUTPUT VCC "@extclk[3..0]"
-// Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-// Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-// Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.v TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.inc FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.cmp FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.bsf FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler_inst.v FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler_bb.v TRUE FALSE
diff --git a/usrp/fpga/megacells/clk_doubler_bb.v b/usrp/fpga/megacells/clk_doubler_bb.v
deleted file mode 100644
index 48c52e795..000000000
--- a/usrp/fpga/megacells/clk_doubler_bb.v
+++ /dev/null
@@ -1,143 +0,0 @@
-// megafunction wizard: %ALTPLL%VBB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: altpll
-
-// ============================================================
-// File Name: clk_doubler.v
-// Megafunction Name(s):
-// altpll
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 4.2 Build 156 11/29/2004 SJ Web Edition
-// ************************************************************
-
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module clk_doubler (
- inclk0,
- c0);
-
- input inclk0;
- output c0;
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-// Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-// Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-// Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-// Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "2"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-// Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-// Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-// Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
-// Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-// Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_CUSTOM STRING "0"
-// Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-// Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-// Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-// Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-// Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-// Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-// Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-// Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-// Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "e0"
-// Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-// Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-// Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-// Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "512.000"
-// Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-// Retrieval info: PRIVATE: PLL_ENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "64.000"
-// Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-// Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.000"
-// Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-// Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-// Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-// Retrieval info: PRIVATE: DEV_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LOCK_LOSS_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-// Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-// Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-// Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: DEVICE_FAMILY NUMERIC "11"
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-// Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "2"
-// Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "15625"
-// Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1"
-// Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-// Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-// Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-// Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT VCC "c0"
-// Retrieval info: USED_PORT: @clk 0 0 6 0 OUTPUT VCC "@clk[5..0]"
-// Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT GND "inclk0"
-// Retrieval info: USED_PORT: @extclk 0 0 4 0 OUTPUT VCC "@extclk[3..0]"
-// Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-// Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-// Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.v TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.inc FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.cmp FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler.bsf FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler_inst.v FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL clk_doubler_bb.v TRUE FALSE
diff --git a/usrp/fpga/megacells/dspclkpll.v b/usrp/fpga/megacells/dspclkpll.v
deleted file mode 100644
index 81e622137..000000000
--- a/usrp/fpga/megacells/dspclkpll.v
+++ /dev/null
@@ -1,237 +0,0 @@
-// megafunction wizard: %ALTPLL%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: altpll
-
-// ============================================================
-// File Name: dspclkpll.v
-// Megafunction Name(s):
-// altpll
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 4.0 Build 214 3/25/2004 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module dspclkpll (
- inclk0,
- c0,
- c1);
-
- input inclk0;
- output c0;
- output c1;
-
- wire [5:0] sub_wire0;
- wire [0:0] sub_wire5 = 1'h0;
- wire [1:1] sub_wire2 = sub_wire0[1:1];
- wire [0:0] sub_wire1 = sub_wire0[0:0];
- wire c0 = sub_wire1;
- wire c1 = sub_wire2;
- wire sub_wire3 = inclk0;
- wire [1:0] sub_wire4 = {sub_wire5, sub_wire3};
-
- altpll altpll_component (
- .inclk (sub_wire4),
- .clk (sub_wire0)
- // synopsys translate_off
-,
- .fbin (),
- .pllena (),
- .clkswitch (),
- .areset (),
- .pfdena (),
- .clkena (),
- .extclkena (),
- .scanclk (),
- .scanaclr (),
- .scandata (),
- .scanread (),
- .scanwrite (),
- .extclk (),
- .clkbad (),
- .activeclock (),
- .locked (),
- .clkloss (),
- .scandataout (),
- .scandone (),
- .sclkout1 (),
- .sclkout0 (),
- .enable0 (),
- .enable1 ()
- // synopsys translate_on
-
-);
- defparam
- altpll_component.clk1_divide_by = 1,
- altpll_component.clk1_phase_shift = "0",
- altpll_component.clk0_duty_cycle = 50,
- altpll_component.lpm_type = "altpll",
- altpll_component.clk0_multiply_by = 1,
- altpll_component.inclk0_input_frequency = 15625,
- altpll_component.clk0_divide_by = 1,
- altpll_component.clk1_duty_cycle = 50,
- altpll_component.pll_type = "AUTO",
- altpll_component.clk1_multiply_by = 2,
- altpll_component.clk0_time_delay = "0",
- altpll_component.intended_device_family = "Cyclone",
- altpll_component.operation_mode = "NORMAL",
- altpll_component.compensate_clock = "CLK0",
- altpll_component.clk1_time_delay = "0",
- altpll_component.clk0_phase_shift = "0";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-// Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-// Retrieval info: PRIVATE: MIRROR_CLK1 STRING "0"
-// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT1 STRING "deg"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT1 STRING "MHz"
-// Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-// Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "0.00000000"
-// Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-// Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-// Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-// Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
-// Retrieval info: PRIVATE: DUTY_CYCLE1 STRING "50.00000000"
-// Retrieval info: PRIVATE: PHASE_SHIFT1 STRING "0.00000000"
-// Retrieval info: PRIVATE: MULT_FACTOR1 NUMERIC "2"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE1 STRING "0"
-// Retrieval info: PRIVATE: TIME_SHIFT0 STRING "0.00000000"
-// Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-// Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_CUSTOM STRING "0"
-// Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-// Retrieval info: PRIVATE: TIME_SHIFT1 STRING "0.00000000"
-// Retrieval info: PRIVATE: STICKY_CLK1 STRING "1"
-// Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-// Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-// Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-// Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: USE_CLK1 STRING "1"
-// Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-// Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-// Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-// Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_0 STRING "inclk;fbin;pllena;clkswitch;areset"
-// Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-// Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "e0"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_1 STRING "pfdena;clkena;extclkena;scanclk;scanaclr"
-// Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-// Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_2 STRING "scandata;scanread;scanwrite;clk;extclk"
-// Retrieval info: PRIVATE: DIV_FACTOR1 NUMERIC "1"
-// Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-// Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "512.000"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_3 STRING "clkbad;activeclock;locked;clkloss;scandataout"
-// Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-// Retrieval info: PRIVATE: PLL_ENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "64.000"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_4 STRING "scandone;sclkout1;sclkout0;enable0;enable1"
-// Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-// Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.000"
-// Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-// Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-// Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-// Retrieval info: PRIVATE: DEV_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: OUTPUT_FREQ1 STRING "100.000"
-// Retrieval info: PRIVATE: LOCK_LOSS_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-// Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-// Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: USE_CLKENA1 STRING "0"
-// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT1 STRING "deg"
-// Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-// Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: DEVICE_FAMILY NUMERIC "11"
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: CONSTANT: CLK1_DIVIDE_BY NUMERIC "1"
-// Retrieval info: CONSTANT: CLK1_PHASE_SHIFT STRING "0"
-// Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-// Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "1"
-// Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "15625"
-// Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1"
-// Retrieval info: CONSTANT: CLK1_DUTY_CYCLE NUMERIC "50"
-// Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-// Retrieval info: CONSTANT: CLK1_MULTIPLY_BY NUMERIC "2"
-// Retrieval info: CONSTANT: CLK0_TIME_DELAY STRING "0"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-// Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-// Retrieval info: CONSTANT: CLK1_TIME_DELAY STRING "0"
-// Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "0"
-// Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT VCC "c0"
-// Retrieval info: USED_PORT: @clk 0 0 6 0 OUTPUT VCC "@clk[5..0]"
-// Retrieval info: USED_PORT: c1 0 0 0 0 OUTPUT VCC "c1"
-// Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT GND "inclk0"
-// Retrieval info: USED_PORT: @extclk 0 0 4 0 OUTPUT VCC "@extclk[3..0]"
-// Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-// Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-// Retrieval info: CONNECT: c1 0 0 0 0 @clk 0 0 1 1
-// Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll.v TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll.inc FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll.cmp FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll.bsf FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll_inst.v FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL dspclkpll_bb.v TRUE FALSE
diff --git a/usrp/fpga/megacells/dspclkpll_bb.v b/usrp/fpga/megacells/dspclkpll_bb.v
deleted file mode 100644
index 489be7bd4..000000000
--- a/usrp/fpga/megacells/dspclkpll_bb.v
+++ /dev/null
@@ -1,31 +0,0 @@
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module dspclkpll (
- inclk0,
- c0,
- c1);
-
- input inclk0;
- output c0;
- output c1;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/fifo_1kx16.bsf b/usrp/fpga/megacells/fifo_1kx16.bsf
deleted file mode 100755
index 2de80816f..000000000
--- a/usrp/fpga/megacells/fifo_1kx16.bsf
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2006 Altera Corporation
-Your use of Altera Corporation's design tools, logic functions
-and other software and tools, and its AMPP partner logic
-functions, and any output files any of the foregoing
-(including device programming or simulation files), and any
-associated documentation or information are expressly subject
-to the terms and conditions of the Altera Program License
-Subscription Agreement, Altera MegaCore Function License
-Agreement, or other applicable license agreement, including,
-without limitation, that your use is for the sole purpose of
-programming logic devices manufactured by Altera and sold by
-Altera or its authorized distributors. Please refer to the
-applicable agreement for further details.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 160)
- (text "fifo_1kx16" (rect 51 1 119 17)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 144 25 156)(font "Arial" ))
- (port
- (pt 0 32)
- (input)
- (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8)))
- (text "data[15..0]" (rect 20 26 71 39)(font "Arial" (font_size 8)))
- (line (pt 0 32)(pt 16 32)(line_width 3))
- )
- (port
- (pt 0 56)
- (input)
- (text "wrreq" (rect 0 0 35 14)(font "Arial" (font_size 8)))
- (text "wrreq" (rect 20 50 45 63)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 16 56)(line_width 1))
- )
- (port
- (pt 0 72)
- (input)
- (text "rdreq" (rect 0 0 30 14)(font "Arial" (font_size 8)))
- (text "rdreq" (rect 20 66 44 79)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 16 72)(line_width 1))
- )
- (port
- (pt 0 96)
- (input)
- (text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8)))
- (text "clock" (rect 26 90 49 103)(font "Arial" (font_size 8)))
- (line (pt 0 96)(pt 16 96)(line_width 1))
- )
- (port
- (pt 0 128)
- (input)
- (text "aclr" (rect 0 0 21 14)(font "Arial" (font_size 8)))
- (text "aclr" (rect 20 122 37 135)(font "Arial" (font_size 8)))
- (line (pt 0 128)(pt 16 128)(line_width 1))
- )
- (port
- (pt 160 32)
- (output)
- (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8)))
- (text "q[15..0]" (rect 105 26 141 39)(font "Arial" (font_size 8)))
- (line (pt 160 32)(pt 144 32)(line_width 3))
- )
- (port
- (pt 160 56)
- (output)
- (text "full" (rect 0 0 16 14)(font "Arial" (font_size 8)))
- (text "full" (rect 127 50 142 63)(font "Arial" (font_size 8)))
- (line (pt 160 56)(pt 144 56)(line_width 1))
- )
- (port
- (pt 160 72)
- (output)
- (text "empty" (rect 0 0 34 14)(font "Arial" (font_size 8)))
- (text "empty" (rect 112 66 141 79)(font "Arial" (font_size 8)))
- (line (pt 160 72)(pt 144 72)(line_width 1))
- )
- (port
- (pt 160 88)
- (output)
- (text "almost_empty" (rect 0 0 77 14)(font "Arial" (font_size 8)))
- (text "almost_empty" (rect 75 82 141 95)(font "Arial" (font_size 8)))
- (line (pt 160 88)(pt 144 88)(line_width 1))
- )
- (port
- (pt 160 104)
- (output)
- (text "usedw[9..0]" (rect 0 0 68 14)(font "Arial" (font_size 8)))
- (text "usedw[9..0]" (rect 83 98 136 111)(font "Arial" (font_size 8)))
- (line (pt 160 104)(pt 144 104)(line_width 3))
- )
- (drawing
- (text "16 bits x 1024 words" (rect 58 132 144 144)(font "Arial" ))
- (text "almost_empty < 504" (rect 58 122 144 134)(font "Arial" ))
- (line (pt 16 16)(pt 144 16)(line_width 1))
- (line (pt 144 16)(pt 144 144)(line_width 1))
- (line (pt 144 144)(pt 16 144)(line_width 1))
- (line (pt 16 144)(pt 16 16)(line_width 1))
- (line (pt 16 116)(pt 144 116)(line_width 1))
- (line (pt 16 90)(pt 22 96)(line_width 1))
- (line (pt 22 96)(pt 16 102)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/fifo_1kx16.cmp b/usrp/fpga/megacells/fifo_1kx16.cmp
deleted file mode 100755
index 9b2c2c0c3..000000000
--- a/usrp/fpga/megacells/fifo_1kx16.cmp
+++ /dev/null
@@ -1,30 +0,0 @@
---Copyright (C) 1991-2006 Altera Corporation
---Your use of Altera Corporation's design tools, logic functions
---and other software and tools, and its AMPP partner logic
---functions, and any output files any of the foregoing
---(including device programming or simulation files), and any
---associated documentation or information are expressly subject
---to the terms and conditions of the Altera Program License
---Subscription Agreement, Altera MegaCore Function License
---Agreement, or other applicable license agreement, including,
---without limitation, that your use is for the sole purpose of
---programming logic devices manufactured by Altera and sold by
---Altera or its authorized distributors. Please refer to the
---applicable agreement for further details.
-
-
-component fifo_1kx16
- PORT
- (
- aclr : IN STD_LOGIC ;
- clock : IN STD_LOGIC ;
- data : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- rdreq : IN STD_LOGIC ;
- wrreq : IN STD_LOGIC ;
- almost_empty : OUT STD_LOGIC ;
- empty : OUT STD_LOGIC ;
- full : OUT STD_LOGIC ;
- q : OUT STD_LOGIC_VECTOR (15 DOWNTO 0);
- usedw : OUT STD_LOGIC_VECTOR (9 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/fifo_1kx16.inc b/usrp/fpga/megacells/fifo_1kx16.inc
deleted file mode 100755
index 0b70afe62..000000000
--- a/usrp/fpga/megacells/fifo_1kx16.inc
+++ /dev/null
@@ -1,31 +0,0 @@
---Copyright (C) 1991-2006 Altera Corporation
---Your use of Altera Corporation's design tools, logic functions
---and other software and tools, and its AMPP partner logic
---functions, and any output files any of the foregoing
---(including device programming or simulation files), and any
---associated documentation or information are expressly subject
---to the terms and conditions of the Altera Program License
---Subscription Agreement, Altera MegaCore Function License
---Agreement, or other applicable license agreement, including,
---without limitation, that your use is for the sole purpose of
---programming logic devices manufactured by Altera and sold by
---Altera or its authorized distributors. Please refer to the
---applicable agreement for further details.
-
-
-FUNCTION fifo_1kx16
-(
- aclr,
- clock,
- data[15..0],
- rdreq,
- wrreq
-)
-
-RETURNS (
- almost_empty,
- empty,
- full,
- q[15..0],
- usedw[9..0]
-);
diff --git a/usrp/fpga/megacells/fifo_1kx16.v b/usrp/fpga/megacells/fifo_1kx16.v
deleted file mode 100755
index 4f7e94ef5..000000000
--- a/usrp/fpga/megacells/fifo_1kx16.v
+++ /dev/null
@@ -1,175 +0,0 @@
-// megafunction wizard: %FIFO%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: scfifo
-
-// ============================================================
-// File Name: fifo_1kx16.v
-// Megafunction Name(s):
-// scfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.1 Build 213 01/19/2006 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2006 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module fifo_1kx16 (
- aclr,
- clock,
- data,
- rdreq,
- wrreq,
- almost_empty,
- empty,
- full,
- q,
- usedw);
-
- input aclr;
- input clock;
- input [15:0] data;
- input rdreq;
- input wrreq;
- output almost_empty;
- output empty;
- output full;
- output [15:0] q;
- output [9:0] usedw;
-
- wire [9:0] sub_wire0;
- wire sub_wire1;
- wire sub_wire2;
- wire [15:0] sub_wire3;
- wire sub_wire4;
- wire [9:0] usedw = sub_wire0[9:0];
- wire empty = sub_wire1;
- wire almost_empty = sub_wire2;
- wire [15:0] q = sub_wire3[15:0];
- wire full = sub_wire4;
-
- scfifo scfifo_component (
- .rdreq (rdreq),
- .aclr (aclr),
- .clock (clock),
- .wrreq (wrreq),
- .data (data),
- .usedw (sub_wire0),
- .empty (sub_wire1),
- .almost_empty (sub_wire2),
- .q (sub_wire3),
- .full (sub_wire4)
- // synopsys translate_off
- ,
- .sclr (),
- .almost_full ()
- // synopsys translate_on
- );
- defparam
- scfifo_component.add_ram_output_register = "OFF",
- scfifo_component.almost_empty_value = 504,
- scfifo_component.intended_device_family = "Cyclone",
- scfifo_component.lpm_hint = "RAM_BLOCK_TYPE=M4K",
- scfifo_component.lpm_numwords = 1024,
- scfifo_component.lpm_showahead = "OFF",
- scfifo_component.lpm_type = "scfifo",
- scfifo_component.lpm_width = 16,
- scfifo_component.lpm_widthu = 10,
- scfifo_component.overflow_checking = "ON",
- scfifo_component.underflow_checking = "ON",
- scfifo_component.use_eab = "ON";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "504"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Clock NUMERIC "0"
-// Retrieval info: PRIVATE: Depth NUMERIC "1024"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "1"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "2"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "0"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "0"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "0"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: ALMOST_EMPTY_VALUE NUMERIC "504"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_HINT STRING "RAM_BLOCK_TYPE=M4K"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "1024"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "OFF"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "scfifo"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "10"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "ON"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "ON"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL aclr
-// Retrieval info: USED_PORT: almost_empty 0 0 0 0 OUTPUT NODEFVAL almost_empty
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: empty 0 0 0 0 OUTPUT NODEFVAL empty
-// Retrieval info: USED_PORT: full 0 0 0 0 OUTPUT NODEFVAL full
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: usedw 0 0 10 0 OUTPUT NODEFVAL usedw[9..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: CONNECT: full 0 0 0 0 @full 0 0 0 0
-// Retrieval info: CONNECT: empty 0 0 0 0 @empty 0 0 0 0
-// Retrieval info: CONNECT: usedw 0 0 10 0 @usedw 0 0 10 0
-// Retrieval info: CONNECT: almost_empty 0 0 0 0 @almost_empty 0 0 0 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.inc TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.cmp TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.bsf TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_inst.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_waveforms.html FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_1kx16_bb.v b/usrp/fpga/megacells/fifo_1kx16_bb.v
deleted file mode 100755
index 9d9912bc2..000000000
--- a/usrp/fpga/megacells/fifo_1kx16_bb.v
+++ /dev/null
@@ -1,127 +0,0 @@
-// megafunction wizard: %FIFO%VBB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: scfifo
-
-// ============================================================
-// File Name: fifo_1kx16.v
-// Megafunction Name(s):
-// scfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.1 Build 213 01/19/2006 SP 1 SJ Web Edition
-// ************************************************************
-
-//Copyright (C) 1991-2006 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-module fifo_1kx16 (
- aclr,
- clock,
- data,
- rdreq,
- wrreq,
- almost_empty,
- empty,
- full,
- q,
- usedw);
-
- input aclr;
- input clock;
- input [15:0] data;
- input rdreq;
- input wrreq;
- output almost_empty;
- output empty;
- output full;
- output [15:0] q;
- output [9:0] usedw;
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "504"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Clock NUMERIC "0"
-// Retrieval info: PRIVATE: Depth NUMERIC "1024"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "1"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "2"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "0"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "0"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "0"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: ALMOST_EMPTY_VALUE NUMERIC "504"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_HINT STRING "RAM_BLOCK_TYPE=M4K"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "1024"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "OFF"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "scfifo"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "10"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "ON"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "ON"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL aclr
-// Retrieval info: USED_PORT: almost_empty 0 0 0 0 OUTPUT NODEFVAL almost_empty
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: empty 0 0 0 0 OUTPUT NODEFVAL empty
-// Retrieval info: USED_PORT: full 0 0 0 0 OUTPUT NODEFVAL full
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: usedw 0 0 10 0 OUTPUT NODEFVAL usedw[9..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: CONNECT: full 0 0 0 0 @full 0 0 0 0
-// Retrieval info: CONNECT: empty 0 0 0 0 @empty 0 0 0 0
-// Retrieval info: CONNECT: usedw 0 0 10 0 @usedw 0 0 10 0
-// Retrieval info: CONNECT: almost_empty 0 0 0 0 @almost_empty 0 0 0 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.inc TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.cmp TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16.bsf TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_inst.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_waveforms.html FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_1kx16_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_1kx16_inst.v b/usrp/fpga/megacells/fifo_1kx16_inst.v
deleted file mode 100755
index 73662dea3..000000000
--- a/usrp/fpga/megacells/fifo_1kx16_inst.v
+++ /dev/null
@@ -1,12 +0,0 @@
-fifo_1kx16 fifo_1kx16_inst (
- .aclr ( aclr_sig ),
- .clock ( clock_sig ),
- .data ( data_sig ),
- .rdreq ( rdreq_sig ),
- .wrreq ( wrreq_sig ),
- .almost_empty ( almost_empty_sig ),
- .empty ( empty_sig ),
- .full ( full_sig ),
- .q ( q_sig ),
- .usedw ( usedw_sig )
- );
diff --git a/usrp/fpga/megacells/fifo_2k.v b/usrp/fpga/megacells/fifo_2k.v
deleted file mode 100644
index 5e2a38520..000000000
--- a/usrp/fpga/megacells/fifo_2k.v
+++ /dev/null
@@ -1,3343 +0,0 @@
-// megafunction wizard: %FIFO%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_2k.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.0 Build 168 06/22/2005 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2005 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-
-//dcfifo ADD_RAM_OUTPUT_REGISTER="OFF" CLOCKS_ARE_SYNCHRONIZED="FALSE" DEVICE_FAMILY="Cyclone" LPM_NUMWORDS=2048 LPM_SHOWAHEAD="ON" LPM_WIDTH=16 LPM_WIDTHU=11 OVERFLOW_CHECKING="OFF" UNDERFLOW_CHECKING="OFF" USE_EAB="ON" aclr data q rdclk rdempty rdreq rdusedw wrclk wrfull wrreq wrusedw
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_altdpram 2004:11:30:11:29:56:SJ cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_dcfifo 2005:03:07:17:11:14:SJ cbx_fifo_common 2004:12:13:14:26:24:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_counter 2005:02:02:04:37:10:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_scfifo 2005:03:10:10:52:20:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-
-//a_gray2bin device_family="Cyclone" WIDTH=11 bin gray
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_mgl 2005:05:19:13:51:58:SJ VERSION_END
-
-//synthesis_resources =
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_a_gray2bin_8m4
- (
- bin,
- gray) /* synthesis synthesis_clearbox=1 */;
- output [10:0] bin;
- input [10:0] gray;
-
- wire xor0;
- wire xor1;
- wire xor2;
- wire xor3;
- wire xor4;
- wire xor5;
- wire xor6;
- wire xor7;
- wire xor8;
- wire xor9;
-
- assign
- bin = {gray[10], xor9, xor8, xor7, xor6, xor5, xor4, xor3, xor2, xor1, xor0},
- xor0 = (gray[0] ^ xor1),
- xor1 = (gray[1] ^ xor2),
- xor2 = (gray[2] ^ xor3),
- xor3 = (gray[3] ^ xor4),
- xor4 = (gray[4] ^ xor5),
- xor5 = (gray[5] ^ xor6),
- xor6 = (gray[6] ^ xor7),
- xor7 = (gray[7] ^ xor8),
- xor8 = (gray[8] ^ xor9),
- xor9 = (gray[10] ^ gray[9]);
-endmodule //fifo_2k_a_gray2bin_8m4
-
-
-//a_graycounter DEVICE_FAMILY="Cyclone" WIDTH=11 aclr clock cnt_en q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_a_graycounter_726
- (
- aclr,
- clock,
- cnt_en,
- q) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clock;
- input cnt_en;
- output [10:0] q;
-
- wire [0:0] wire_countera_0cout;
- wire [0:0] wire_countera_1cout;
- wire [0:0] wire_countera_2cout;
- wire [0:0] wire_countera_3cout;
- wire [0:0] wire_countera_4cout;
- wire [0:0] wire_countera_5cout;
- wire [0:0] wire_countera_6cout;
- wire [0:0] wire_countera_7cout;
- wire [0:0] wire_countera_8cout;
- wire [0:0] wire_countera_9cout;
- wire [10:0] wire_countera_regout;
- wire wire_parity_cout;
- wire wire_parity_regout;
- wire [10:0] power_modified_counter_values;
- wire sclr;
- wire updown;
-
- cyclone_lcell countera_0
- (
- .aclr(aclr),
- .cin(wire_parity_cout),
- .clk(clock),
- .combout(),
- .cout(wire_countera_0cout[0:0]),
- .dataa(cnt_en),
- .datab(wire_countera_regout[0:0]),
- .ena(1'b1),
- .regout(wire_countera_regout[0:0]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_0.cin_used = "true",
- countera_0.lut_mask = "c6a0",
- countera_0.operation_mode = "arithmetic",
- countera_0.sum_lutc_input = "cin",
- countera_0.synch_mode = "on",
- countera_0.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_1
- (
- .aclr(aclr),
- .cin(wire_countera_0cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_1cout[0:0]),
- .dataa(power_modified_counter_values[0]),
- .datab(power_modified_counter_values[1]),
- .ena(1'b1),
- .regout(wire_countera_regout[1:1]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_1.cin_used = "true",
- countera_1.lut_mask = "6c50",
- countera_1.operation_mode = "arithmetic",
- countera_1.sum_lutc_input = "cin",
- countera_1.synch_mode = "on",
- countera_1.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_2
- (
- .aclr(aclr),
- .cin(wire_countera_1cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_2cout[0:0]),
- .dataa(power_modified_counter_values[1]),
- .datab(power_modified_counter_values[2]),
- .ena(1'b1),
- .regout(wire_countera_regout[2:2]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_2.cin_used = "true",
- countera_2.lut_mask = "6c50",
- countera_2.operation_mode = "arithmetic",
- countera_2.sum_lutc_input = "cin",
- countera_2.synch_mode = "on",
- countera_2.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_3
- (
- .aclr(aclr),
- .cin(wire_countera_2cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_3cout[0:0]),
- .dataa(power_modified_counter_values[2]),
- .datab(power_modified_counter_values[3]),
- .ena(1'b1),
- .regout(wire_countera_regout[3:3]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_3.cin_used = "true",
- countera_3.lut_mask = "6c50",
- countera_3.operation_mode = "arithmetic",
- countera_3.sum_lutc_input = "cin",
- countera_3.synch_mode = "on",
- countera_3.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_4
- (
- .aclr(aclr),
- .cin(wire_countera_3cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_4cout[0:0]),
- .dataa(power_modified_counter_values[3]),
- .datab(power_modified_counter_values[4]),
- .ena(1'b1),
- .regout(wire_countera_regout[4:4]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_4.cin_used = "true",
- countera_4.lut_mask = "6c50",
- countera_4.operation_mode = "arithmetic",
- countera_4.sum_lutc_input = "cin",
- countera_4.synch_mode = "on",
- countera_4.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_5
- (
- .aclr(aclr),
- .cin(wire_countera_4cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_5cout[0:0]),
- .dataa(power_modified_counter_values[4]),
- .datab(power_modified_counter_values[5]),
- .ena(1'b1),
- .regout(wire_countera_regout[5:5]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_5.cin_used = "true",
- countera_5.lut_mask = "6c50",
- countera_5.operation_mode = "arithmetic",
- countera_5.sum_lutc_input = "cin",
- countera_5.synch_mode = "on",
- countera_5.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_6
- (
- .aclr(aclr),
- .cin(wire_countera_5cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_6cout[0:0]),
- .dataa(power_modified_counter_values[5]),
- .datab(power_modified_counter_values[6]),
- .ena(1'b1),
- .regout(wire_countera_regout[6:6]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_6.cin_used = "true",
- countera_6.lut_mask = "6c50",
- countera_6.operation_mode = "arithmetic",
- countera_6.sum_lutc_input = "cin",
- countera_6.synch_mode = "on",
- countera_6.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_7
- (
- .aclr(aclr),
- .cin(wire_countera_6cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_7cout[0:0]),
- .dataa(power_modified_counter_values[6]),
- .datab(power_modified_counter_values[7]),
- .ena(1'b1),
- .regout(wire_countera_regout[7:7]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_7.cin_used = "true",
- countera_7.lut_mask = "6c50",
- countera_7.operation_mode = "arithmetic",
- countera_7.sum_lutc_input = "cin",
- countera_7.synch_mode = "on",
- countera_7.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_8
- (
- .aclr(aclr),
- .cin(wire_countera_7cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_8cout[0:0]),
- .dataa(power_modified_counter_values[7]),
- .datab(power_modified_counter_values[8]),
- .ena(1'b1),
- .regout(wire_countera_regout[8:8]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_8.cin_used = "true",
- countera_8.lut_mask = "6c50",
- countera_8.operation_mode = "arithmetic",
- countera_8.sum_lutc_input = "cin",
- countera_8.synch_mode = "on",
- countera_8.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_9
- (
- .aclr(aclr),
- .cin(wire_countera_8cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_9cout[0:0]),
- .dataa(power_modified_counter_values[8]),
- .datab(power_modified_counter_values[9]),
- .ena(1'b1),
- .regout(wire_countera_regout[9:9]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_9.cin_used = "true",
- countera_9.lut_mask = "6c50",
- countera_9.operation_mode = "arithmetic",
- countera_9.sum_lutc_input = "cin",
- countera_9.synch_mode = "on",
- countera_9.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_10
- (
- .aclr(aclr),
- .cin(wire_countera_9cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(),
- .dataa(power_modified_counter_values[10]),
- .ena(1'b1),
- .regout(wire_countera_regout[10:10]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datab(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_10.cin_used = "true",
- countera_10.lut_mask = "5a5a",
- countera_10.operation_mode = "normal",
- countera_10.sum_lutc_input = "cin",
- countera_10.synch_mode = "on",
- countera_10.lpm_type = "cyclone_lcell";
- cyclone_lcell parity
- (
- .aclr(aclr),
- .cin(updown),
- .clk(clock),
- .combout(),
- .cout(wire_parity_cout),
- .dataa(cnt_en),
- .datab(wire_parity_regout),
- .ena(1'b1),
- .regout(wire_parity_regout),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- parity.cin_used = "true",
- parity.lut_mask = "6682",
- parity.operation_mode = "arithmetic",
- parity.synch_mode = "on",
- parity.lpm_type = "cyclone_lcell";
- assign
- power_modified_counter_values = {wire_countera_regout[10:0]},
- q = power_modified_counter_values,
- sclr = 1'b0,
- updown = 1'b1;
-endmodule //fifo_2k_a_graycounter_726
-
-
-//a_graycounter DEVICE_FAMILY="Cyclone" PVALUE=1 WIDTH=11 aclr clock cnt_en q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_a_graycounter_2r6
- (
- aclr,
- clock,
- cnt_en,
- q) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clock;
- input cnt_en;
- output [10:0] q;
-
- wire [0:0] wire_countera_0cout;
- wire [0:0] wire_countera_1cout;
- wire [0:0] wire_countera_2cout;
- wire [0:0] wire_countera_3cout;
- wire [0:0] wire_countera_4cout;
- wire [0:0] wire_countera_5cout;
- wire [0:0] wire_countera_6cout;
- wire [0:0] wire_countera_7cout;
- wire [0:0] wire_countera_8cout;
- wire [0:0] wire_countera_9cout;
- wire [10:0] wire_countera_regout;
- wire wire_parity_cout;
- wire wire_parity_regout;
- wire [10:0] power_modified_counter_values;
- wire sclr;
- wire updown;
-
- cyclone_lcell countera_0
- (
- .aclr(aclr),
- .cin(wire_parity_cout),
- .clk(clock),
- .combout(),
- .cout(wire_countera_0cout[0:0]),
- .dataa(cnt_en),
- .datab(wire_countera_regout[0:0]),
- .ena(1'b1),
- .regout(wire_countera_regout[0:0]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_0.cin_used = "true",
- countera_0.lut_mask = "c6a0",
- countera_0.operation_mode = "arithmetic",
- countera_0.sum_lutc_input = "cin",
- countera_0.synch_mode = "on",
- countera_0.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_1
- (
- .aclr(aclr),
- .cin(wire_countera_0cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_1cout[0:0]),
- .dataa(power_modified_counter_values[0]),
- .datab(power_modified_counter_values[1]),
- .ena(1'b1),
- .regout(wire_countera_regout[1:1]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_1.cin_used = "true",
- countera_1.lut_mask = "6c50",
- countera_1.operation_mode = "arithmetic",
- countera_1.sum_lutc_input = "cin",
- countera_1.synch_mode = "on",
- countera_1.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_2
- (
- .aclr(aclr),
- .cin(wire_countera_1cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_2cout[0:0]),
- .dataa(power_modified_counter_values[1]),
- .datab(power_modified_counter_values[2]),
- .ena(1'b1),
- .regout(wire_countera_regout[2:2]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_2.cin_used = "true",
- countera_2.lut_mask = "6c50",
- countera_2.operation_mode = "arithmetic",
- countera_2.sum_lutc_input = "cin",
- countera_2.synch_mode = "on",
- countera_2.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_3
- (
- .aclr(aclr),
- .cin(wire_countera_2cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_3cout[0:0]),
- .dataa(power_modified_counter_values[2]),
- .datab(power_modified_counter_values[3]),
- .ena(1'b1),
- .regout(wire_countera_regout[3:3]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_3.cin_used = "true",
- countera_3.lut_mask = "6c50",
- countera_3.operation_mode = "arithmetic",
- countera_3.sum_lutc_input = "cin",
- countera_3.synch_mode = "on",
- countera_3.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_4
- (
- .aclr(aclr),
- .cin(wire_countera_3cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_4cout[0:0]),
- .dataa(power_modified_counter_values[3]),
- .datab(power_modified_counter_values[4]),
- .ena(1'b1),
- .regout(wire_countera_regout[4:4]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_4.cin_used = "true",
- countera_4.lut_mask = "6c50",
- countera_4.operation_mode = "arithmetic",
- countera_4.sum_lutc_input = "cin",
- countera_4.synch_mode = "on",
- countera_4.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_5
- (
- .aclr(aclr),
- .cin(wire_countera_4cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_5cout[0:0]),
- .dataa(power_modified_counter_values[4]),
- .datab(power_modified_counter_values[5]),
- .ena(1'b1),
- .regout(wire_countera_regout[5:5]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_5.cin_used = "true",
- countera_5.lut_mask = "6c50",
- countera_5.operation_mode = "arithmetic",
- countera_5.sum_lutc_input = "cin",
- countera_5.synch_mode = "on",
- countera_5.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_6
- (
- .aclr(aclr),
- .cin(wire_countera_5cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_6cout[0:0]),
- .dataa(power_modified_counter_values[5]),
- .datab(power_modified_counter_values[6]),
- .ena(1'b1),
- .regout(wire_countera_regout[6:6]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_6.cin_used = "true",
- countera_6.lut_mask = "6c50",
- countera_6.operation_mode = "arithmetic",
- countera_6.sum_lutc_input = "cin",
- countera_6.synch_mode = "on",
- countera_6.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_7
- (
- .aclr(aclr),
- .cin(wire_countera_6cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_7cout[0:0]),
- .dataa(power_modified_counter_values[6]),
- .datab(power_modified_counter_values[7]),
- .ena(1'b1),
- .regout(wire_countera_regout[7:7]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_7.cin_used = "true",
- countera_7.lut_mask = "6c50",
- countera_7.operation_mode = "arithmetic",
- countera_7.sum_lutc_input = "cin",
- countera_7.synch_mode = "on",
- countera_7.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_8
- (
- .aclr(aclr),
- .cin(wire_countera_7cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_8cout[0:0]),
- .dataa(power_modified_counter_values[7]),
- .datab(power_modified_counter_values[8]),
- .ena(1'b1),
- .regout(wire_countera_regout[8:8]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_8.cin_used = "true",
- countera_8.lut_mask = "6c50",
- countera_8.operation_mode = "arithmetic",
- countera_8.sum_lutc_input = "cin",
- countera_8.synch_mode = "on",
- countera_8.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_9
- (
- .aclr(aclr),
- .cin(wire_countera_8cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_9cout[0:0]),
- .dataa(power_modified_counter_values[8]),
- .datab(power_modified_counter_values[9]),
- .ena(1'b1),
- .regout(wire_countera_regout[9:9]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_9.cin_used = "true",
- countera_9.lut_mask = "6c50",
- countera_9.operation_mode = "arithmetic",
- countera_9.sum_lutc_input = "cin",
- countera_9.synch_mode = "on",
- countera_9.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_10
- (
- .aclr(aclr),
- .cin(wire_countera_9cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(),
- .dataa(power_modified_counter_values[10]),
- .ena(1'b1),
- .regout(wire_countera_regout[10:10]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datab(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_10.cin_used = "true",
- countera_10.lut_mask = "5a5a",
- countera_10.operation_mode = "normal",
- countera_10.sum_lutc_input = "cin",
- countera_10.synch_mode = "on",
- countera_10.lpm_type = "cyclone_lcell";
- cyclone_lcell parity
- (
- .aclr(aclr),
- .cin(updown),
- .clk(clock),
- .combout(),
- .cout(wire_parity_cout),
- .dataa(cnt_en),
- .datab((~ wire_parity_regout)),
- .ena(1'b1),
- .regout(wire_parity_regout),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- parity.cin_used = "true",
- parity.lut_mask = "9982",
- parity.operation_mode = "arithmetic",
- parity.synch_mode = "on",
- parity.lpm_type = "cyclone_lcell";
- assign
- power_modified_counter_values = {wire_countera_regout[10:1], (~ wire_countera_regout[0])},
- q = power_modified_counter_values,
- sclr = 1'b0,
- updown = 1'b1;
-endmodule //fifo_2k_a_graycounter_2r6
-
-
-//altsyncram ADDRESS_REG_B="CLOCK1" DEVICE_FAMILY="Cyclone" OPERATION_MODE="DUAL_PORT" OUTDATA_REG_B="UNREGISTERED" WIDTH_A=16 WIDTH_B=16 WIDTH_BYTEENA_A=1 WIDTHAD_A=11 WIDTHAD_B=11 address_a address_b clock0 clock1 clocken1 data_a q_b wren_a
-//VERSION_BEGIN 5.0 cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = M4K 8
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_altsyncram_6pl
- (
- address_a,
- address_b,
- clock0,
- clock1,
- clocken1,
- data_a,
- q_b,
- wren_a) /* synthesis synthesis_clearbox=1 */;
- input [10:0] address_a;
- input [10:0] address_b;
- input clock0;
- input clock1;
- input clocken1;
- input [15:0] data_a;
- output [15:0] q_b;
- input wren_a;
-
- wire [0:0] wire_ram_block3a_0portbdataout;
- wire [0:0] wire_ram_block3a_1portbdataout;
- wire [0:0] wire_ram_block3a_2portbdataout;
- wire [0:0] wire_ram_block3a_3portbdataout;
- wire [0:0] wire_ram_block3a_4portbdataout;
- wire [0:0] wire_ram_block3a_5portbdataout;
- wire [0:0] wire_ram_block3a_6portbdataout;
- wire [0:0] wire_ram_block3a_7portbdataout;
- wire [0:0] wire_ram_block3a_8portbdataout;
- wire [0:0] wire_ram_block3a_9portbdataout;
- wire [0:0] wire_ram_block3a_10portbdataout;
- wire [0:0] wire_ram_block3a_11portbdataout;
- wire [0:0] wire_ram_block3a_12portbdataout;
- wire [0:0] wire_ram_block3a_13portbdataout;
- wire [0:0] wire_ram_block3a_14portbdataout;
- wire [0:0] wire_ram_block3a_15portbdataout;
- wire [10:0] address_a_wire;
- wire [10:0] address_b_wire;
-
- cyclone_ram_block ram_block3a_0
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[0]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_0portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_0.connectivity_checking = "OFF",
- ram_block3a_0.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_0.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_0.operation_mode = "dual_port",
- ram_block3a_0.port_a_address_width = 11,
- ram_block3a_0.port_a_data_width = 1,
- ram_block3a_0.port_a_first_address = 0,
- ram_block3a_0.port_a_first_bit_number = 0,
- ram_block3a_0.port_a_last_address = 2047,
- ram_block3a_0.port_a_logical_ram_depth = 2048,
- ram_block3a_0.port_a_logical_ram_width = 16,
- ram_block3a_0.port_b_address_clear = "none",
- ram_block3a_0.port_b_address_clock = "clock1",
- ram_block3a_0.port_b_address_width = 11,
- ram_block3a_0.port_b_data_out_clear = "none",
- ram_block3a_0.port_b_data_out_clock = "none",
- ram_block3a_0.port_b_data_width = 1,
- ram_block3a_0.port_b_first_address = 0,
- ram_block3a_0.port_b_first_bit_number = 0,
- ram_block3a_0.port_b_last_address = 2047,
- ram_block3a_0.port_b_logical_ram_depth = 2048,
- ram_block3a_0.port_b_logical_ram_width = 16,
- ram_block3a_0.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_0.ram_block_type = "auto",
- ram_block3a_0.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_1
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[1]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_1portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_1.connectivity_checking = "OFF",
- ram_block3a_1.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_1.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_1.operation_mode = "dual_port",
- ram_block3a_1.port_a_address_width = 11,
- ram_block3a_1.port_a_data_width = 1,
- ram_block3a_1.port_a_first_address = 0,
- ram_block3a_1.port_a_first_bit_number = 1,
- ram_block3a_1.port_a_last_address = 2047,
- ram_block3a_1.port_a_logical_ram_depth = 2048,
- ram_block3a_1.port_a_logical_ram_width = 16,
- ram_block3a_1.port_b_address_clear = "none",
- ram_block3a_1.port_b_address_clock = "clock1",
- ram_block3a_1.port_b_address_width = 11,
- ram_block3a_1.port_b_data_out_clear = "none",
- ram_block3a_1.port_b_data_out_clock = "none",
- ram_block3a_1.port_b_data_width = 1,
- ram_block3a_1.port_b_first_address = 0,
- ram_block3a_1.port_b_first_bit_number = 1,
- ram_block3a_1.port_b_last_address = 2047,
- ram_block3a_1.port_b_logical_ram_depth = 2048,
- ram_block3a_1.port_b_logical_ram_width = 16,
- ram_block3a_1.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_1.ram_block_type = "auto",
- ram_block3a_1.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_2
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[2]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_2portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_2.connectivity_checking = "OFF",
- ram_block3a_2.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_2.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_2.operation_mode = "dual_port",
- ram_block3a_2.port_a_address_width = 11,
- ram_block3a_2.port_a_data_width = 1,
- ram_block3a_2.port_a_first_address = 0,
- ram_block3a_2.port_a_first_bit_number = 2,
- ram_block3a_2.port_a_last_address = 2047,
- ram_block3a_2.port_a_logical_ram_depth = 2048,
- ram_block3a_2.port_a_logical_ram_width = 16,
- ram_block3a_2.port_b_address_clear = "none",
- ram_block3a_2.port_b_address_clock = "clock1",
- ram_block3a_2.port_b_address_width = 11,
- ram_block3a_2.port_b_data_out_clear = "none",
- ram_block3a_2.port_b_data_out_clock = "none",
- ram_block3a_2.port_b_data_width = 1,
- ram_block3a_2.port_b_first_address = 0,
- ram_block3a_2.port_b_first_bit_number = 2,
- ram_block3a_2.port_b_last_address = 2047,
- ram_block3a_2.port_b_logical_ram_depth = 2048,
- ram_block3a_2.port_b_logical_ram_width = 16,
- ram_block3a_2.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_2.ram_block_type = "auto",
- ram_block3a_2.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_3
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[3]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_3portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_3.connectivity_checking = "OFF",
- ram_block3a_3.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_3.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_3.operation_mode = "dual_port",
- ram_block3a_3.port_a_address_width = 11,
- ram_block3a_3.port_a_data_width = 1,
- ram_block3a_3.port_a_first_address = 0,
- ram_block3a_3.port_a_first_bit_number = 3,
- ram_block3a_3.port_a_last_address = 2047,
- ram_block3a_3.port_a_logical_ram_depth = 2048,
- ram_block3a_3.port_a_logical_ram_width = 16,
- ram_block3a_3.port_b_address_clear = "none",
- ram_block3a_3.port_b_address_clock = "clock1",
- ram_block3a_3.port_b_address_width = 11,
- ram_block3a_3.port_b_data_out_clear = "none",
- ram_block3a_3.port_b_data_out_clock = "none",
- ram_block3a_3.port_b_data_width = 1,
- ram_block3a_3.port_b_first_address = 0,
- ram_block3a_3.port_b_first_bit_number = 3,
- ram_block3a_3.port_b_last_address = 2047,
- ram_block3a_3.port_b_logical_ram_depth = 2048,
- ram_block3a_3.port_b_logical_ram_width = 16,
- ram_block3a_3.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_3.ram_block_type = "auto",
- ram_block3a_3.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_4
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[4]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_4portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_4.connectivity_checking = "OFF",
- ram_block3a_4.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_4.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_4.operation_mode = "dual_port",
- ram_block3a_4.port_a_address_width = 11,
- ram_block3a_4.port_a_data_width = 1,
- ram_block3a_4.port_a_first_address = 0,
- ram_block3a_4.port_a_first_bit_number = 4,
- ram_block3a_4.port_a_last_address = 2047,
- ram_block3a_4.port_a_logical_ram_depth = 2048,
- ram_block3a_4.port_a_logical_ram_width = 16,
- ram_block3a_4.port_b_address_clear = "none",
- ram_block3a_4.port_b_address_clock = "clock1",
- ram_block3a_4.port_b_address_width = 11,
- ram_block3a_4.port_b_data_out_clear = "none",
- ram_block3a_4.port_b_data_out_clock = "none",
- ram_block3a_4.port_b_data_width = 1,
- ram_block3a_4.port_b_first_address = 0,
- ram_block3a_4.port_b_first_bit_number = 4,
- ram_block3a_4.port_b_last_address = 2047,
- ram_block3a_4.port_b_logical_ram_depth = 2048,
- ram_block3a_4.port_b_logical_ram_width = 16,
- ram_block3a_4.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_4.ram_block_type = "auto",
- ram_block3a_4.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_5
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[5]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_5portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_5.connectivity_checking = "OFF",
- ram_block3a_5.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_5.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_5.operation_mode = "dual_port",
- ram_block3a_5.port_a_address_width = 11,
- ram_block3a_5.port_a_data_width = 1,
- ram_block3a_5.port_a_first_address = 0,
- ram_block3a_5.port_a_first_bit_number = 5,
- ram_block3a_5.port_a_last_address = 2047,
- ram_block3a_5.port_a_logical_ram_depth = 2048,
- ram_block3a_5.port_a_logical_ram_width = 16,
- ram_block3a_5.port_b_address_clear = "none",
- ram_block3a_5.port_b_address_clock = "clock1",
- ram_block3a_5.port_b_address_width = 11,
- ram_block3a_5.port_b_data_out_clear = "none",
- ram_block3a_5.port_b_data_out_clock = "none",
- ram_block3a_5.port_b_data_width = 1,
- ram_block3a_5.port_b_first_address = 0,
- ram_block3a_5.port_b_first_bit_number = 5,
- ram_block3a_5.port_b_last_address = 2047,
- ram_block3a_5.port_b_logical_ram_depth = 2048,
- ram_block3a_5.port_b_logical_ram_width = 16,
- ram_block3a_5.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_5.ram_block_type = "auto",
- ram_block3a_5.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_6
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[6]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_6portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_6.connectivity_checking = "OFF",
- ram_block3a_6.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_6.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_6.operation_mode = "dual_port",
- ram_block3a_6.port_a_address_width = 11,
- ram_block3a_6.port_a_data_width = 1,
- ram_block3a_6.port_a_first_address = 0,
- ram_block3a_6.port_a_first_bit_number = 6,
- ram_block3a_6.port_a_last_address = 2047,
- ram_block3a_6.port_a_logical_ram_depth = 2048,
- ram_block3a_6.port_a_logical_ram_width = 16,
- ram_block3a_6.port_b_address_clear = "none",
- ram_block3a_6.port_b_address_clock = "clock1",
- ram_block3a_6.port_b_address_width = 11,
- ram_block3a_6.port_b_data_out_clear = "none",
- ram_block3a_6.port_b_data_out_clock = "none",
- ram_block3a_6.port_b_data_width = 1,
- ram_block3a_6.port_b_first_address = 0,
- ram_block3a_6.port_b_first_bit_number = 6,
- ram_block3a_6.port_b_last_address = 2047,
- ram_block3a_6.port_b_logical_ram_depth = 2048,
- ram_block3a_6.port_b_logical_ram_width = 16,
- ram_block3a_6.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_6.ram_block_type = "auto",
- ram_block3a_6.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_7
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[7]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_7portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_7.connectivity_checking = "OFF",
- ram_block3a_7.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_7.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_7.operation_mode = "dual_port",
- ram_block3a_7.port_a_address_width = 11,
- ram_block3a_7.port_a_data_width = 1,
- ram_block3a_7.port_a_first_address = 0,
- ram_block3a_7.port_a_first_bit_number = 7,
- ram_block3a_7.port_a_last_address = 2047,
- ram_block3a_7.port_a_logical_ram_depth = 2048,
- ram_block3a_7.port_a_logical_ram_width = 16,
- ram_block3a_7.port_b_address_clear = "none",
- ram_block3a_7.port_b_address_clock = "clock1",
- ram_block3a_7.port_b_address_width = 11,
- ram_block3a_7.port_b_data_out_clear = "none",
- ram_block3a_7.port_b_data_out_clock = "none",
- ram_block3a_7.port_b_data_width = 1,
- ram_block3a_7.port_b_first_address = 0,
- ram_block3a_7.port_b_first_bit_number = 7,
- ram_block3a_7.port_b_last_address = 2047,
- ram_block3a_7.port_b_logical_ram_depth = 2048,
- ram_block3a_7.port_b_logical_ram_width = 16,
- ram_block3a_7.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_7.ram_block_type = "auto",
- ram_block3a_7.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_8
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[8]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_8portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_8.connectivity_checking = "OFF",
- ram_block3a_8.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_8.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_8.operation_mode = "dual_port",
- ram_block3a_8.port_a_address_width = 11,
- ram_block3a_8.port_a_data_width = 1,
- ram_block3a_8.port_a_first_address = 0,
- ram_block3a_8.port_a_first_bit_number = 8,
- ram_block3a_8.port_a_last_address = 2047,
- ram_block3a_8.port_a_logical_ram_depth = 2048,
- ram_block3a_8.port_a_logical_ram_width = 16,
- ram_block3a_8.port_b_address_clear = "none",
- ram_block3a_8.port_b_address_clock = "clock1",
- ram_block3a_8.port_b_address_width = 11,
- ram_block3a_8.port_b_data_out_clear = "none",
- ram_block3a_8.port_b_data_out_clock = "none",
- ram_block3a_8.port_b_data_width = 1,
- ram_block3a_8.port_b_first_address = 0,
- ram_block3a_8.port_b_first_bit_number = 8,
- ram_block3a_8.port_b_last_address = 2047,
- ram_block3a_8.port_b_logical_ram_depth = 2048,
- ram_block3a_8.port_b_logical_ram_width = 16,
- ram_block3a_8.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_8.ram_block_type = "auto",
- ram_block3a_8.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_9
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[9]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_9portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_9.connectivity_checking = "OFF",
- ram_block3a_9.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_9.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_9.operation_mode = "dual_port",
- ram_block3a_9.port_a_address_width = 11,
- ram_block3a_9.port_a_data_width = 1,
- ram_block3a_9.port_a_first_address = 0,
- ram_block3a_9.port_a_first_bit_number = 9,
- ram_block3a_9.port_a_last_address = 2047,
- ram_block3a_9.port_a_logical_ram_depth = 2048,
- ram_block3a_9.port_a_logical_ram_width = 16,
- ram_block3a_9.port_b_address_clear = "none",
- ram_block3a_9.port_b_address_clock = "clock1",
- ram_block3a_9.port_b_address_width = 11,
- ram_block3a_9.port_b_data_out_clear = "none",
- ram_block3a_9.port_b_data_out_clock = "none",
- ram_block3a_9.port_b_data_width = 1,
- ram_block3a_9.port_b_first_address = 0,
- ram_block3a_9.port_b_first_bit_number = 9,
- ram_block3a_9.port_b_last_address = 2047,
- ram_block3a_9.port_b_logical_ram_depth = 2048,
- ram_block3a_9.port_b_logical_ram_width = 16,
- ram_block3a_9.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_9.ram_block_type = "auto",
- ram_block3a_9.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_10
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[10]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_10portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_10.connectivity_checking = "OFF",
- ram_block3a_10.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_10.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_10.operation_mode = "dual_port",
- ram_block3a_10.port_a_address_width = 11,
- ram_block3a_10.port_a_data_width = 1,
- ram_block3a_10.port_a_first_address = 0,
- ram_block3a_10.port_a_first_bit_number = 10,
- ram_block3a_10.port_a_last_address = 2047,
- ram_block3a_10.port_a_logical_ram_depth = 2048,
- ram_block3a_10.port_a_logical_ram_width = 16,
- ram_block3a_10.port_b_address_clear = "none",
- ram_block3a_10.port_b_address_clock = "clock1",
- ram_block3a_10.port_b_address_width = 11,
- ram_block3a_10.port_b_data_out_clear = "none",
- ram_block3a_10.port_b_data_out_clock = "none",
- ram_block3a_10.port_b_data_width = 1,
- ram_block3a_10.port_b_first_address = 0,
- ram_block3a_10.port_b_first_bit_number = 10,
- ram_block3a_10.port_b_last_address = 2047,
- ram_block3a_10.port_b_logical_ram_depth = 2048,
- ram_block3a_10.port_b_logical_ram_width = 16,
- ram_block3a_10.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_10.ram_block_type = "auto",
- ram_block3a_10.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_11
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[11]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_11portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_11.connectivity_checking = "OFF",
- ram_block3a_11.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_11.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_11.operation_mode = "dual_port",
- ram_block3a_11.port_a_address_width = 11,
- ram_block3a_11.port_a_data_width = 1,
- ram_block3a_11.port_a_first_address = 0,
- ram_block3a_11.port_a_first_bit_number = 11,
- ram_block3a_11.port_a_last_address = 2047,
- ram_block3a_11.port_a_logical_ram_depth = 2048,
- ram_block3a_11.port_a_logical_ram_width = 16,
- ram_block3a_11.port_b_address_clear = "none",
- ram_block3a_11.port_b_address_clock = "clock1",
- ram_block3a_11.port_b_address_width = 11,
- ram_block3a_11.port_b_data_out_clear = "none",
- ram_block3a_11.port_b_data_out_clock = "none",
- ram_block3a_11.port_b_data_width = 1,
- ram_block3a_11.port_b_first_address = 0,
- ram_block3a_11.port_b_first_bit_number = 11,
- ram_block3a_11.port_b_last_address = 2047,
- ram_block3a_11.port_b_logical_ram_depth = 2048,
- ram_block3a_11.port_b_logical_ram_width = 16,
- ram_block3a_11.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_11.ram_block_type = "auto",
- ram_block3a_11.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_12
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[12]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_12portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_12.connectivity_checking = "OFF",
- ram_block3a_12.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_12.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_12.operation_mode = "dual_port",
- ram_block3a_12.port_a_address_width = 11,
- ram_block3a_12.port_a_data_width = 1,
- ram_block3a_12.port_a_first_address = 0,
- ram_block3a_12.port_a_first_bit_number = 12,
- ram_block3a_12.port_a_last_address = 2047,
- ram_block3a_12.port_a_logical_ram_depth = 2048,
- ram_block3a_12.port_a_logical_ram_width = 16,
- ram_block3a_12.port_b_address_clear = "none",
- ram_block3a_12.port_b_address_clock = "clock1",
- ram_block3a_12.port_b_address_width = 11,
- ram_block3a_12.port_b_data_out_clear = "none",
- ram_block3a_12.port_b_data_out_clock = "none",
- ram_block3a_12.port_b_data_width = 1,
- ram_block3a_12.port_b_first_address = 0,
- ram_block3a_12.port_b_first_bit_number = 12,
- ram_block3a_12.port_b_last_address = 2047,
- ram_block3a_12.port_b_logical_ram_depth = 2048,
- ram_block3a_12.port_b_logical_ram_width = 16,
- ram_block3a_12.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_12.ram_block_type = "auto",
- ram_block3a_12.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_13
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[13]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_13portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_13.connectivity_checking = "OFF",
- ram_block3a_13.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_13.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_13.operation_mode = "dual_port",
- ram_block3a_13.port_a_address_width = 11,
- ram_block3a_13.port_a_data_width = 1,
- ram_block3a_13.port_a_first_address = 0,
- ram_block3a_13.port_a_first_bit_number = 13,
- ram_block3a_13.port_a_last_address = 2047,
- ram_block3a_13.port_a_logical_ram_depth = 2048,
- ram_block3a_13.port_a_logical_ram_width = 16,
- ram_block3a_13.port_b_address_clear = "none",
- ram_block3a_13.port_b_address_clock = "clock1",
- ram_block3a_13.port_b_address_width = 11,
- ram_block3a_13.port_b_data_out_clear = "none",
- ram_block3a_13.port_b_data_out_clock = "none",
- ram_block3a_13.port_b_data_width = 1,
- ram_block3a_13.port_b_first_address = 0,
- ram_block3a_13.port_b_first_bit_number = 13,
- ram_block3a_13.port_b_last_address = 2047,
- ram_block3a_13.port_b_logical_ram_depth = 2048,
- ram_block3a_13.port_b_logical_ram_width = 16,
- ram_block3a_13.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_13.ram_block_type = "auto",
- ram_block3a_13.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_14
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[14]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_14portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_14.connectivity_checking = "OFF",
- ram_block3a_14.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_14.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_14.operation_mode = "dual_port",
- ram_block3a_14.port_a_address_width = 11,
- ram_block3a_14.port_a_data_width = 1,
- ram_block3a_14.port_a_first_address = 0,
- ram_block3a_14.port_a_first_bit_number = 14,
- ram_block3a_14.port_a_last_address = 2047,
- ram_block3a_14.port_a_logical_ram_depth = 2048,
- ram_block3a_14.port_a_logical_ram_width = 16,
- ram_block3a_14.port_b_address_clear = "none",
- ram_block3a_14.port_b_address_clock = "clock1",
- ram_block3a_14.port_b_address_width = 11,
- ram_block3a_14.port_b_data_out_clear = "none",
- ram_block3a_14.port_b_data_out_clock = "none",
- ram_block3a_14.port_b_data_width = 1,
- ram_block3a_14.port_b_first_address = 0,
- ram_block3a_14.port_b_first_bit_number = 14,
- ram_block3a_14.port_b_last_address = 2047,
- ram_block3a_14.port_b_logical_ram_depth = 2048,
- ram_block3a_14.port_b_logical_ram_width = 16,
- ram_block3a_14.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_14.ram_block_type = "auto",
- ram_block3a_14.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_15
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[10:0]}),
- .portadatain({data_a[15]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[10:0]}),
- .portbdataout(wire_ram_block3a_15portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_15.connectivity_checking = "OFF",
- ram_block3a_15.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_15.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_15.operation_mode = "dual_port",
- ram_block3a_15.port_a_address_width = 11,
- ram_block3a_15.port_a_data_width = 1,
- ram_block3a_15.port_a_first_address = 0,
- ram_block3a_15.port_a_first_bit_number = 15,
- ram_block3a_15.port_a_last_address = 2047,
- ram_block3a_15.port_a_logical_ram_depth = 2048,
- ram_block3a_15.port_a_logical_ram_width = 16,
- ram_block3a_15.port_b_address_clear = "none",
- ram_block3a_15.port_b_address_clock = "clock1",
- ram_block3a_15.port_b_address_width = 11,
- ram_block3a_15.port_b_data_out_clear = "none",
- ram_block3a_15.port_b_data_out_clock = "none",
- ram_block3a_15.port_b_data_width = 1,
- ram_block3a_15.port_b_first_address = 0,
- ram_block3a_15.port_b_first_bit_number = 15,
- ram_block3a_15.port_b_last_address = 2047,
- ram_block3a_15.port_b_logical_ram_depth = 2048,
- ram_block3a_15.port_b_logical_ram_width = 16,
- ram_block3a_15.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_15.ram_block_type = "auto",
- ram_block3a_15.lpm_type = "cyclone_ram_block";
- assign
- address_a_wire = address_a,
- address_b_wire = address_b,
- q_b = {wire_ram_block3a_15portbdataout[0], wire_ram_block3a_14portbdataout[0], wire_ram_block3a_13portbdataout[0], wire_ram_block3a_12portbdataout[0], wire_ram_block3a_11portbdataout[0], wire_ram_block3a_10portbdataout[0], wire_ram_block3a_9portbdataout[0], wire_ram_block3a_8portbdataout[0], wire_ram_block3a_7portbdataout[0], wire_ram_block3a_6portbdataout[0], wire_ram_block3a_5portbdataout[0], wire_ram_block3a_4portbdataout[0], wire_ram_block3a_3portbdataout[0], wire_ram_block3a_2portbdataout[0], wire_ram_block3a_1portbdataout[0], wire_ram_block3a_0portbdataout[0]};
-endmodule //fifo_2k_altsyncram_6pl
-
-
-//dffpipe DELAY=1 WIDTH=11 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = lut 11
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_dffpipe_ab3
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF" */;
- input clock;
- input clrn;
- input [10:0] d;
- output [10:0] q;
-
- wire [10:0] wire_dffe4a_D;
- reg [10:0] dffe4a;
- wire ena;
- wire prn;
- wire sclr;
-
- // synopsys translate_off
- initial
- dffe4a[0:0] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[0:0] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[0:0] <= 1'b0;
- else if (ena == 1'b1) dffe4a[0:0] <= wire_dffe4a_D[0:0];
- // synopsys translate_off
- initial
- dffe4a[1:1] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[1:1] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[1:1] <= 1'b0;
- else if (ena == 1'b1) dffe4a[1:1] <= wire_dffe4a_D[1:1];
- // synopsys translate_off
- initial
- dffe4a[2:2] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[2:2] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[2:2] <= 1'b0;
- else if (ena == 1'b1) dffe4a[2:2] <= wire_dffe4a_D[2:2];
- // synopsys translate_off
- initial
- dffe4a[3:3] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[3:3] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[3:3] <= 1'b0;
- else if (ena == 1'b1) dffe4a[3:3] <= wire_dffe4a_D[3:3];
- // synopsys translate_off
- initial
- dffe4a[4:4] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[4:4] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[4:4] <= 1'b0;
- else if (ena == 1'b1) dffe4a[4:4] <= wire_dffe4a_D[4:4];
- // synopsys translate_off
- initial
- dffe4a[5:5] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[5:5] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[5:5] <= 1'b0;
- else if (ena == 1'b1) dffe4a[5:5] <= wire_dffe4a_D[5:5];
- // synopsys translate_off
- initial
- dffe4a[6:6] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[6:6] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[6:6] <= 1'b0;
- else if (ena == 1'b1) dffe4a[6:6] <= wire_dffe4a_D[6:6];
- // synopsys translate_off
- initial
- dffe4a[7:7] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[7:7] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[7:7] <= 1'b0;
- else if (ena == 1'b1) dffe4a[7:7] <= wire_dffe4a_D[7:7];
- // synopsys translate_off
- initial
- dffe4a[8:8] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[8:8] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[8:8] <= 1'b0;
- else if (ena == 1'b1) dffe4a[8:8] <= wire_dffe4a_D[8:8];
- // synopsys translate_off
- initial
- dffe4a[9:9] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[9:9] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[9:9] <= 1'b0;
- else if (ena == 1'b1) dffe4a[9:9] <= wire_dffe4a_D[9:9];
- // synopsys translate_off
- initial
- dffe4a[10:10] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[10:10] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[10:10] <= 1'b0;
- else if (ena == 1'b1) dffe4a[10:10] <= wire_dffe4a_D[10:10];
- assign
- wire_dffe4a_D = (d & {11{(~ sclr)}});
- assign
- ena = 1'b1,
- prn = 1'b1,
- q = dffe4a,
- sclr = 1'b0;
-endmodule //fifo_2k_dffpipe_ab3
-
-
-//dffpipe WIDTH=11 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_altdpram 2004:11:30:11:29:56:SJ cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_dcfifo 2005:03:07:17:11:14:SJ cbx_fifo_common 2004:12:13:14:26:24:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_counter 2005:02:02:04:37:10:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_scfifo 2005:03:10:10:52:20:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-
-//dffpipe WIDTH=11 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = lut 11
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_dffpipe_dm2
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF" */;
- input clock;
- input clrn;
- input [10:0] d;
- output [10:0] q;
-
- wire [10:0] wire_dffe6a_D;
- reg [10:0] dffe6a;
- wire ena;
- wire prn;
- wire sclr;
-
- // synopsys translate_off
- initial
- dffe6a[0:0] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[0:0] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[0:0] <= 1'b0;
- else if (ena == 1'b1) dffe6a[0:0] <= wire_dffe6a_D[0:0];
- // synopsys translate_off
- initial
- dffe6a[1:1] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[1:1] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[1:1] <= 1'b0;
- else if (ena == 1'b1) dffe6a[1:1] <= wire_dffe6a_D[1:1];
- // synopsys translate_off
- initial
- dffe6a[2:2] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[2:2] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[2:2] <= 1'b0;
- else if (ena == 1'b1) dffe6a[2:2] <= wire_dffe6a_D[2:2];
- // synopsys translate_off
- initial
- dffe6a[3:3] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[3:3] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[3:3] <= 1'b0;
- else if (ena == 1'b1) dffe6a[3:3] <= wire_dffe6a_D[3:3];
- // synopsys translate_off
- initial
- dffe6a[4:4] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[4:4] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[4:4] <= 1'b0;
- else if (ena == 1'b1) dffe6a[4:4] <= wire_dffe6a_D[4:4];
- // synopsys translate_off
- initial
- dffe6a[5:5] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[5:5] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[5:5] <= 1'b0;
- else if (ena == 1'b1) dffe6a[5:5] <= wire_dffe6a_D[5:5];
- // synopsys translate_off
- initial
- dffe6a[6:6] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[6:6] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[6:6] <= 1'b0;
- else if (ena == 1'b1) dffe6a[6:6] <= wire_dffe6a_D[6:6];
- // synopsys translate_off
- initial
- dffe6a[7:7] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[7:7] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[7:7] <= 1'b0;
- else if (ena == 1'b1) dffe6a[7:7] <= wire_dffe6a_D[7:7];
- // synopsys translate_off
- initial
- dffe6a[8:8] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[8:8] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[8:8] <= 1'b0;
- else if (ena == 1'b1) dffe6a[8:8] <= wire_dffe6a_D[8:8];
- // synopsys translate_off
- initial
- dffe6a[9:9] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[9:9] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[9:9] <= 1'b0;
- else if (ena == 1'b1) dffe6a[9:9] <= wire_dffe6a_D[9:9];
- // synopsys translate_off
- initial
- dffe6a[10:10] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[10:10] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[10:10] <= 1'b0;
- else if (ena == 1'b1) dffe6a[10:10] <= wire_dffe6a_D[10:10];
- assign
- wire_dffe6a_D = (d & {11{(~ sclr)}});
- assign
- ena = 1'b1,
- prn = 1'b1,
- q = dffe6a,
- sclr = 1'b0;
-endmodule //fifo_2k_dffpipe_dm2
-
-//synthesis_resources = lut 11
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_alt_synch_pipe_dm2
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="X_ON_VIOLATION_OPTION=OFF" */;
- input clock;
- input clrn;
- input [10:0] d;
- output [10:0] q;
-
- wire [10:0] wire_dffpipe5_q;
-
- fifo_2k_dffpipe_dm2 dffpipe5
- (
- .clock(clock),
- .clrn(clrn),
- .d(d),
- .q(wire_dffpipe5_q));
- assign
- q = wire_dffpipe5_q;
-endmodule //fifo_2k_alt_synch_pipe_dm2
-
-
-//lpm_add_sub DEVICE_FAMILY="Cyclone" LPM_DIRECTION="SUB" LPM_WIDTH=11 dataa datab result
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 11
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_add_sub_a18
- (
- dataa,
- datab,
- result) /* synthesis synthesis_clearbox=1 */;
- input [10:0] dataa;
- input [10:0] datab;
- output [10:0] result;
-
- wire [10:0] wire_add_sub_cella_combout;
- wire [0:0] wire_add_sub_cella_0cout;
- wire [0:0] wire_add_sub_cella_1cout;
- wire [0:0] wire_add_sub_cella_2cout;
- wire [0:0] wire_add_sub_cella_3cout;
- wire [0:0] wire_add_sub_cella_4cout;
- wire [0:0] wire_add_sub_cella_5cout;
- wire [0:0] wire_add_sub_cella_6cout;
- wire [0:0] wire_add_sub_cella_7cout;
- wire [0:0] wire_add_sub_cella_8cout;
- wire [0:0] wire_add_sub_cella_9cout;
- wire [10:0] wire_add_sub_cella_dataa;
- wire [10:0] wire_add_sub_cella_datab;
-
- cyclone_lcell add_sub_cella_0
- (
- .cin(1'b1),
- .combout(wire_add_sub_cella_combout[0:0]),
- .cout(wire_add_sub_cella_0cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[0:0]),
- .datab(wire_add_sub_cella_datab[0:0]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_0.cin_used = "true",
- add_sub_cella_0.lut_mask = "69b2",
- add_sub_cella_0.operation_mode = "arithmetic",
- add_sub_cella_0.sum_lutc_input = "cin",
- add_sub_cella_0.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_1
- (
- .cin(wire_add_sub_cella_0cout[0:0]),
- .combout(wire_add_sub_cella_combout[1:1]),
- .cout(wire_add_sub_cella_1cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[1:1]),
- .datab(wire_add_sub_cella_datab[1:1]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_1.cin_used = "true",
- add_sub_cella_1.lut_mask = "69b2",
- add_sub_cella_1.operation_mode = "arithmetic",
- add_sub_cella_1.sum_lutc_input = "cin",
- add_sub_cella_1.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_2
- (
- .cin(wire_add_sub_cella_1cout[0:0]),
- .combout(wire_add_sub_cella_combout[2:2]),
- .cout(wire_add_sub_cella_2cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[2:2]),
- .datab(wire_add_sub_cella_datab[2:2]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_2.cin_used = "true",
- add_sub_cella_2.lut_mask = "69b2",
- add_sub_cella_2.operation_mode = "arithmetic",
- add_sub_cella_2.sum_lutc_input = "cin",
- add_sub_cella_2.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_3
- (
- .cin(wire_add_sub_cella_2cout[0:0]),
- .combout(wire_add_sub_cella_combout[3:3]),
- .cout(wire_add_sub_cella_3cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[3:3]),
- .datab(wire_add_sub_cella_datab[3:3]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_3.cin_used = "true",
- add_sub_cella_3.lut_mask = "69b2",
- add_sub_cella_3.operation_mode = "arithmetic",
- add_sub_cella_3.sum_lutc_input = "cin",
- add_sub_cella_3.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_4
- (
- .cin(wire_add_sub_cella_3cout[0:0]),
- .combout(wire_add_sub_cella_combout[4:4]),
- .cout(wire_add_sub_cella_4cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[4:4]),
- .datab(wire_add_sub_cella_datab[4:4]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_4.cin_used = "true",
- add_sub_cella_4.lut_mask = "69b2",
- add_sub_cella_4.operation_mode = "arithmetic",
- add_sub_cella_4.sum_lutc_input = "cin",
- add_sub_cella_4.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_5
- (
- .cin(wire_add_sub_cella_4cout[0:0]),
- .combout(wire_add_sub_cella_combout[5:5]),
- .cout(wire_add_sub_cella_5cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[5:5]),
- .datab(wire_add_sub_cella_datab[5:5]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_5.cin_used = "true",
- add_sub_cella_5.lut_mask = "69b2",
- add_sub_cella_5.operation_mode = "arithmetic",
- add_sub_cella_5.sum_lutc_input = "cin",
- add_sub_cella_5.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_6
- (
- .cin(wire_add_sub_cella_5cout[0:0]),
- .combout(wire_add_sub_cella_combout[6:6]),
- .cout(wire_add_sub_cella_6cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[6:6]),
- .datab(wire_add_sub_cella_datab[6:6]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_6.cin_used = "true",
- add_sub_cella_6.lut_mask = "69b2",
- add_sub_cella_6.operation_mode = "arithmetic",
- add_sub_cella_6.sum_lutc_input = "cin",
- add_sub_cella_6.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_7
- (
- .cin(wire_add_sub_cella_6cout[0:0]),
- .combout(wire_add_sub_cella_combout[7:7]),
- .cout(wire_add_sub_cella_7cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[7:7]),
- .datab(wire_add_sub_cella_datab[7:7]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_7.cin_used = "true",
- add_sub_cella_7.lut_mask = "69b2",
- add_sub_cella_7.operation_mode = "arithmetic",
- add_sub_cella_7.sum_lutc_input = "cin",
- add_sub_cella_7.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_8
- (
- .cin(wire_add_sub_cella_7cout[0:0]),
- .combout(wire_add_sub_cella_combout[8:8]),
- .cout(wire_add_sub_cella_8cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[8:8]),
- .datab(wire_add_sub_cella_datab[8:8]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_8.cin_used = "true",
- add_sub_cella_8.lut_mask = "69b2",
- add_sub_cella_8.operation_mode = "arithmetic",
- add_sub_cella_8.sum_lutc_input = "cin",
- add_sub_cella_8.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_9
- (
- .cin(wire_add_sub_cella_8cout[0:0]),
- .combout(wire_add_sub_cella_combout[9:9]),
- .cout(wire_add_sub_cella_9cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[9:9]),
- .datab(wire_add_sub_cella_datab[9:9]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_9.cin_used = "true",
- add_sub_cella_9.lut_mask = "69b2",
- add_sub_cella_9.operation_mode = "arithmetic",
- add_sub_cella_9.sum_lutc_input = "cin",
- add_sub_cella_9.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_10
- (
- .cin(wire_add_sub_cella_9cout[0:0]),
- .combout(wire_add_sub_cella_combout[10:10]),
- .cout(),
- .dataa(wire_add_sub_cella_dataa[10:10]),
- .datab(wire_add_sub_cella_datab[10:10]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_10.cin_used = "true",
- add_sub_cella_10.lut_mask = "6969",
- add_sub_cella_10.operation_mode = "normal",
- add_sub_cella_10.sum_lutc_input = "cin",
- add_sub_cella_10.lpm_type = "cyclone_lcell";
- assign
- wire_add_sub_cella_dataa = dataa,
- wire_add_sub_cella_datab = datab;
- assign
- result = wire_add_sub_cella_combout;
-endmodule //fifo_2k_add_sub_a18
-
-
-//lpm_compare DEVICE_FAMILY="Cyclone" LPM_WIDTH=11 aeb dataa datab
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-
-//lpm_compare DEVICE_FAMILY="Cyclone" LPM_WIDTH=11 aeb dataa datab
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 97 M4K 8
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_2k_dcfifo_0cq
- (
- aclr,
- data,
- q,
- rdclk,
- rdempty,
- rdreq,
- rdusedw,
- wrclk,
- wrfull,
- wrreq,
- wrusedw) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF;{ -from \"rdptr_g|power_modified_counter_values\" -to \"ws_dgrp|dffpipe5|dffe6a\" }CUT=ON;{ -from \"delayed_wrptr_g\" -to \"rs_dgwp|dffpipe5|dffe6a\" }CUT=ON" */;
- input aclr;
- input [15:0] data;
- output [15:0] q;
- input rdclk;
- output rdempty;
- input rdreq;
- output [10:0] rdusedw;
- input wrclk;
- output wrfull;
- input wrreq;
- output [10:0] wrusedw;
-
- wire [10:0] wire_rdptr_g_gray2bin_bin;
- wire [10:0] wire_rs_dgwp_gray2bin_bin;
- wire [10:0] wire_wrptr_g_gray2bin_bin;
- wire [10:0] wire_ws_dgrp_gray2bin_bin;
- wire [10:0] wire_rdptr_g_q;
- wire [10:0] wire_rdptr_g1p_q;
- wire [10:0] wire_wrptr_g1p_q;
- wire [15:0] wire_fifo_ram_q_b;
- reg [10:0] delayed_wrptr_g;
- reg [10:0] wrptr_g;
- wire [10:0] wire_rs_brp_q;
- wire [10:0] wire_rs_bwp_q;
- wire [10:0] wire_rs_dgwp_q;
- wire [10:0] wire_ws_brp_q;
- wire [10:0] wire_ws_bwp_q;
- wire [10:0] wire_ws_dgrp_q;
- wire [10:0] wire_rdusedw_sub_result;
- wire [10:0] wire_wrusedw_sub_result;
- reg wire_rdempty_eq_comp_aeb_int;
- wire wire_rdempty_eq_comp_aeb;
- wire [10:0] wire_rdempty_eq_comp_dataa;
- wire [10:0] wire_rdempty_eq_comp_datab;
- reg wire_wrfull_eq_comp_aeb_int;
- wire wire_wrfull_eq_comp_aeb;
- wire [10:0] wire_wrfull_eq_comp_dataa;
- wire [10:0] wire_wrfull_eq_comp_datab;
- wire int_rdempty;
- wire int_wrfull;
- wire valid_rdreq;
- wire valid_wrreq;
-
- fifo_2k_a_gray2bin_8m4 rdptr_g_gray2bin
- (
- .bin(wire_rdptr_g_gray2bin_bin),
- .gray(wire_rdptr_g_q));
- fifo_2k_a_gray2bin_8m4 rs_dgwp_gray2bin
- (
- .bin(wire_rs_dgwp_gray2bin_bin),
- .gray(wire_rs_dgwp_q));
- fifo_2k_a_gray2bin_8m4 wrptr_g_gray2bin
- (
- .bin(wire_wrptr_g_gray2bin_bin),
- .gray(wrptr_g));
- fifo_2k_a_gray2bin_8m4 ws_dgrp_gray2bin
- (
- .bin(wire_ws_dgrp_gray2bin_bin),
- .gray(wire_ws_dgrp_q));
- fifo_2k_a_graycounter_726 rdptr_g
- (
- .aclr(aclr),
- .clock(rdclk),
- .cnt_en(valid_rdreq),
- .q(wire_rdptr_g_q));
- fifo_2k_a_graycounter_2r6 rdptr_g1p
- (
- .aclr(aclr),
- .clock(rdclk),
- .cnt_en(valid_rdreq),
- .q(wire_rdptr_g1p_q));
- fifo_2k_a_graycounter_2r6 wrptr_g1p
- (
- .aclr(aclr),
- .clock(wrclk),
- .cnt_en(valid_wrreq),
- .q(wire_wrptr_g1p_q));
- fifo_2k_altsyncram_6pl fifo_ram
- (
- .address_a(wrptr_g),
- .address_b(((wire_rdptr_g_q & {11{int_rdempty}}) | (wire_rdptr_g1p_q & {11{(~ int_rdempty)}}))),
- .clock0(wrclk),
- .clock1(rdclk),
- .clocken1((valid_rdreq | int_rdempty)),
- .data_a(data),
- .q_b(wire_fifo_ram_q_b),
- .wren_a(valid_wrreq));
- // synopsys translate_off
- initial
- delayed_wrptr_g = 0;
- // synopsys translate_on
- always @ ( posedge wrclk or posedge aclr)
- if (aclr == 1'b1) delayed_wrptr_g <= 11'b0;
- else delayed_wrptr_g <= wrptr_g;
- // synopsys translate_off
- initial
- wrptr_g = 0;
- // synopsys translate_on
- always @ ( posedge wrclk or posedge aclr)
- if (aclr == 1'b1) wrptr_g <= 11'b0;
- else if (valid_wrreq == 1'b1) wrptr_g <= wire_wrptr_g1p_q;
- fifo_2k_dffpipe_ab3 rs_brp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(wire_rdptr_g_gray2bin_bin),
- .q(wire_rs_brp_q));
- fifo_2k_dffpipe_ab3 rs_bwp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(wire_rs_dgwp_gray2bin_bin),
- .q(wire_rs_bwp_q));
- fifo_2k_alt_synch_pipe_dm2 rs_dgwp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(delayed_wrptr_g),
- .q(wire_rs_dgwp_q));
- fifo_2k_dffpipe_ab3 ws_brp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_ws_dgrp_gray2bin_bin),
- .q(wire_ws_brp_q));
- fifo_2k_dffpipe_ab3 ws_bwp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_wrptr_g_gray2bin_bin),
- .q(wire_ws_bwp_q));
- fifo_2k_alt_synch_pipe_dm2 ws_dgrp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_rdptr_g_q),
- .q(wire_ws_dgrp_q));
- fifo_2k_add_sub_a18 rdusedw_sub
- (
- .dataa(wire_rs_bwp_q),
- .datab(wire_rs_brp_q),
- .result(wire_rdusedw_sub_result));
- fifo_2k_add_sub_a18 wrusedw_sub
- (
- .dataa(wire_ws_bwp_q),
- .datab(wire_ws_brp_q),
- .result(wire_wrusedw_sub_result));
- always @(wire_rdempty_eq_comp_dataa or wire_rdempty_eq_comp_datab)
- if (wire_rdempty_eq_comp_dataa == wire_rdempty_eq_comp_datab)
- begin
- wire_rdempty_eq_comp_aeb_int = 1'b1;
- end
- else
- begin
- wire_rdempty_eq_comp_aeb_int = 1'b0;
- end
- assign
- wire_rdempty_eq_comp_aeb = wire_rdempty_eq_comp_aeb_int;
- assign
- wire_rdempty_eq_comp_dataa = wire_rs_dgwp_q,
- wire_rdempty_eq_comp_datab = wire_rdptr_g_q;
- always @(wire_wrfull_eq_comp_dataa or wire_wrfull_eq_comp_datab)
- if (wire_wrfull_eq_comp_dataa == wire_wrfull_eq_comp_datab)
- begin
- wire_wrfull_eq_comp_aeb_int = 1'b1;
- end
- else
- begin
- wire_wrfull_eq_comp_aeb_int = 1'b0;
- end
- assign
- wire_wrfull_eq_comp_aeb = wire_wrfull_eq_comp_aeb_int;
- assign
- wire_wrfull_eq_comp_dataa = wire_ws_dgrp_q,
- wire_wrfull_eq_comp_datab = wire_wrptr_g1p_q;
- assign
- int_rdempty = wire_rdempty_eq_comp_aeb,
- int_wrfull = wire_wrfull_eq_comp_aeb,
- q = wire_fifo_ram_q_b,
- rdempty = int_rdempty,
- rdusedw = wire_rdusedw_sub_result,
- valid_rdreq = rdreq,
- valid_wrreq = wrreq,
- wrfull = int_wrfull,
- wrusedw = wire_wrusedw_sub_result;
-endmodule //fifo_2k_dcfifo_0cq
-//VALID FILE
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module fifo_2k (
- data,
- wrreq,
- rdreq,
- rdclk,
- wrclk,
- aclr,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw)/* synthesis synthesis_clearbox = 1 */;
-
- input [15:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [15:0] q;
- output rdempty;
- output [10:0] rdusedw;
- output wrfull;
- output [10:0] wrusedw;
-
- wire sub_wire0;
- wire [10:0] sub_wire1;
- wire sub_wire2;
- wire [15:0] sub_wire3;
- wire [10:0] sub_wire4;
- wire rdempty = sub_wire0;
- wire [10:0] wrusedw = sub_wire1[10:0];
- wire wrfull = sub_wire2;
- wire [15:0] q = sub_wire3[15:0];
- wire [10:0] rdusedw = sub_wire4[10:0];
-
- fifo_2k_dcfifo_0cq fifo_2k_dcfifo_0cq_component (
- .wrclk (wrclk),
- .rdreq (rdreq),
- .aclr (aclr),
- .rdclk (rdclk),
- .wrreq (wrreq),
- .data (data),
- .rdempty (sub_wire0),
- .wrusedw (sub_wire1),
- .wrfull (sub_wire2),
- .q (sub_wire3),
- .rdusedw (sub_wire4));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: Depth NUMERIC "2048"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "2048"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "11"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdusedw 0 0 11 0 OUTPUT NODEFVAL rdusedw[10..0]
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrusedw 0 0 11 0 OUTPUT NODEFVAL wrusedw[10..0]
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 11 0 @rdusedw 0 0 11 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 11 0 @wrusedw 0 0 11 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.inc FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.cmp FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.bsf FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_inst.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_waveforms.html TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_2k_bb.v b/usrp/fpga/megacells/fifo_2k_bb.v
deleted file mode 100644
index 3fcc2a496..000000000
--- a/usrp/fpga/megacells/fifo_2k_bb.v
+++ /dev/null
@@ -1,131 +0,0 @@
-// megafunction wizard: %FIFO%VBB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_2k.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.0 Build 168 06/22/2005 SP 1 SJ Web Edition
-// ************************************************************
-
-//Copyright (C) 1991-2005 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-module fifo_2k (
- data,
- wrreq,
- rdreq,
- rdclk,
- wrclk,
- aclr,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw)/* synthesis synthesis_clearbox = 1 */;
-
- input [15:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [15:0] q;
- output rdempty;
- output [10:0] rdusedw;
- output wrfull;
- output [10:0] wrusedw;
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: Depth NUMERIC "2048"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "2048"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "11"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdusedw 0 0 11 0 OUTPUT NODEFVAL rdusedw[10..0]
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrusedw 0 0 11 0 OUTPUT NODEFVAL wrusedw[10..0]
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 11 0 @rdusedw 0 0 11 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 11 0 @wrusedw 0 0 11 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.inc FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.cmp FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k.bsf FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_inst.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_waveforms.html TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_2k_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_4k.v b/usrp/fpga/megacells/fifo_4k.v
deleted file mode 100644
index a5ab46677..000000000
--- a/usrp/fpga/megacells/fifo_4k.v
+++ /dev/null
@@ -1,3495 +0,0 @@
-// megafunction wizard: %FIFO%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_4k.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.0 Build 168 06/22/2005 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2005 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-
-//dcfifo ADD_RAM_OUTPUT_REGISTER="OFF" CLOCKS_ARE_SYNCHRONIZED="FALSE" DEVICE_FAMILY="Cyclone" LPM_NUMWORDS=4096 LPM_SHOWAHEAD="ON" LPM_WIDTH=16 LPM_WIDTHU=12 OVERFLOW_CHECKING="OFF" UNDERFLOW_CHECKING="OFF" USE_EAB="ON" aclr data q rdclk rdempty rdreq rdusedw wrclk wrfull wrreq wrusedw
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_altdpram 2004:11:30:11:29:56:SJ cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_dcfifo 2005:03:07:17:11:14:SJ cbx_fifo_common 2004:12:13:14:26:24:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_counter 2005:02:02:04:37:10:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_scfifo 2005:03:10:10:52:20:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-
-//a_gray2bin device_family="Cyclone" WIDTH=12 bin gray
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_mgl 2005:05:19:13:51:58:SJ VERSION_END
-
-//synthesis_resources =
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_a_gray2bin_9m4
- (
- bin,
- gray) /* synthesis synthesis_clearbox=1 */;
- output [11:0] bin;
- input [11:0] gray;
-
- wire xor0;
- wire xor1;
- wire xor10;
- wire xor2;
- wire xor3;
- wire xor4;
- wire xor5;
- wire xor6;
- wire xor7;
- wire xor8;
- wire xor9;
-
- assign
- bin = {gray[11], xor10, xor9, xor8, xor7, xor6, xor5, xor4, xor3, xor2, xor1, xor0},
- xor0 = (gray[0] ^ xor1),
- xor1 = (gray[1] ^ xor2),
- xor10 = (gray[11] ^ gray[10]),
- xor2 = (gray[2] ^ xor3),
- xor3 = (gray[3] ^ xor4),
- xor4 = (gray[4] ^ xor5),
- xor5 = (gray[5] ^ xor6),
- xor6 = (gray[6] ^ xor7),
- xor7 = (gray[7] ^ xor8),
- xor8 = (gray[8] ^ xor9),
- xor9 = (gray[9] ^ xor10);
-endmodule //fifo_4k_a_gray2bin_9m4
-
-
-//a_graycounter DEVICE_FAMILY="Cyclone" WIDTH=12 aclr clock cnt_en q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 13
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_a_graycounter_826
- (
- aclr,
- clock,
- cnt_en,
- q) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clock;
- input cnt_en;
- output [11:0] q;
-
- wire [0:0] wire_countera_0cout;
- wire [0:0] wire_countera_1cout;
- wire [0:0] wire_countera_2cout;
- wire [0:0] wire_countera_3cout;
- wire [0:0] wire_countera_4cout;
- wire [0:0] wire_countera_5cout;
- wire [0:0] wire_countera_6cout;
- wire [0:0] wire_countera_7cout;
- wire [0:0] wire_countera_8cout;
- wire [0:0] wire_countera_9cout;
- wire [0:0] wire_countera_10cout;
- wire [11:0] wire_countera_regout;
- wire wire_parity_cout;
- wire wire_parity_regout;
- wire [11:0] power_modified_counter_values;
- wire sclr;
- wire updown;
-
- cyclone_lcell countera_0
- (
- .aclr(aclr),
- .cin(wire_parity_cout),
- .clk(clock),
- .combout(),
- .cout(wire_countera_0cout[0:0]),
- .dataa(cnt_en),
- .datab(wire_countera_regout[0:0]),
- .ena(1'b1),
- .regout(wire_countera_regout[0:0]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_0.cin_used = "true",
- countera_0.lut_mask = "c6a0",
- countera_0.operation_mode = "arithmetic",
- countera_0.sum_lutc_input = "cin",
- countera_0.synch_mode = "on",
- countera_0.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_1
- (
- .aclr(aclr),
- .cin(wire_countera_0cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_1cout[0:0]),
- .dataa(power_modified_counter_values[0]),
- .datab(power_modified_counter_values[1]),
- .ena(1'b1),
- .regout(wire_countera_regout[1:1]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_1.cin_used = "true",
- countera_1.lut_mask = "6c50",
- countera_1.operation_mode = "arithmetic",
- countera_1.sum_lutc_input = "cin",
- countera_1.synch_mode = "on",
- countera_1.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_2
- (
- .aclr(aclr),
- .cin(wire_countera_1cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_2cout[0:0]),
- .dataa(power_modified_counter_values[1]),
- .datab(power_modified_counter_values[2]),
- .ena(1'b1),
- .regout(wire_countera_regout[2:2]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_2.cin_used = "true",
- countera_2.lut_mask = "6c50",
- countera_2.operation_mode = "arithmetic",
- countera_2.sum_lutc_input = "cin",
- countera_2.synch_mode = "on",
- countera_2.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_3
- (
- .aclr(aclr),
- .cin(wire_countera_2cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_3cout[0:0]),
- .dataa(power_modified_counter_values[2]),
- .datab(power_modified_counter_values[3]),
- .ena(1'b1),
- .regout(wire_countera_regout[3:3]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_3.cin_used = "true",
- countera_3.lut_mask = "6c50",
- countera_3.operation_mode = "arithmetic",
- countera_3.sum_lutc_input = "cin",
- countera_3.synch_mode = "on",
- countera_3.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_4
- (
- .aclr(aclr),
- .cin(wire_countera_3cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_4cout[0:0]),
- .dataa(power_modified_counter_values[3]),
- .datab(power_modified_counter_values[4]),
- .ena(1'b1),
- .regout(wire_countera_regout[4:4]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_4.cin_used = "true",
- countera_4.lut_mask = "6c50",
- countera_4.operation_mode = "arithmetic",
- countera_4.sum_lutc_input = "cin",
- countera_4.synch_mode = "on",
- countera_4.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_5
- (
- .aclr(aclr),
- .cin(wire_countera_4cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_5cout[0:0]),
- .dataa(power_modified_counter_values[4]),
- .datab(power_modified_counter_values[5]),
- .ena(1'b1),
- .regout(wire_countera_regout[5:5]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_5.cin_used = "true",
- countera_5.lut_mask = "6c50",
- countera_5.operation_mode = "arithmetic",
- countera_5.sum_lutc_input = "cin",
- countera_5.synch_mode = "on",
- countera_5.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_6
- (
- .aclr(aclr),
- .cin(wire_countera_5cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_6cout[0:0]),
- .dataa(power_modified_counter_values[5]),
- .datab(power_modified_counter_values[6]),
- .ena(1'b1),
- .regout(wire_countera_regout[6:6]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_6.cin_used = "true",
- countera_6.lut_mask = "6c50",
- countera_6.operation_mode = "arithmetic",
- countera_6.sum_lutc_input = "cin",
- countera_6.synch_mode = "on",
- countera_6.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_7
- (
- .aclr(aclr),
- .cin(wire_countera_6cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_7cout[0:0]),
- .dataa(power_modified_counter_values[6]),
- .datab(power_modified_counter_values[7]),
- .ena(1'b1),
- .regout(wire_countera_regout[7:7]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_7.cin_used = "true",
- countera_7.lut_mask = "6c50",
- countera_7.operation_mode = "arithmetic",
- countera_7.sum_lutc_input = "cin",
- countera_7.synch_mode = "on",
- countera_7.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_8
- (
- .aclr(aclr),
- .cin(wire_countera_7cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_8cout[0:0]),
- .dataa(power_modified_counter_values[7]),
- .datab(power_modified_counter_values[8]),
- .ena(1'b1),
- .regout(wire_countera_regout[8:8]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_8.cin_used = "true",
- countera_8.lut_mask = "6c50",
- countera_8.operation_mode = "arithmetic",
- countera_8.sum_lutc_input = "cin",
- countera_8.synch_mode = "on",
- countera_8.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_9
- (
- .aclr(aclr),
- .cin(wire_countera_8cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_9cout[0:0]),
- .dataa(power_modified_counter_values[8]),
- .datab(power_modified_counter_values[9]),
- .ena(1'b1),
- .regout(wire_countera_regout[9:9]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_9.cin_used = "true",
- countera_9.lut_mask = "6c50",
- countera_9.operation_mode = "arithmetic",
- countera_9.sum_lutc_input = "cin",
- countera_9.synch_mode = "on",
- countera_9.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_10
- (
- .aclr(aclr),
- .cin(wire_countera_9cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_10cout[0:0]),
- .dataa(power_modified_counter_values[9]),
- .datab(power_modified_counter_values[10]),
- .ena(1'b1),
- .regout(wire_countera_regout[10:10]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_10.cin_used = "true",
- countera_10.lut_mask = "6c50",
- countera_10.operation_mode = "arithmetic",
- countera_10.sum_lutc_input = "cin",
- countera_10.synch_mode = "on",
- countera_10.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_11
- (
- .aclr(aclr),
- .cin(wire_countera_10cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(),
- .dataa(power_modified_counter_values[11]),
- .ena(1'b1),
- .regout(wire_countera_regout[11:11]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datab(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_11.cin_used = "true",
- countera_11.lut_mask = "5a5a",
- countera_11.operation_mode = "normal",
- countera_11.sum_lutc_input = "cin",
- countera_11.synch_mode = "on",
- countera_11.lpm_type = "cyclone_lcell";
- cyclone_lcell parity
- (
- .aclr(aclr),
- .cin(updown),
- .clk(clock),
- .combout(),
- .cout(wire_parity_cout),
- .dataa(cnt_en),
- .datab(wire_parity_regout),
- .ena(1'b1),
- .regout(wire_parity_regout),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- parity.cin_used = "true",
- parity.lut_mask = "6682",
- parity.operation_mode = "arithmetic",
- parity.synch_mode = "on",
- parity.lpm_type = "cyclone_lcell";
- assign
- power_modified_counter_values = {wire_countera_regout[11:0]},
- q = power_modified_counter_values,
- sclr = 1'b0,
- updown = 1'b1;
-endmodule //fifo_4k_a_graycounter_826
-
-
-//a_graycounter DEVICE_FAMILY="Cyclone" PVALUE=1 WIDTH=12 aclr clock cnt_en q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 13
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_a_graycounter_3r6
- (
- aclr,
- clock,
- cnt_en,
- q) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clock;
- input cnt_en;
- output [11:0] q;
-
- wire [0:0] wire_countera_0cout;
- wire [0:0] wire_countera_1cout;
- wire [0:0] wire_countera_2cout;
- wire [0:0] wire_countera_3cout;
- wire [0:0] wire_countera_4cout;
- wire [0:0] wire_countera_5cout;
- wire [0:0] wire_countera_6cout;
- wire [0:0] wire_countera_7cout;
- wire [0:0] wire_countera_8cout;
- wire [0:0] wire_countera_9cout;
- wire [0:0] wire_countera_10cout;
- wire [11:0] wire_countera_regout;
- wire wire_parity_cout;
- wire wire_parity_regout;
- wire [11:0] power_modified_counter_values;
- wire sclr;
- wire updown;
-
- cyclone_lcell countera_0
- (
- .aclr(aclr),
- .cin(wire_parity_cout),
- .clk(clock),
- .combout(),
- .cout(wire_countera_0cout[0:0]),
- .dataa(cnt_en),
- .datab(wire_countera_regout[0:0]),
- .ena(1'b1),
- .regout(wire_countera_regout[0:0]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_0.cin_used = "true",
- countera_0.lut_mask = "c6a0",
- countera_0.operation_mode = "arithmetic",
- countera_0.sum_lutc_input = "cin",
- countera_0.synch_mode = "on",
- countera_0.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_1
- (
- .aclr(aclr),
- .cin(wire_countera_0cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_1cout[0:0]),
- .dataa(power_modified_counter_values[0]),
- .datab(power_modified_counter_values[1]),
- .ena(1'b1),
- .regout(wire_countera_regout[1:1]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_1.cin_used = "true",
- countera_1.lut_mask = "6c50",
- countera_1.operation_mode = "arithmetic",
- countera_1.sum_lutc_input = "cin",
- countera_1.synch_mode = "on",
- countera_1.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_2
- (
- .aclr(aclr),
- .cin(wire_countera_1cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_2cout[0:0]),
- .dataa(power_modified_counter_values[1]),
- .datab(power_modified_counter_values[2]),
- .ena(1'b1),
- .regout(wire_countera_regout[2:2]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_2.cin_used = "true",
- countera_2.lut_mask = "6c50",
- countera_2.operation_mode = "arithmetic",
- countera_2.sum_lutc_input = "cin",
- countera_2.synch_mode = "on",
- countera_2.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_3
- (
- .aclr(aclr),
- .cin(wire_countera_2cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_3cout[0:0]),
- .dataa(power_modified_counter_values[2]),
- .datab(power_modified_counter_values[3]),
- .ena(1'b1),
- .regout(wire_countera_regout[3:3]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_3.cin_used = "true",
- countera_3.lut_mask = "6c50",
- countera_3.operation_mode = "arithmetic",
- countera_3.sum_lutc_input = "cin",
- countera_3.synch_mode = "on",
- countera_3.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_4
- (
- .aclr(aclr),
- .cin(wire_countera_3cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_4cout[0:0]),
- .dataa(power_modified_counter_values[3]),
- .datab(power_modified_counter_values[4]),
- .ena(1'b1),
- .regout(wire_countera_regout[4:4]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_4.cin_used = "true",
- countera_4.lut_mask = "6c50",
- countera_4.operation_mode = "arithmetic",
- countera_4.sum_lutc_input = "cin",
- countera_4.synch_mode = "on",
- countera_4.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_5
- (
- .aclr(aclr),
- .cin(wire_countera_4cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_5cout[0:0]),
- .dataa(power_modified_counter_values[4]),
- .datab(power_modified_counter_values[5]),
- .ena(1'b1),
- .regout(wire_countera_regout[5:5]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_5.cin_used = "true",
- countera_5.lut_mask = "6c50",
- countera_5.operation_mode = "arithmetic",
- countera_5.sum_lutc_input = "cin",
- countera_5.synch_mode = "on",
- countera_5.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_6
- (
- .aclr(aclr),
- .cin(wire_countera_5cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_6cout[0:0]),
- .dataa(power_modified_counter_values[5]),
- .datab(power_modified_counter_values[6]),
- .ena(1'b1),
- .regout(wire_countera_regout[6:6]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_6.cin_used = "true",
- countera_6.lut_mask = "6c50",
- countera_6.operation_mode = "arithmetic",
- countera_6.sum_lutc_input = "cin",
- countera_6.synch_mode = "on",
- countera_6.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_7
- (
- .aclr(aclr),
- .cin(wire_countera_6cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_7cout[0:0]),
- .dataa(power_modified_counter_values[6]),
- .datab(power_modified_counter_values[7]),
- .ena(1'b1),
- .regout(wire_countera_regout[7:7]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_7.cin_used = "true",
- countera_7.lut_mask = "6c50",
- countera_7.operation_mode = "arithmetic",
- countera_7.sum_lutc_input = "cin",
- countera_7.synch_mode = "on",
- countera_7.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_8
- (
- .aclr(aclr),
- .cin(wire_countera_7cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_8cout[0:0]),
- .dataa(power_modified_counter_values[7]),
- .datab(power_modified_counter_values[8]),
- .ena(1'b1),
- .regout(wire_countera_regout[8:8]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_8.cin_used = "true",
- countera_8.lut_mask = "6c50",
- countera_8.operation_mode = "arithmetic",
- countera_8.sum_lutc_input = "cin",
- countera_8.synch_mode = "on",
- countera_8.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_9
- (
- .aclr(aclr),
- .cin(wire_countera_8cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_9cout[0:0]),
- .dataa(power_modified_counter_values[8]),
- .datab(power_modified_counter_values[9]),
- .ena(1'b1),
- .regout(wire_countera_regout[9:9]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_9.cin_used = "true",
- countera_9.lut_mask = "6c50",
- countera_9.operation_mode = "arithmetic",
- countera_9.sum_lutc_input = "cin",
- countera_9.synch_mode = "on",
- countera_9.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_10
- (
- .aclr(aclr),
- .cin(wire_countera_9cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(wire_countera_10cout[0:0]),
- .dataa(power_modified_counter_values[9]),
- .datab(power_modified_counter_values[10]),
- .ena(1'b1),
- .regout(wire_countera_regout[10:10]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_10.cin_used = "true",
- countera_10.lut_mask = "6c50",
- countera_10.operation_mode = "arithmetic",
- countera_10.sum_lutc_input = "cin",
- countera_10.synch_mode = "on",
- countera_10.lpm_type = "cyclone_lcell";
- cyclone_lcell countera_11
- (
- .aclr(aclr),
- .cin(wire_countera_10cout[0:0]),
- .clk(clock),
- .combout(),
- .cout(),
- .dataa(power_modified_counter_values[11]),
- .ena(1'b1),
- .regout(wire_countera_regout[11:11]),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datab(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- countera_11.cin_used = "true",
- countera_11.lut_mask = "5a5a",
- countera_11.operation_mode = "normal",
- countera_11.sum_lutc_input = "cin",
- countera_11.synch_mode = "on",
- countera_11.lpm_type = "cyclone_lcell";
- cyclone_lcell parity
- (
- .aclr(aclr),
- .cin(updown),
- .clk(clock),
- .combout(),
- .cout(wire_parity_cout),
- .dataa(cnt_en),
- .datab((~ wire_parity_regout)),
- .ena(1'b1),
- .regout(wire_parity_regout),
- .sclr(sclr)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aload(1'b0),
- .datac(1'b1),
- .datad(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- parity.cin_used = "true",
- parity.lut_mask = "9982",
- parity.operation_mode = "arithmetic",
- parity.synch_mode = "on",
- parity.lpm_type = "cyclone_lcell";
- assign
- power_modified_counter_values = {wire_countera_regout[11:1], (~ wire_countera_regout[0])},
- q = power_modified_counter_values,
- sclr = 1'b0,
- updown = 1'b1;
-endmodule //fifo_4k_a_graycounter_3r6
-
-
-//altsyncram ADDRESS_REG_B="CLOCK1" DEVICE_FAMILY="Cyclone" OPERATION_MODE="DUAL_PORT" OUTDATA_REG_B="UNREGISTERED" WIDTH_A=16 WIDTH_B=16 WIDTH_BYTEENA_A=1 WIDTHAD_A=12 WIDTHAD_B=12 address_a address_b clock0 clock1 clocken1 data_a q_b wren_a
-//VERSION_BEGIN 5.0 cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = M4K 16
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_altsyncram_8pl
- (
- address_a,
- address_b,
- clock0,
- clock1,
- clocken1,
- data_a,
- q_b,
- wren_a) /* synthesis synthesis_clearbox=1 */;
- input [11:0] address_a;
- input [11:0] address_b;
- input clock0;
- input clock1;
- input clocken1;
- input [15:0] data_a;
- output [15:0] q_b;
- input wren_a;
-
- wire [0:0] wire_ram_block3a_0portbdataout;
- wire [0:0] wire_ram_block3a_1portbdataout;
- wire [0:0] wire_ram_block3a_2portbdataout;
- wire [0:0] wire_ram_block3a_3portbdataout;
- wire [0:0] wire_ram_block3a_4portbdataout;
- wire [0:0] wire_ram_block3a_5portbdataout;
- wire [0:0] wire_ram_block3a_6portbdataout;
- wire [0:0] wire_ram_block3a_7portbdataout;
- wire [0:0] wire_ram_block3a_8portbdataout;
- wire [0:0] wire_ram_block3a_9portbdataout;
- wire [0:0] wire_ram_block3a_10portbdataout;
- wire [0:0] wire_ram_block3a_11portbdataout;
- wire [0:0] wire_ram_block3a_12portbdataout;
- wire [0:0] wire_ram_block3a_13portbdataout;
- wire [0:0] wire_ram_block3a_14portbdataout;
- wire [0:0] wire_ram_block3a_15portbdataout;
- wire [11:0] address_a_wire;
- wire [11:0] address_b_wire;
-
- cyclone_ram_block ram_block3a_0
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[0]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_0portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_0.connectivity_checking = "OFF",
- ram_block3a_0.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_0.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_0.operation_mode = "dual_port",
- ram_block3a_0.port_a_address_width = 12,
- ram_block3a_0.port_a_data_width = 1,
- ram_block3a_0.port_a_first_address = 0,
- ram_block3a_0.port_a_first_bit_number = 0,
- ram_block3a_0.port_a_last_address = 4095,
- ram_block3a_0.port_a_logical_ram_depth = 4096,
- ram_block3a_0.port_a_logical_ram_width = 16,
- ram_block3a_0.port_b_address_clear = "none",
- ram_block3a_0.port_b_address_clock = "clock1",
- ram_block3a_0.port_b_address_width = 12,
- ram_block3a_0.port_b_data_out_clear = "none",
- ram_block3a_0.port_b_data_out_clock = "none",
- ram_block3a_0.port_b_data_width = 1,
- ram_block3a_0.port_b_first_address = 0,
- ram_block3a_0.port_b_first_bit_number = 0,
- ram_block3a_0.port_b_last_address = 4095,
- ram_block3a_0.port_b_logical_ram_depth = 4096,
- ram_block3a_0.port_b_logical_ram_width = 16,
- ram_block3a_0.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_0.ram_block_type = "auto",
- ram_block3a_0.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_1
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[1]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_1portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_1.connectivity_checking = "OFF",
- ram_block3a_1.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_1.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_1.operation_mode = "dual_port",
- ram_block3a_1.port_a_address_width = 12,
- ram_block3a_1.port_a_data_width = 1,
- ram_block3a_1.port_a_first_address = 0,
- ram_block3a_1.port_a_first_bit_number = 1,
- ram_block3a_1.port_a_last_address = 4095,
- ram_block3a_1.port_a_logical_ram_depth = 4096,
- ram_block3a_1.port_a_logical_ram_width = 16,
- ram_block3a_1.port_b_address_clear = "none",
- ram_block3a_1.port_b_address_clock = "clock1",
- ram_block3a_1.port_b_address_width = 12,
- ram_block3a_1.port_b_data_out_clear = "none",
- ram_block3a_1.port_b_data_out_clock = "none",
- ram_block3a_1.port_b_data_width = 1,
- ram_block3a_1.port_b_first_address = 0,
- ram_block3a_1.port_b_first_bit_number = 1,
- ram_block3a_1.port_b_last_address = 4095,
- ram_block3a_1.port_b_logical_ram_depth = 4096,
- ram_block3a_1.port_b_logical_ram_width = 16,
- ram_block3a_1.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_1.ram_block_type = "auto",
- ram_block3a_1.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_2
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[2]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_2portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_2.connectivity_checking = "OFF",
- ram_block3a_2.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_2.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_2.operation_mode = "dual_port",
- ram_block3a_2.port_a_address_width = 12,
- ram_block3a_2.port_a_data_width = 1,
- ram_block3a_2.port_a_first_address = 0,
- ram_block3a_2.port_a_first_bit_number = 2,
- ram_block3a_2.port_a_last_address = 4095,
- ram_block3a_2.port_a_logical_ram_depth = 4096,
- ram_block3a_2.port_a_logical_ram_width = 16,
- ram_block3a_2.port_b_address_clear = "none",
- ram_block3a_2.port_b_address_clock = "clock1",
- ram_block3a_2.port_b_address_width = 12,
- ram_block3a_2.port_b_data_out_clear = "none",
- ram_block3a_2.port_b_data_out_clock = "none",
- ram_block3a_2.port_b_data_width = 1,
- ram_block3a_2.port_b_first_address = 0,
- ram_block3a_2.port_b_first_bit_number = 2,
- ram_block3a_2.port_b_last_address = 4095,
- ram_block3a_2.port_b_logical_ram_depth = 4096,
- ram_block3a_2.port_b_logical_ram_width = 16,
- ram_block3a_2.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_2.ram_block_type = "auto",
- ram_block3a_2.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_3
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[3]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_3portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_3.connectivity_checking = "OFF",
- ram_block3a_3.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_3.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_3.operation_mode = "dual_port",
- ram_block3a_3.port_a_address_width = 12,
- ram_block3a_3.port_a_data_width = 1,
- ram_block3a_3.port_a_first_address = 0,
- ram_block3a_3.port_a_first_bit_number = 3,
- ram_block3a_3.port_a_last_address = 4095,
- ram_block3a_3.port_a_logical_ram_depth = 4096,
- ram_block3a_3.port_a_logical_ram_width = 16,
- ram_block3a_3.port_b_address_clear = "none",
- ram_block3a_3.port_b_address_clock = "clock1",
- ram_block3a_3.port_b_address_width = 12,
- ram_block3a_3.port_b_data_out_clear = "none",
- ram_block3a_3.port_b_data_out_clock = "none",
- ram_block3a_3.port_b_data_width = 1,
- ram_block3a_3.port_b_first_address = 0,
- ram_block3a_3.port_b_first_bit_number = 3,
- ram_block3a_3.port_b_last_address = 4095,
- ram_block3a_3.port_b_logical_ram_depth = 4096,
- ram_block3a_3.port_b_logical_ram_width = 16,
- ram_block3a_3.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_3.ram_block_type = "auto",
- ram_block3a_3.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_4
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[4]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_4portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_4.connectivity_checking = "OFF",
- ram_block3a_4.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_4.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_4.operation_mode = "dual_port",
- ram_block3a_4.port_a_address_width = 12,
- ram_block3a_4.port_a_data_width = 1,
- ram_block3a_4.port_a_first_address = 0,
- ram_block3a_4.port_a_first_bit_number = 4,
- ram_block3a_4.port_a_last_address = 4095,
- ram_block3a_4.port_a_logical_ram_depth = 4096,
- ram_block3a_4.port_a_logical_ram_width = 16,
- ram_block3a_4.port_b_address_clear = "none",
- ram_block3a_4.port_b_address_clock = "clock1",
- ram_block3a_4.port_b_address_width = 12,
- ram_block3a_4.port_b_data_out_clear = "none",
- ram_block3a_4.port_b_data_out_clock = "none",
- ram_block3a_4.port_b_data_width = 1,
- ram_block3a_4.port_b_first_address = 0,
- ram_block3a_4.port_b_first_bit_number = 4,
- ram_block3a_4.port_b_last_address = 4095,
- ram_block3a_4.port_b_logical_ram_depth = 4096,
- ram_block3a_4.port_b_logical_ram_width = 16,
- ram_block3a_4.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_4.ram_block_type = "auto",
- ram_block3a_4.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_5
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[5]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_5portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_5.connectivity_checking = "OFF",
- ram_block3a_5.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_5.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_5.operation_mode = "dual_port",
- ram_block3a_5.port_a_address_width = 12,
- ram_block3a_5.port_a_data_width = 1,
- ram_block3a_5.port_a_first_address = 0,
- ram_block3a_5.port_a_first_bit_number = 5,
- ram_block3a_5.port_a_last_address = 4095,
- ram_block3a_5.port_a_logical_ram_depth = 4096,
- ram_block3a_5.port_a_logical_ram_width = 16,
- ram_block3a_5.port_b_address_clear = "none",
- ram_block3a_5.port_b_address_clock = "clock1",
- ram_block3a_5.port_b_address_width = 12,
- ram_block3a_5.port_b_data_out_clear = "none",
- ram_block3a_5.port_b_data_out_clock = "none",
- ram_block3a_5.port_b_data_width = 1,
- ram_block3a_5.port_b_first_address = 0,
- ram_block3a_5.port_b_first_bit_number = 5,
- ram_block3a_5.port_b_last_address = 4095,
- ram_block3a_5.port_b_logical_ram_depth = 4096,
- ram_block3a_5.port_b_logical_ram_width = 16,
- ram_block3a_5.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_5.ram_block_type = "auto",
- ram_block3a_5.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_6
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[6]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_6portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_6.connectivity_checking = "OFF",
- ram_block3a_6.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_6.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_6.operation_mode = "dual_port",
- ram_block3a_6.port_a_address_width = 12,
- ram_block3a_6.port_a_data_width = 1,
- ram_block3a_6.port_a_first_address = 0,
- ram_block3a_6.port_a_first_bit_number = 6,
- ram_block3a_6.port_a_last_address = 4095,
- ram_block3a_6.port_a_logical_ram_depth = 4096,
- ram_block3a_6.port_a_logical_ram_width = 16,
- ram_block3a_6.port_b_address_clear = "none",
- ram_block3a_6.port_b_address_clock = "clock1",
- ram_block3a_6.port_b_address_width = 12,
- ram_block3a_6.port_b_data_out_clear = "none",
- ram_block3a_6.port_b_data_out_clock = "none",
- ram_block3a_6.port_b_data_width = 1,
- ram_block3a_6.port_b_first_address = 0,
- ram_block3a_6.port_b_first_bit_number = 6,
- ram_block3a_6.port_b_last_address = 4095,
- ram_block3a_6.port_b_logical_ram_depth = 4096,
- ram_block3a_6.port_b_logical_ram_width = 16,
- ram_block3a_6.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_6.ram_block_type = "auto",
- ram_block3a_6.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_7
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[7]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_7portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_7.connectivity_checking = "OFF",
- ram_block3a_7.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_7.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_7.operation_mode = "dual_port",
- ram_block3a_7.port_a_address_width = 12,
- ram_block3a_7.port_a_data_width = 1,
- ram_block3a_7.port_a_first_address = 0,
- ram_block3a_7.port_a_first_bit_number = 7,
- ram_block3a_7.port_a_last_address = 4095,
- ram_block3a_7.port_a_logical_ram_depth = 4096,
- ram_block3a_7.port_a_logical_ram_width = 16,
- ram_block3a_7.port_b_address_clear = "none",
- ram_block3a_7.port_b_address_clock = "clock1",
- ram_block3a_7.port_b_address_width = 12,
- ram_block3a_7.port_b_data_out_clear = "none",
- ram_block3a_7.port_b_data_out_clock = "none",
- ram_block3a_7.port_b_data_width = 1,
- ram_block3a_7.port_b_first_address = 0,
- ram_block3a_7.port_b_first_bit_number = 7,
- ram_block3a_7.port_b_last_address = 4095,
- ram_block3a_7.port_b_logical_ram_depth = 4096,
- ram_block3a_7.port_b_logical_ram_width = 16,
- ram_block3a_7.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_7.ram_block_type = "auto",
- ram_block3a_7.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_8
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[8]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_8portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_8.connectivity_checking = "OFF",
- ram_block3a_8.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_8.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_8.operation_mode = "dual_port",
- ram_block3a_8.port_a_address_width = 12,
- ram_block3a_8.port_a_data_width = 1,
- ram_block3a_8.port_a_first_address = 0,
- ram_block3a_8.port_a_first_bit_number = 8,
- ram_block3a_8.port_a_last_address = 4095,
- ram_block3a_8.port_a_logical_ram_depth = 4096,
- ram_block3a_8.port_a_logical_ram_width = 16,
- ram_block3a_8.port_b_address_clear = "none",
- ram_block3a_8.port_b_address_clock = "clock1",
- ram_block3a_8.port_b_address_width = 12,
- ram_block3a_8.port_b_data_out_clear = "none",
- ram_block3a_8.port_b_data_out_clock = "none",
- ram_block3a_8.port_b_data_width = 1,
- ram_block3a_8.port_b_first_address = 0,
- ram_block3a_8.port_b_first_bit_number = 8,
- ram_block3a_8.port_b_last_address = 4095,
- ram_block3a_8.port_b_logical_ram_depth = 4096,
- ram_block3a_8.port_b_logical_ram_width = 16,
- ram_block3a_8.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_8.ram_block_type = "auto",
- ram_block3a_8.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_9
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[9]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_9portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_9.connectivity_checking = "OFF",
- ram_block3a_9.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_9.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_9.operation_mode = "dual_port",
- ram_block3a_9.port_a_address_width = 12,
- ram_block3a_9.port_a_data_width = 1,
- ram_block3a_9.port_a_first_address = 0,
- ram_block3a_9.port_a_first_bit_number = 9,
- ram_block3a_9.port_a_last_address = 4095,
- ram_block3a_9.port_a_logical_ram_depth = 4096,
- ram_block3a_9.port_a_logical_ram_width = 16,
- ram_block3a_9.port_b_address_clear = "none",
- ram_block3a_9.port_b_address_clock = "clock1",
- ram_block3a_9.port_b_address_width = 12,
- ram_block3a_9.port_b_data_out_clear = "none",
- ram_block3a_9.port_b_data_out_clock = "none",
- ram_block3a_9.port_b_data_width = 1,
- ram_block3a_9.port_b_first_address = 0,
- ram_block3a_9.port_b_first_bit_number = 9,
- ram_block3a_9.port_b_last_address = 4095,
- ram_block3a_9.port_b_logical_ram_depth = 4096,
- ram_block3a_9.port_b_logical_ram_width = 16,
- ram_block3a_9.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_9.ram_block_type = "auto",
- ram_block3a_9.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_10
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[10]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_10portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_10.connectivity_checking = "OFF",
- ram_block3a_10.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_10.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_10.operation_mode = "dual_port",
- ram_block3a_10.port_a_address_width = 12,
- ram_block3a_10.port_a_data_width = 1,
- ram_block3a_10.port_a_first_address = 0,
- ram_block3a_10.port_a_first_bit_number = 10,
- ram_block3a_10.port_a_last_address = 4095,
- ram_block3a_10.port_a_logical_ram_depth = 4096,
- ram_block3a_10.port_a_logical_ram_width = 16,
- ram_block3a_10.port_b_address_clear = "none",
- ram_block3a_10.port_b_address_clock = "clock1",
- ram_block3a_10.port_b_address_width = 12,
- ram_block3a_10.port_b_data_out_clear = "none",
- ram_block3a_10.port_b_data_out_clock = "none",
- ram_block3a_10.port_b_data_width = 1,
- ram_block3a_10.port_b_first_address = 0,
- ram_block3a_10.port_b_first_bit_number = 10,
- ram_block3a_10.port_b_last_address = 4095,
- ram_block3a_10.port_b_logical_ram_depth = 4096,
- ram_block3a_10.port_b_logical_ram_width = 16,
- ram_block3a_10.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_10.ram_block_type = "auto",
- ram_block3a_10.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_11
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[11]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_11portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_11.connectivity_checking = "OFF",
- ram_block3a_11.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_11.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_11.operation_mode = "dual_port",
- ram_block3a_11.port_a_address_width = 12,
- ram_block3a_11.port_a_data_width = 1,
- ram_block3a_11.port_a_first_address = 0,
- ram_block3a_11.port_a_first_bit_number = 11,
- ram_block3a_11.port_a_last_address = 4095,
- ram_block3a_11.port_a_logical_ram_depth = 4096,
- ram_block3a_11.port_a_logical_ram_width = 16,
- ram_block3a_11.port_b_address_clear = "none",
- ram_block3a_11.port_b_address_clock = "clock1",
- ram_block3a_11.port_b_address_width = 12,
- ram_block3a_11.port_b_data_out_clear = "none",
- ram_block3a_11.port_b_data_out_clock = "none",
- ram_block3a_11.port_b_data_width = 1,
- ram_block3a_11.port_b_first_address = 0,
- ram_block3a_11.port_b_first_bit_number = 11,
- ram_block3a_11.port_b_last_address = 4095,
- ram_block3a_11.port_b_logical_ram_depth = 4096,
- ram_block3a_11.port_b_logical_ram_width = 16,
- ram_block3a_11.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_11.ram_block_type = "auto",
- ram_block3a_11.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_12
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[12]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_12portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_12.connectivity_checking = "OFF",
- ram_block3a_12.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_12.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_12.operation_mode = "dual_port",
- ram_block3a_12.port_a_address_width = 12,
- ram_block3a_12.port_a_data_width = 1,
- ram_block3a_12.port_a_first_address = 0,
- ram_block3a_12.port_a_first_bit_number = 12,
- ram_block3a_12.port_a_last_address = 4095,
- ram_block3a_12.port_a_logical_ram_depth = 4096,
- ram_block3a_12.port_a_logical_ram_width = 16,
- ram_block3a_12.port_b_address_clear = "none",
- ram_block3a_12.port_b_address_clock = "clock1",
- ram_block3a_12.port_b_address_width = 12,
- ram_block3a_12.port_b_data_out_clear = "none",
- ram_block3a_12.port_b_data_out_clock = "none",
- ram_block3a_12.port_b_data_width = 1,
- ram_block3a_12.port_b_first_address = 0,
- ram_block3a_12.port_b_first_bit_number = 12,
- ram_block3a_12.port_b_last_address = 4095,
- ram_block3a_12.port_b_logical_ram_depth = 4096,
- ram_block3a_12.port_b_logical_ram_width = 16,
- ram_block3a_12.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_12.ram_block_type = "auto",
- ram_block3a_12.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_13
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[13]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_13portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_13.connectivity_checking = "OFF",
- ram_block3a_13.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_13.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_13.operation_mode = "dual_port",
- ram_block3a_13.port_a_address_width = 12,
- ram_block3a_13.port_a_data_width = 1,
- ram_block3a_13.port_a_first_address = 0,
- ram_block3a_13.port_a_first_bit_number = 13,
- ram_block3a_13.port_a_last_address = 4095,
- ram_block3a_13.port_a_logical_ram_depth = 4096,
- ram_block3a_13.port_a_logical_ram_width = 16,
- ram_block3a_13.port_b_address_clear = "none",
- ram_block3a_13.port_b_address_clock = "clock1",
- ram_block3a_13.port_b_address_width = 12,
- ram_block3a_13.port_b_data_out_clear = "none",
- ram_block3a_13.port_b_data_out_clock = "none",
- ram_block3a_13.port_b_data_width = 1,
- ram_block3a_13.port_b_first_address = 0,
- ram_block3a_13.port_b_first_bit_number = 13,
- ram_block3a_13.port_b_last_address = 4095,
- ram_block3a_13.port_b_logical_ram_depth = 4096,
- ram_block3a_13.port_b_logical_ram_width = 16,
- ram_block3a_13.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_13.ram_block_type = "auto",
- ram_block3a_13.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_14
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[14]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_14portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_14.connectivity_checking = "OFF",
- ram_block3a_14.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_14.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_14.operation_mode = "dual_port",
- ram_block3a_14.port_a_address_width = 12,
- ram_block3a_14.port_a_data_width = 1,
- ram_block3a_14.port_a_first_address = 0,
- ram_block3a_14.port_a_first_bit_number = 14,
- ram_block3a_14.port_a_last_address = 4095,
- ram_block3a_14.port_a_logical_ram_depth = 4096,
- ram_block3a_14.port_a_logical_ram_width = 16,
- ram_block3a_14.port_b_address_clear = "none",
- ram_block3a_14.port_b_address_clock = "clock1",
- ram_block3a_14.port_b_address_width = 12,
- ram_block3a_14.port_b_data_out_clear = "none",
- ram_block3a_14.port_b_data_out_clock = "none",
- ram_block3a_14.port_b_data_width = 1,
- ram_block3a_14.port_b_first_address = 0,
- ram_block3a_14.port_b_first_bit_number = 14,
- ram_block3a_14.port_b_last_address = 4095,
- ram_block3a_14.port_b_logical_ram_depth = 4096,
- ram_block3a_14.port_b_logical_ram_width = 16,
- ram_block3a_14.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_14.ram_block_type = "auto",
- ram_block3a_14.lpm_type = "cyclone_ram_block";
- cyclone_ram_block ram_block3a_15
- (
- .clk0(clock0),
- .clk1(clock1),
- .ena0(wren_a),
- .ena1(clocken1),
- .portaaddr({address_a_wire[11:0]}),
- .portadatain({data_a[15]}),
- .portadataout(),
- .portawe(1'b1),
- .portbaddr({address_b_wire[11:0]}),
- .portbdataout(wire_ram_block3a_15portbdataout[0:0]),
- .portbrewe(1'b1)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .clr0(1'b0),
- .clr1(1'b0),
- .portabyteenamasks(1'b1),
- .portbbyteenamasks(1'b1),
- .portbdatain(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- ram_block3a_15.connectivity_checking = "OFF",
- ram_block3a_15.logical_ram_name = "ALTSYNCRAM",
- ram_block3a_15.mixed_port_feed_through_mode = "dont_care",
- ram_block3a_15.operation_mode = "dual_port",
- ram_block3a_15.port_a_address_width = 12,
- ram_block3a_15.port_a_data_width = 1,
- ram_block3a_15.port_a_first_address = 0,
- ram_block3a_15.port_a_first_bit_number = 15,
- ram_block3a_15.port_a_last_address = 4095,
- ram_block3a_15.port_a_logical_ram_depth = 4096,
- ram_block3a_15.port_a_logical_ram_width = 16,
- ram_block3a_15.port_b_address_clear = "none",
- ram_block3a_15.port_b_address_clock = "clock1",
- ram_block3a_15.port_b_address_width = 12,
- ram_block3a_15.port_b_data_out_clear = "none",
- ram_block3a_15.port_b_data_out_clock = "none",
- ram_block3a_15.port_b_data_width = 1,
- ram_block3a_15.port_b_first_address = 0,
- ram_block3a_15.port_b_first_bit_number = 15,
- ram_block3a_15.port_b_last_address = 4095,
- ram_block3a_15.port_b_logical_ram_depth = 4096,
- ram_block3a_15.port_b_logical_ram_width = 16,
- ram_block3a_15.port_b_read_enable_write_enable_clock = "clock1",
- ram_block3a_15.ram_block_type = "auto",
- ram_block3a_15.lpm_type = "cyclone_ram_block";
- assign
- address_a_wire = address_a,
- address_b_wire = address_b,
- q_b = {wire_ram_block3a_15portbdataout[0], wire_ram_block3a_14portbdataout[0], wire_ram_block3a_13portbdataout[0], wire_ram_block3a_12portbdataout[0], wire_ram_block3a_11portbdataout[0], wire_ram_block3a_10portbdataout[0], wire_ram_block3a_9portbdataout[0], wire_ram_block3a_8portbdataout[0], wire_ram_block3a_7portbdataout[0], wire_ram_block3a_6portbdataout[0], wire_ram_block3a_5portbdataout[0], wire_ram_block3a_4portbdataout[0], wire_ram_block3a_3portbdataout[0], wire_ram_block3a_2portbdataout[0], wire_ram_block3a_1portbdataout[0], wire_ram_block3a_0portbdataout[0]};
-endmodule //fifo_4k_altsyncram_8pl
-
-
-//dffpipe DELAY=1 WIDTH=12 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_dffpipe_bb3
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF" */;
- input clock;
- input clrn;
- input [11:0] d;
- output [11:0] q;
-
- wire [11:0] wire_dffe4a_D;
- reg [11:0] dffe4a;
- wire ena;
- wire prn;
- wire sclr;
-
- // synopsys translate_off
- initial
- dffe4a[0:0] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[0:0] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[0:0] <= 1'b0;
- else if (ena == 1'b1) dffe4a[0:0] <= wire_dffe4a_D[0:0];
- // synopsys translate_off
- initial
- dffe4a[1:1] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[1:1] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[1:1] <= 1'b0;
- else if (ena == 1'b1) dffe4a[1:1] <= wire_dffe4a_D[1:1];
- // synopsys translate_off
- initial
- dffe4a[2:2] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[2:2] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[2:2] <= 1'b0;
- else if (ena == 1'b1) dffe4a[2:2] <= wire_dffe4a_D[2:2];
- // synopsys translate_off
- initial
- dffe4a[3:3] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[3:3] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[3:3] <= 1'b0;
- else if (ena == 1'b1) dffe4a[3:3] <= wire_dffe4a_D[3:3];
- // synopsys translate_off
- initial
- dffe4a[4:4] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[4:4] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[4:4] <= 1'b0;
- else if (ena == 1'b1) dffe4a[4:4] <= wire_dffe4a_D[4:4];
- // synopsys translate_off
- initial
- dffe4a[5:5] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[5:5] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[5:5] <= 1'b0;
- else if (ena == 1'b1) dffe4a[5:5] <= wire_dffe4a_D[5:5];
- // synopsys translate_off
- initial
- dffe4a[6:6] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[6:6] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[6:6] <= 1'b0;
- else if (ena == 1'b1) dffe4a[6:6] <= wire_dffe4a_D[6:6];
- // synopsys translate_off
- initial
- dffe4a[7:7] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[7:7] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[7:7] <= 1'b0;
- else if (ena == 1'b1) dffe4a[7:7] <= wire_dffe4a_D[7:7];
- // synopsys translate_off
- initial
- dffe4a[8:8] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[8:8] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[8:8] <= 1'b0;
- else if (ena == 1'b1) dffe4a[8:8] <= wire_dffe4a_D[8:8];
- // synopsys translate_off
- initial
- dffe4a[9:9] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[9:9] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[9:9] <= 1'b0;
- else if (ena == 1'b1) dffe4a[9:9] <= wire_dffe4a_D[9:9];
- // synopsys translate_off
- initial
- dffe4a[10:10] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[10:10] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[10:10] <= 1'b0;
- else if (ena == 1'b1) dffe4a[10:10] <= wire_dffe4a_D[10:10];
- // synopsys translate_off
- initial
- dffe4a[11:11] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe4a[11:11] <= 1'b1;
- else if (clrn == 1'b0) dffe4a[11:11] <= 1'b0;
- else if (ena == 1'b1) dffe4a[11:11] <= wire_dffe4a_D[11:11];
- assign
- wire_dffe4a_D = (d & {12{(~ sclr)}});
- assign
- ena = 1'b1,
- prn = 1'b1,
- q = dffe4a,
- sclr = 1'b0;
-endmodule //fifo_4k_dffpipe_bb3
-
-
-//dffpipe WIDTH=12 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_altdpram 2004:11:30:11:29:56:SJ cbx_altsyncram 2005:03:24:13:58:56:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_dcfifo 2005:03:07:17:11:14:SJ cbx_fifo_common 2004:12:13:14:26:24:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_lpm_counter 2005:02:02:04:37:10:SJ cbx_lpm_decode 2004:12:13:14:19:12:SJ cbx_lpm_mux 2004:12:13:14:16:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_scfifo 2005:03:10:10:52:20:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-
-//dffpipe WIDTH=12 clock clrn d q
-//VERSION_BEGIN 5.0 cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratixii 2004:12:22:13:27:12:SJ cbx_util_mgl 2005:04:04:13:50:06:SJ VERSION_END
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_dffpipe_em2
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF" */;
- input clock;
- input clrn;
- input [11:0] d;
- output [11:0] q;
-
- wire [11:0] wire_dffe6a_D;
- reg [11:0] dffe6a;
- wire ena;
- wire prn;
- wire sclr;
-
- // synopsys translate_off
- initial
- dffe6a[0:0] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[0:0] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[0:0] <= 1'b0;
- else if (ena == 1'b1) dffe6a[0:0] <= wire_dffe6a_D[0:0];
- // synopsys translate_off
- initial
- dffe6a[1:1] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[1:1] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[1:1] <= 1'b0;
- else if (ena == 1'b1) dffe6a[1:1] <= wire_dffe6a_D[1:1];
- // synopsys translate_off
- initial
- dffe6a[2:2] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[2:2] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[2:2] <= 1'b0;
- else if (ena == 1'b1) dffe6a[2:2] <= wire_dffe6a_D[2:2];
- // synopsys translate_off
- initial
- dffe6a[3:3] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[3:3] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[3:3] <= 1'b0;
- else if (ena == 1'b1) dffe6a[3:3] <= wire_dffe6a_D[3:3];
- // synopsys translate_off
- initial
- dffe6a[4:4] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[4:4] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[4:4] <= 1'b0;
- else if (ena == 1'b1) dffe6a[4:4] <= wire_dffe6a_D[4:4];
- // synopsys translate_off
- initial
- dffe6a[5:5] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[5:5] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[5:5] <= 1'b0;
- else if (ena == 1'b1) dffe6a[5:5] <= wire_dffe6a_D[5:5];
- // synopsys translate_off
- initial
- dffe6a[6:6] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[6:6] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[6:6] <= 1'b0;
- else if (ena == 1'b1) dffe6a[6:6] <= wire_dffe6a_D[6:6];
- // synopsys translate_off
- initial
- dffe6a[7:7] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[7:7] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[7:7] <= 1'b0;
- else if (ena == 1'b1) dffe6a[7:7] <= wire_dffe6a_D[7:7];
- // synopsys translate_off
- initial
- dffe6a[8:8] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[8:8] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[8:8] <= 1'b0;
- else if (ena == 1'b1) dffe6a[8:8] <= wire_dffe6a_D[8:8];
- // synopsys translate_off
- initial
- dffe6a[9:9] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[9:9] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[9:9] <= 1'b0;
- else if (ena == 1'b1) dffe6a[9:9] <= wire_dffe6a_D[9:9];
- // synopsys translate_off
- initial
- dffe6a[10:10] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[10:10] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[10:10] <= 1'b0;
- else if (ena == 1'b1) dffe6a[10:10] <= wire_dffe6a_D[10:10];
- // synopsys translate_off
- initial
- dffe6a[11:11] = 0;
- // synopsys translate_on
- always @ ( posedge clock or negedge prn or negedge clrn)
- if (prn == 1'b0) dffe6a[11:11] <= 1'b1;
- else if (clrn == 1'b0) dffe6a[11:11] <= 1'b0;
- else if (ena == 1'b1) dffe6a[11:11] <= wire_dffe6a_D[11:11];
- assign
- wire_dffe6a_D = (d & {12{(~ sclr)}});
- assign
- ena = 1'b1,
- prn = 1'b1,
- q = dffe6a,
- sclr = 1'b0;
-endmodule //fifo_4k_dffpipe_em2
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_alt_synch_pipe_em2
- (
- clock,
- clrn,
- d,
- q) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="X_ON_VIOLATION_OPTION=OFF" */;
- input clock;
- input clrn;
- input [11:0] d;
- output [11:0] q;
-
- wire [11:0] wire_dffpipe5_q;
-
- fifo_4k_dffpipe_em2 dffpipe5
- (
- .clock(clock),
- .clrn(clrn),
- .d(d),
- .q(wire_dffpipe5_q));
- assign
- q = wire_dffpipe5_q;
-endmodule //fifo_4k_alt_synch_pipe_em2
-
-
-//lpm_add_sub DEVICE_FAMILY="Cyclone" LPM_DIRECTION="SUB" LPM_WIDTH=12 dataa datab result
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 12
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_add_sub_b18
- (
- dataa,
- datab,
- result) /* synthesis synthesis_clearbox=1 */;
- input [11:0] dataa;
- input [11:0] datab;
- output [11:0] result;
-
- wire [11:0] wire_add_sub_cella_combout;
- wire [0:0] wire_add_sub_cella_0cout;
- wire [0:0] wire_add_sub_cella_1cout;
- wire [0:0] wire_add_sub_cella_2cout;
- wire [0:0] wire_add_sub_cella_3cout;
- wire [0:0] wire_add_sub_cella_4cout;
- wire [0:0] wire_add_sub_cella_5cout;
- wire [0:0] wire_add_sub_cella_6cout;
- wire [0:0] wire_add_sub_cella_7cout;
- wire [0:0] wire_add_sub_cella_8cout;
- wire [0:0] wire_add_sub_cella_9cout;
- wire [0:0] wire_add_sub_cella_10cout;
- wire [11:0] wire_add_sub_cella_dataa;
- wire [11:0] wire_add_sub_cella_datab;
-
- cyclone_lcell add_sub_cella_0
- (
- .cin(1'b1),
- .combout(wire_add_sub_cella_combout[0:0]),
- .cout(wire_add_sub_cella_0cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[0:0]),
- .datab(wire_add_sub_cella_datab[0:0]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_0.cin_used = "true",
- add_sub_cella_0.lut_mask = "69b2",
- add_sub_cella_0.operation_mode = "arithmetic",
- add_sub_cella_0.sum_lutc_input = "cin",
- add_sub_cella_0.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_1
- (
- .cin(wire_add_sub_cella_0cout[0:0]),
- .combout(wire_add_sub_cella_combout[1:1]),
- .cout(wire_add_sub_cella_1cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[1:1]),
- .datab(wire_add_sub_cella_datab[1:1]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_1.cin_used = "true",
- add_sub_cella_1.lut_mask = "69b2",
- add_sub_cella_1.operation_mode = "arithmetic",
- add_sub_cella_1.sum_lutc_input = "cin",
- add_sub_cella_1.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_2
- (
- .cin(wire_add_sub_cella_1cout[0:0]),
- .combout(wire_add_sub_cella_combout[2:2]),
- .cout(wire_add_sub_cella_2cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[2:2]),
- .datab(wire_add_sub_cella_datab[2:2]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_2.cin_used = "true",
- add_sub_cella_2.lut_mask = "69b2",
- add_sub_cella_2.operation_mode = "arithmetic",
- add_sub_cella_2.sum_lutc_input = "cin",
- add_sub_cella_2.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_3
- (
- .cin(wire_add_sub_cella_2cout[0:0]),
- .combout(wire_add_sub_cella_combout[3:3]),
- .cout(wire_add_sub_cella_3cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[3:3]),
- .datab(wire_add_sub_cella_datab[3:3]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_3.cin_used = "true",
- add_sub_cella_3.lut_mask = "69b2",
- add_sub_cella_3.operation_mode = "arithmetic",
- add_sub_cella_3.sum_lutc_input = "cin",
- add_sub_cella_3.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_4
- (
- .cin(wire_add_sub_cella_3cout[0:0]),
- .combout(wire_add_sub_cella_combout[4:4]),
- .cout(wire_add_sub_cella_4cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[4:4]),
- .datab(wire_add_sub_cella_datab[4:4]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_4.cin_used = "true",
- add_sub_cella_4.lut_mask = "69b2",
- add_sub_cella_4.operation_mode = "arithmetic",
- add_sub_cella_4.sum_lutc_input = "cin",
- add_sub_cella_4.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_5
- (
- .cin(wire_add_sub_cella_4cout[0:0]),
- .combout(wire_add_sub_cella_combout[5:5]),
- .cout(wire_add_sub_cella_5cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[5:5]),
- .datab(wire_add_sub_cella_datab[5:5]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_5.cin_used = "true",
- add_sub_cella_5.lut_mask = "69b2",
- add_sub_cella_5.operation_mode = "arithmetic",
- add_sub_cella_5.sum_lutc_input = "cin",
- add_sub_cella_5.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_6
- (
- .cin(wire_add_sub_cella_5cout[0:0]),
- .combout(wire_add_sub_cella_combout[6:6]),
- .cout(wire_add_sub_cella_6cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[6:6]),
- .datab(wire_add_sub_cella_datab[6:6]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_6.cin_used = "true",
- add_sub_cella_6.lut_mask = "69b2",
- add_sub_cella_6.operation_mode = "arithmetic",
- add_sub_cella_6.sum_lutc_input = "cin",
- add_sub_cella_6.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_7
- (
- .cin(wire_add_sub_cella_6cout[0:0]),
- .combout(wire_add_sub_cella_combout[7:7]),
- .cout(wire_add_sub_cella_7cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[7:7]),
- .datab(wire_add_sub_cella_datab[7:7]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_7.cin_used = "true",
- add_sub_cella_7.lut_mask = "69b2",
- add_sub_cella_7.operation_mode = "arithmetic",
- add_sub_cella_7.sum_lutc_input = "cin",
- add_sub_cella_7.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_8
- (
- .cin(wire_add_sub_cella_7cout[0:0]),
- .combout(wire_add_sub_cella_combout[8:8]),
- .cout(wire_add_sub_cella_8cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[8:8]),
- .datab(wire_add_sub_cella_datab[8:8]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_8.cin_used = "true",
- add_sub_cella_8.lut_mask = "69b2",
- add_sub_cella_8.operation_mode = "arithmetic",
- add_sub_cella_8.sum_lutc_input = "cin",
- add_sub_cella_8.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_9
- (
- .cin(wire_add_sub_cella_8cout[0:0]),
- .combout(wire_add_sub_cella_combout[9:9]),
- .cout(wire_add_sub_cella_9cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[9:9]),
- .datab(wire_add_sub_cella_datab[9:9]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_9.cin_used = "true",
- add_sub_cella_9.lut_mask = "69b2",
- add_sub_cella_9.operation_mode = "arithmetic",
- add_sub_cella_9.sum_lutc_input = "cin",
- add_sub_cella_9.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_10
- (
- .cin(wire_add_sub_cella_9cout[0:0]),
- .combout(wire_add_sub_cella_combout[10:10]),
- .cout(wire_add_sub_cella_10cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[10:10]),
- .datab(wire_add_sub_cella_datab[10:10]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_10.cin_used = "true",
- add_sub_cella_10.lut_mask = "69b2",
- add_sub_cella_10.operation_mode = "arithmetic",
- add_sub_cella_10.sum_lutc_input = "cin",
- add_sub_cella_10.lpm_type = "cyclone_lcell";
- cyclone_lcell add_sub_cella_11
- (
- .cin(wire_add_sub_cella_10cout[0:0]),
- .combout(wire_add_sub_cella_combout[11:11]),
- .cout(),
- .dataa(wire_add_sub_cella_dataa[11:11]),
- .datab(wire_add_sub_cella_datab[11:11]),
- .regout()
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_off
- `endif
- ,
- .aclr(1'b0),
- .aload(1'b0),
- .clk(1'b1),
- .datac(1'b1),
- .datad(1'b1),
- .ena(1'b1),
- .inverta(1'b0),
- .regcascin(1'b0),
- .sclr(1'b0),
- .sload(1'b0)
- `ifdef FORMAL_VERIFICATION
- `else
- // synopsys translate_on
- `endif
- // synopsys translate_off
- ,
- .cin0(),
- .cin1(),
- .cout0(),
- .cout1(),
- .devclrn(),
- .devpor()
- // synopsys translate_on
- );
- defparam
- add_sub_cella_11.cin_used = "true",
- add_sub_cella_11.lut_mask = "6969",
- add_sub_cella_11.operation_mode = "normal",
- add_sub_cella_11.sum_lutc_input = "cin",
- add_sub_cella_11.lpm_type = "cyclone_lcell";
- assign
- wire_add_sub_cella_dataa = dataa,
- wire_add_sub_cella_datab = datab;
- assign
- result = wire_add_sub_cella_combout;
-endmodule //fifo_4k_add_sub_b18
-
-
-//lpm_compare DEVICE_FAMILY="Cyclone" LPM_WIDTH=12 aeb dataa datab
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-
-//lpm_compare DEVICE_FAMILY="Cyclone" LPM_WIDTH=12 aeb dataa datab
-//VERSION_BEGIN 5.0 cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_lpm_add_sub 2005:04:12:13:30:42:SJ cbx_lpm_compare 2004:11:30:11:30:40:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:06:02:09:53:04:SJ cbx_stratixii 2004:12:22:13:27:12:SJ VERSION_END
-
-//synthesis_resources = lut 104 M4K 16
-//synopsys translate_off
-`timescale 1 ps / 1 ps
-//synopsys translate_on
-module fifo_4k_dcfifo_6cq
- (
- aclr,
- data,
- q,
- rdclk,
- rdempty,
- rdreq,
- rdusedw,
- wrclk,
- wrfull,
- wrreq,
- wrusedw) /* synthesis synthesis_clearbox=1 */
- /* synthesis ALTERA_ATTRIBUTE="AUTO_SHIFT_REGISTER_RECOGNITION=OFF;{ -from \"rdptr_g|power_modified_counter_values\" -to \"ws_dgrp|dffpipe5|dffe6a\" }CUT=ON;{ -from \"delayed_wrptr_g\" -to \"rs_dgwp|dffpipe5|dffe6a\" }CUT=ON" */;
- input aclr;
- input [15:0] data;
- output [15:0] q;
- input rdclk;
- output rdempty;
- input rdreq;
- output [11:0] rdusedw;
- input wrclk;
- output wrfull;
- input wrreq;
- output [11:0] wrusedw;
-
- wire [11:0] wire_rdptr_g_gray2bin_bin;
- wire [11:0] wire_rs_dgwp_gray2bin_bin;
- wire [11:0] wire_wrptr_g_gray2bin_bin;
- wire [11:0] wire_ws_dgrp_gray2bin_bin;
- wire [11:0] wire_rdptr_g_q;
- wire [11:0] wire_rdptr_g1p_q;
- wire [11:0] wire_wrptr_g1p_q;
- wire [15:0] wire_fifo_ram_q_b;
- reg [11:0] delayed_wrptr_g;
- reg [11:0] wrptr_g;
- wire [11:0] wire_rs_brp_q;
- wire [11:0] wire_rs_bwp_q;
- wire [11:0] wire_rs_dgwp_q;
- wire [11:0] wire_ws_brp_q;
- wire [11:0] wire_ws_bwp_q;
- wire [11:0] wire_ws_dgrp_q;
- wire [11:0] wire_rdusedw_sub_result;
- wire [11:0] wire_wrusedw_sub_result;
- reg wire_rdempty_eq_comp_aeb_int;
- wire wire_rdempty_eq_comp_aeb;
- wire [11:0] wire_rdempty_eq_comp_dataa;
- wire [11:0] wire_rdempty_eq_comp_datab;
- reg wire_wrfull_eq_comp_aeb_int;
- wire wire_wrfull_eq_comp_aeb;
- wire [11:0] wire_wrfull_eq_comp_dataa;
- wire [11:0] wire_wrfull_eq_comp_datab;
- wire int_rdempty;
- wire int_wrfull;
- wire valid_rdreq;
- wire valid_wrreq;
-
- fifo_4k_a_gray2bin_9m4 rdptr_g_gray2bin
- (
- .bin(wire_rdptr_g_gray2bin_bin),
- .gray(wire_rdptr_g_q));
- fifo_4k_a_gray2bin_9m4 rs_dgwp_gray2bin
- (
- .bin(wire_rs_dgwp_gray2bin_bin),
- .gray(wire_rs_dgwp_q));
- fifo_4k_a_gray2bin_9m4 wrptr_g_gray2bin
- (
- .bin(wire_wrptr_g_gray2bin_bin),
- .gray(wrptr_g));
- fifo_4k_a_gray2bin_9m4 ws_dgrp_gray2bin
- (
- .bin(wire_ws_dgrp_gray2bin_bin),
- .gray(wire_ws_dgrp_q));
- fifo_4k_a_graycounter_826 rdptr_g
- (
- .aclr(aclr),
- .clock(rdclk),
- .cnt_en(valid_rdreq),
- .q(wire_rdptr_g_q));
- fifo_4k_a_graycounter_3r6 rdptr_g1p
- (
- .aclr(aclr),
- .clock(rdclk),
- .cnt_en(valid_rdreq),
- .q(wire_rdptr_g1p_q));
- fifo_4k_a_graycounter_3r6 wrptr_g1p
- (
- .aclr(aclr),
- .clock(wrclk),
- .cnt_en(valid_wrreq),
- .q(wire_wrptr_g1p_q));
- fifo_4k_altsyncram_8pl fifo_ram
- (
- .address_a(wrptr_g),
- .address_b(((wire_rdptr_g_q & {12{int_rdempty}}) | (wire_rdptr_g1p_q & {12{(~ int_rdempty)}}))),
- .clock0(wrclk),
- .clock1(rdclk),
- .clocken1((valid_rdreq | int_rdempty)),
- .data_a(data),
- .q_b(wire_fifo_ram_q_b),
- .wren_a(valid_wrreq));
- // synopsys translate_off
- initial
- delayed_wrptr_g = 0;
- // synopsys translate_on
- always @ ( posedge wrclk or posedge aclr)
- if (aclr == 1'b1) delayed_wrptr_g <= 12'b0;
- else delayed_wrptr_g <= wrptr_g;
- // synopsys translate_off
- initial
- wrptr_g = 0;
- // synopsys translate_on
- always @ ( posedge wrclk or posedge aclr)
- if (aclr == 1'b1) wrptr_g <= 12'b0;
- else if (valid_wrreq == 1'b1) wrptr_g <= wire_wrptr_g1p_q;
- fifo_4k_dffpipe_bb3 rs_brp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(wire_rdptr_g_gray2bin_bin),
- .q(wire_rs_brp_q));
- fifo_4k_dffpipe_bb3 rs_bwp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(wire_rs_dgwp_gray2bin_bin),
- .q(wire_rs_bwp_q));
- fifo_4k_alt_synch_pipe_em2 rs_dgwp
- (
- .clock(rdclk),
- .clrn((~ aclr)),
- .d(delayed_wrptr_g),
- .q(wire_rs_dgwp_q));
- fifo_4k_dffpipe_bb3 ws_brp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_ws_dgrp_gray2bin_bin),
- .q(wire_ws_brp_q));
- fifo_4k_dffpipe_bb3 ws_bwp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_wrptr_g_gray2bin_bin),
- .q(wire_ws_bwp_q));
- fifo_4k_alt_synch_pipe_em2 ws_dgrp
- (
- .clock(wrclk),
- .clrn((~ aclr)),
- .d(wire_rdptr_g_q),
- .q(wire_ws_dgrp_q));
- fifo_4k_add_sub_b18 rdusedw_sub
- (
- .dataa(wire_rs_bwp_q),
- .datab(wire_rs_brp_q),
- .result(wire_rdusedw_sub_result));
- fifo_4k_add_sub_b18 wrusedw_sub
- (
- .dataa(wire_ws_bwp_q),
- .datab(wire_ws_brp_q),
- .result(wire_wrusedw_sub_result));
- always @(wire_rdempty_eq_comp_dataa or wire_rdempty_eq_comp_datab)
- if (wire_rdempty_eq_comp_dataa == wire_rdempty_eq_comp_datab)
- begin
- wire_rdempty_eq_comp_aeb_int = 1'b1;
- end
- else
- begin
- wire_rdempty_eq_comp_aeb_int = 1'b0;
- end
- assign
- wire_rdempty_eq_comp_aeb = wire_rdempty_eq_comp_aeb_int;
- assign
- wire_rdempty_eq_comp_dataa = wire_rs_dgwp_q,
- wire_rdempty_eq_comp_datab = wire_rdptr_g_q;
- always @(wire_wrfull_eq_comp_dataa or wire_wrfull_eq_comp_datab)
- if (wire_wrfull_eq_comp_dataa == wire_wrfull_eq_comp_datab)
- begin
- wire_wrfull_eq_comp_aeb_int = 1'b1;
- end
- else
- begin
- wire_wrfull_eq_comp_aeb_int = 1'b0;
- end
- assign
- wire_wrfull_eq_comp_aeb = wire_wrfull_eq_comp_aeb_int;
- assign
- wire_wrfull_eq_comp_dataa = wire_ws_dgrp_q,
- wire_wrfull_eq_comp_datab = wire_wrptr_g1p_q;
- assign
- int_rdempty = wire_rdempty_eq_comp_aeb,
- int_wrfull = wire_wrfull_eq_comp_aeb,
- q = wire_fifo_ram_q_b,
- rdempty = int_rdempty,
- rdusedw = wire_rdusedw_sub_result,
- valid_rdreq = rdreq,
- valid_wrreq = wrreq,
- wrfull = int_wrfull,
- wrusedw = wire_wrusedw_sub_result;
-endmodule //fifo_4k_dcfifo_6cq
-//VALID FILE
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module fifo_4k (
- data,
- wrreq,
- rdreq,
- rdclk,
- wrclk,
- aclr,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw)/* synthesis synthesis_clearbox = 1 */;
-
- input [15:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [15:0] q;
- output rdempty;
- output [11:0] rdusedw;
- output wrfull;
- output [11:0] wrusedw;
-
- wire sub_wire0;
- wire [11:0] sub_wire1;
- wire sub_wire2;
- wire [15:0] sub_wire3;
- wire [11:0] sub_wire4;
- wire rdempty = sub_wire0;
- wire [11:0] wrusedw = sub_wire1[11:0];
- wire wrfull = sub_wire2;
- wire [15:0] q = sub_wire3[15:0];
- wire [11:0] rdusedw = sub_wire4[11:0];
-
- fifo_4k_dcfifo_6cq fifo_4k_dcfifo_6cq_component (
- .wrclk (wrclk),
- .rdreq (rdreq),
- .aclr (aclr),
- .rdclk (rdclk),
- .wrreq (wrreq),
- .data (data),
- .rdempty (sub_wire0),
- .wrusedw (sub_wire1),
- .wrfull (sub_wire2),
- .q (sub_wire3),
- .rdusedw (sub_wire4));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: Depth NUMERIC "4096"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "4096"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "12"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdusedw 0 0 12 0 OUTPUT NODEFVAL rdusedw[11..0]
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrusedw 0 0 12 0 OUTPUT NODEFVAL wrusedw[11..0]
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 12 0 @rdusedw 0 0 12 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 12 0 @wrusedw 0 0 12 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.inc FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.cmp FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.bsf FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_inst.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_waveforms.html TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_4k_18.v b/usrp/fpga/megacells/fifo_4k_18.v
deleted file mode 100755
index ad76121bb..000000000
--- a/usrp/fpga/megacells/fifo_4k_18.v
+++ /dev/null
@@ -1,186 +0,0 @@
-// megafunction wizard: %FIFO%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_4k_18.v
-// Megafunction Name(s):
-// dcfifo
-//
-// Simulation Library Files(s):
-// altera_mf
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 7.1 Build 178 06/25/2007 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2007 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files from any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module fifo_4k_18 (
- aclr,
- data,
- rdclk,
- rdreq,
- wrclk,
- wrreq,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw);
-
- input aclr;
- input [17:0] data;
- input rdclk;
- input rdreq;
- input wrclk;
- input wrreq;
- output [17:0] q;
- output rdempty;
- output [11:0] rdusedw;
- output wrfull;
- output [11:0] wrusedw;
-
- wire sub_wire0;
- wire [11:0] sub_wire1;
- wire sub_wire2;
- wire [17:0] sub_wire3;
- wire [11:0] sub_wire4;
- wire rdempty = sub_wire0;
- wire [11:0] wrusedw = sub_wire1[11:0];
- wire wrfull = sub_wire2;
- wire [17:0] q = sub_wire3[17:0];
- wire [11:0] rdusedw = sub_wire4[11:0];
-
- dcfifo dcfifo_component (
- .wrclk (wrclk),
- .rdreq (rdreq),
- .aclr (aclr),
- .rdclk (rdclk),
- .wrreq (wrreq),
- .data (data),
- .rdempty (sub_wire0),
- .wrusedw (sub_wire1),
- .wrfull (sub_wire2),
- .q (sub_wire3),
- .rdusedw (sub_wire4)
- // synopsys translate_off
- ,
- .rdfull (),
- .wrempty ()
- // synopsys translate_on
- );
- defparam
- dcfifo_component.add_ram_output_register = "OFF",
- dcfifo_component.clocks_are_synchronized = "FALSE",
- dcfifo_component.intended_device_family = "Cyclone",
- dcfifo_component.lpm_numwords = 4096,
- dcfifo_component.lpm_showahead = "ON",
- dcfifo_component.lpm_type = "dcfifo",
- dcfifo_component.lpm_width = 18,
- dcfifo_component.lpm_widthu = 12,
- dcfifo_component.overflow_checking = "OFF",
- dcfifo_component.underflow_checking = "OFF",
- dcfifo_component.use_eab = "ON";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: Depth NUMERIC "4096"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: Width NUMERIC "18"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: diff_widths NUMERIC "0"
-// Retrieval info: PRIVATE: msb_usedw NUMERIC "0"
-// Retrieval info: PRIVATE: output_width NUMERIC "18"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "4096"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "18"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "12"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: USED_PORT: data 0 0 18 0 INPUT NODEFVAL data[17..0]
-// Retrieval info: USED_PORT: q 0 0 18 0 OUTPUT NODEFVAL q[17..0]
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdusedw 0 0 12 0 OUTPUT NODEFVAL rdusedw[11..0]
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: wrusedw 0 0 12 0 OUTPUT NODEFVAL wrusedw[11..0]
-// Retrieval info: CONNECT: @data 0 0 18 0 data 0 0 18 0
-// Retrieval info: CONNECT: q 0 0 18 0 @q 0 0 18 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 12 0 @rdusedw 0 0 12 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 12 0 @wrusedw 0 0 12 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18.inc FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18.cmp FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18.bsf FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18_inst.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18_bb.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18_waveforms.html FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_18_wave*.jpg FALSE
-// Retrieval info: LIB_FILE: altera_mf
diff --git a/usrp/fpga/megacells/fifo_4k_bb.v b/usrp/fpga/megacells/fifo_4k_bb.v
deleted file mode 100644
index fc4ca9797..000000000
--- a/usrp/fpga/megacells/fifo_4k_bb.v
+++ /dev/null
@@ -1,131 +0,0 @@
-// megafunction wizard: %FIFO%VBB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_4k.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.0 Build 168 06/22/2005 SP 1 SJ Web Edition
-// ************************************************************
-
-//Copyright (C) 1991-2005 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-module fifo_4k (
- data,
- wrreq,
- rdreq,
- rdclk,
- wrclk,
- aclr,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw)/* synthesis synthesis_clearbox = 1 */;
-
- input [15:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [15:0] q;
- output rdempty;
- output [11:0] rdusedw;
- output wrfull;
- output [11:0] wrusedw;
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: Depth NUMERIC "4096"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "4096"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "12"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdusedw 0 0 12 0 OUTPUT NODEFVAL rdusedw[11..0]
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrusedw 0 0 12 0 OUTPUT NODEFVAL wrusedw[11..0]
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 12 0 @rdusedw 0 0 12 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 12 0 @wrusedw 0 0 12 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.inc FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.cmp FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k.bsf FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_inst.v FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_waveforms.html TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4k_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc.bsf b/usrp/fpga/megacells/fifo_4kx16_dc.bsf
deleted file mode 100755
index b80add8de..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc.bsf
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2006 Altera Corporation
-Your use of Altera Corporation's design tools, logic functions
-and other software and tools, and its AMPP partner logic
-functions, and any output files any of the foregoing
-(including device programming or simulation files), and any
-associated documentation or information are expressly subject
-to the terms and conditions of the Altera Program License
-Subscription Agreement, Altera MegaCore Function License
-Agreement, or other applicable license agreement, including,
-without limitation, that your use is for the sole purpose of
-programming logic devices manufactured by Altera and sold by
-Altera or its authorized distributors. Please refer to the
-applicable agreement for further details.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 184)
- (text "fifo_4kx16_dc" (rect 41 1 134 17)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 168 25 180)(font "Arial" ))
- (port
- (pt 0 32)
- (input)
- (text "data[15..0]" (rect 0 0 60 14)(font "Arial" (font_size 8)))
- (text "data[15..0]" (rect 20 26 71 39)(font "Arial" (font_size 8)))
- (line (pt 0 32)(pt 16 32)(line_width 3))
- )
- (port
- (pt 0 56)
- (input)
- (text "wrreq" (rect 0 0 35 14)(font "Arial" (font_size 8)))
- (text "wrreq" (rect 20 50 45 63)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 16 56)(line_width 1))
- )
- (port
- (pt 0 72)
- (input)
- (text "wrclk" (rect 0 0 31 14)(font "Arial" (font_size 8)))
- (text "wrclk" (rect 26 66 48 79)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 16 72)(line_width 1))
- )
- (port
- (pt 0 104)
- (input)
- (text "rdreq" (rect 0 0 30 14)(font "Arial" (font_size 8)))
- (text "rdreq" (rect 20 98 44 111)(font "Arial" (font_size 8)))
- (line (pt 0 104)(pt 16 104)(line_width 1))
- )
- (port
- (pt 0 120)
- (input)
- (text "rdclk" (rect 0 0 27 14)(font "Arial" (font_size 8)))
- (text "rdclk" (rect 26 114 47 127)(font "Arial" (font_size 8)))
- (line (pt 0 120)(pt 16 120)(line_width 1))
- )
- (port
- (pt 0 160)
- (input)
- (text "aclr" (rect 0 0 21 14)(font "Arial" (font_size 8)))
- (text "aclr" (rect 20 154 37 167)(font "Arial" (font_size 8)))
- (line (pt 0 160)(pt 16 160)(line_width 1))
- )
- (port
- (pt 160 40)
- (output)
- (text "wrfull" (rect 0 0 33 14)(font "Arial" (font_size 8)))
- (text "wrfull" (rect 113 34 138 47)(font "Arial" (font_size 8)))
- (line (pt 160 40)(pt 144 40)(line_width 1))
- )
- (port
- (pt 160 72)
- (output)
- (text "wrusedw[11..0]" (rect 0 0 92 14)(font "Arial" (font_size 8)))
- (text "wrusedw[11..0]" (rect 63 66 132 79)(font "Arial" (font_size 8)))
- (line (pt 160 72)(pt 144 72)(line_width 3))
- )
- (port
- (pt 160 96)
- (output)
- (text "q[15..0]" (rect 0 0 42 14)(font "Arial" (font_size 8)))
- (text "q[15..0]" (rect 105 90 141 103)(font "Arial" (font_size 8)))
- (line (pt 160 96)(pt 144 96)(line_width 3))
- )
- (port
- (pt 160 120)
- (output)
- (text "rdempty" (rect 0 0 46 14)(font "Arial" (font_size 8)))
- (text "rdempty" (rect 102 114 140 127)(font "Arial" (font_size 8)))
- (line (pt 160 120)(pt 144 120)(line_width 1))
- )
- (port
- (pt 160 136)
- (output)
- (text "rdusedw[11..0]" (rect 0 0 87 14)(font "Arial" (font_size 8)))
- (text "rdusedw[11..0]" (rect 67 130 135 143)(font "Arial" (font_size 8)))
- (line (pt 160 136)(pt 144 136)(line_width 3))
- )
- (drawing
- (text "(ack)" (rect 51 99 72 111)(font "Arial" ))
- (text "16 bits x 4096 words" (rect 58 156 144 168)(font "Arial" ))
- (line (pt 16 16)(pt 144 16)(line_width 1))
- (line (pt 144 16)(pt 144 168)(line_width 1))
- (line (pt 144 168)(pt 16 168)(line_width 1))
- (line (pt 16 168)(pt 16 16)(line_width 1))
- (line (pt 16 84)(pt 144 84)(line_width 1))
- (line (pt 16 148)(pt 144 148)(line_width 1))
- (line (pt 16 66)(pt 22 72)(line_width 1))
- (line (pt 22 72)(pt 16 78)(line_width 1))
- (line (pt 16 114)(pt 22 120)(line_width 1))
- (line (pt 22 120)(pt 16 126)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc.cmp b/usrp/fpga/megacells/fifo_4kx16_dc.cmp
deleted file mode 100755
index 356de4d62..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc.cmp
+++ /dev/null
@@ -1,31 +0,0 @@
---Copyright (C) 1991-2006 Altera Corporation
---Your use of Altera Corporation's design tools, logic functions
---and other software and tools, and its AMPP partner logic
---functions, and any output files any of the foregoing
---(including device programming or simulation files), and any
---associated documentation or information are expressly subject
---to the terms and conditions of the Altera Program License
---Subscription Agreement, Altera MegaCore Function License
---Agreement, or other applicable license agreement, including,
---without limitation, that your use is for the sole purpose of
---programming logic devices manufactured by Altera and sold by
---Altera or its authorized distributors. Please refer to the
---applicable agreement for further details.
-
-
-component fifo_4kx16_dc
- PORT
- (
- aclr : IN STD_LOGIC := '0';
- data : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- rdclk : IN STD_LOGIC ;
- rdreq : IN STD_LOGIC ;
- wrclk : IN STD_LOGIC ;
- wrreq : IN STD_LOGIC ;
- q : OUT STD_LOGIC_VECTOR (15 DOWNTO 0);
- rdempty : OUT STD_LOGIC ;
- rdusedw : OUT STD_LOGIC_VECTOR (11 DOWNTO 0);
- wrfull : OUT STD_LOGIC ;
- wrusedw : OUT STD_LOGIC_VECTOR (11 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc.inc b/usrp/fpga/megacells/fifo_4kx16_dc.inc
deleted file mode 100755
index c14c01836..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc.inc
+++ /dev/null
@@ -1,32 +0,0 @@
---Copyright (C) 1991-2006 Altera Corporation
---Your use of Altera Corporation's design tools, logic functions
---and other software and tools, and its AMPP partner logic
---functions, and any output files any of the foregoing
---(including device programming or simulation files), and any
---associated documentation or information are expressly subject
---to the terms and conditions of the Altera Program License
---Subscription Agreement, Altera MegaCore Function License
---Agreement, or other applicable license agreement, including,
---without limitation, that your use is for the sole purpose of
---programming logic devices manufactured by Altera and sold by
---Altera or its authorized distributors. Please refer to the
---applicable agreement for further details.
-
-
-FUNCTION fifo_4kx16_dc
-(
- aclr,
- data[15..0],
- rdclk,
- rdreq,
- wrclk,
- wrreq
-)
-
-RETURNS (
- q[15..0],
- rdempty,
- rdusedw[11..0],
- wrfull,
- wrusedw[11..0]
-);
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc.v b/usrp/fpga/megacells/fifo_4kx16_dc.v
deleted file mode 100755
index 1f09000e3..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc.v
+++ /dev/null
@@ -1,178 +0,0 @@
-// megafunction wizard: %FIFO%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_4kx16_dc.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.1 Build 213 01/19/2006 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2006 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module fifo_4kx16_dc (
- aclr,
- data,
- rdclk,
- rdreq,
- wrclk,
- wrreq,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw);
-
- input aclr;
- input [15:0] data;
- input rdclk;
- input rdreq;
- input wrclk;
- input wrreq;
- output [15:0] q;
- output rdempty;
- output [11:0] rdusedw;
- output wrfull;
- output [11:0] wrusedw;
-
- wire sub_wire0;
- wire [11:0] sub_wire1;
- wire sub_wire2;
- wire [15:0] sub_wire3;
- wire [11:0] sub_wire4;
- wire rdempty = sub_wire0;
- wire [11:0] wrusedw = sub_wire1[11:0];
- wire wrfull = sub_wire2;
- wire [15:0] q = sub_wire3[15:0];
- wire [11:0] rdusedw = sub_wire4[11:0];
-
- dcfifo dcfifo_component (
- .wrclk (wrclk),
- .rdreq (rdreq),
- .aclr (aclr),
- .rdclk (rdclk),
- .wrreq (wrreq),
- .data (data),
- .rdempty (sub_wire0),
- .wrusedw (sub_wire1),
- .wrfull (sub_wire2),
- .q (sub_wire3),
- .rdusedw (sub_wire4)
- // synopsys translate_off
- ,
- .wrempty (),
- .rdfull ()
- // synopsys translate_on
- );
- defparam
- dcfifo_component.add_ram_output_register = "OFF",
- dcfifo_component.clocks_are_synchronized = "FALSE",
- dcfifo_component.intended_device_family = "Cyclone",
- dcfifo_component.lpm_numwords = 4096,
- dcfifo_component.lpm_showahead = "ON",
- dcfifo_component.lpm_type = "dcfifo",
- dcfifo_component.lpm_width = 16,
- dcfifo_component.lpm_widthu = 12,
- dcfifo_component.overflow_checking = "OFF",
- dcfifo_component.underflow_checking = "OFF",
- dcfifo_component.use_eab = "ON";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: Depth NUMERIC "4096"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "4096"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "12"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdusedw 0 0 12 0 OUTPUT NODEFVAL rdusedw[11..0]
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: wrusedw 0 0 12 0 OUTPUT NODEFVAL wrusedw[11..0]
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 12 0 @rdusedw 0 0 12 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 12 0 @wrusedw 0 0 12 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.inc TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.cmp TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.bsf TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_inst.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_waveforms.html FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc_bb.v b/usrp/fpga/megacells/fifo_4kx16_dc_bb.v
deleted file mode 100755
index 91c3c322f..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc_bb.v
+++ /dev/null
@@ -1,130 +0,0 @@
-// megafunction wizard: %FIFO%VBB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: dcfifo
-
-// ============================================================
-// File Name: fifo_4kx16_dc.v
-// Megafunction Name(s):
-// dcfifo
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 5.1 Build 213 01/19/2006 SP 1 SJ Web Edition
-// ************************************************************
-
-//Copyright (C) 1991-2006 Altera Corporation
-//Your use of Altera Corporation's design tools, logic functions
-//and other software and tools, and its AMPP partner logic
-//functions, and any output files any of the foregoing
-//(including device programming or simulation files), and any
-//associated documentation or information are expressly subject
-//to the terms and conditions of the Altera Program License
-//Subscription Agreement, Altera MegaCore Function License
-//Agreement, or other applicable license agreement, including,
-//without limitation, that your use is for the sole purpose of
-//programming logic devices manufactured by Altera and sold by
-//Altera or its authorized distributors. Please refer to the
-//applicable agreement for further details.
-
-module fifo_4kx16_dc (
- aclr,
- data,
- rdclk,
- rdreq,
- wrclk,
- wrreq,
- q,
- rdempty,
- rdusedw,
- wrfull,
- wrusedw);
-
- input aclr;
- input [15:0] data;
- input rdclk;
- input rdreq;
- input wrclk;
- input wrreq;
- output [15:0] q;
- output rdempty;
- output [11:0] rdusedw;
- output wrfull;
- output [11:0] wrusedw;
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: AlmostEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostEmptyThr NUMERIC "-1"
-// Retrieval info: PRIVATE: AlmostFull NUMERIC "0"
-// Retrieval info: PRIVATE: AlmostFullThr NUMERIC "-1"
-// Retrieval info: PRIVATE: CLOCKS_ARE_SYNCHRONIZED NUMERIC "0"
-// Retrieval info: PRIVATE: Clock NUMERIC "4"
-// Retrieval info: PRIVATE: Depth NUMERIC "4096"
-// Retrieval info: PRIVATE: Empty NUMERIC "1"
-// Retrieval info: PRIVATE: Full NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LE_BasedFIFO NUMERIC "0"
-// Retrieval info: PRIVATE: LegacyRREQ NUMERIC "0"
-// Retrieval info: PRIVATE: MAX_DEPTH_BY_9 NUMERIC "0"
-// Retrieval info: PRIVATE: OVERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: Optimize NUMERIC "2"
-// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
-// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "1"
-// Retrieval info: PRIVATE: UsedW NUMERIC "1"
-// Retrieval info: PRIVATE: Width NUMERIC "16"
-// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
-// Retrieval info: PRIVATE: rsEmpty NUMERIC "1"
-// Retrieval info: PRIVATE: rsFull NUMERIC "0"
-// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
-// Retrieval info: PRIVATE: sc_aclr NUMERIC "0"
-// Retrieval info: PRIVATE: sc_sclr NUMERIC "0"
-// Retrieval info: PRIVATE: wsEmpty NUMERIC "0"
-// Retrieval info: PRIVATE: wsFull NUMERIC "1"
-// Retrieval info: PRIVATE: wsUsedW NUMERIC "1"
-// Retrieval info: CONSTANT: ADD_RAM_OUTPUT_REGISTER STRING "OFF"
-// Retrieval info: CONSTANT: CLOCKS_ARE_SYNCHRONIZED STRING "FALSE"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "4096"
-// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "ON"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "12"
-// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: UNDERFLOW_CHECKING STRING "OFF"
-// Retrieval info: CONSTANT: USE_EAB STRING "ON"
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND aclr
-// Retrieval info: USED_PORT: data 0 0 16 0 INPUT NODEFVAL data[15..0]
-// Retrieval info: USED_PORT: q 0 0 16 0 OUTPUT NODEFVAL q[15..0]
-// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL rdclk
-// Retrieval info: USED_PORT: rdempty 0 0 0 0 OUTPUT NODEFVAL rdempty
-// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL rdreq
-// Retrieval info: USED_PORT: rdusedw 0 0 12 0 OUTPUT NODEFVAL rdusedw[11..0]
-// Retrieval info: USED_PORT: wrclk 0 0 0 0 INPUT NODEFVAL wrclk
-// Retrieval info: USED_PORT: wrfull 0 0 0 0 OUTPUT NODEFVAL wrfull
-// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL wrreq
-// Retrieval info: USED_PORT: wrusedw 0 0 12 0 OUTPUT NODEFVAL wrusedw[11..0]
-// Retrieval info: CONNECT: @data 0 0 16 0 data 0 0 16 0
-// Retrieval info: CONNECT: q 0 0 16 0 @q 0 0 16 0
-// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
-// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
-// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
-// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
-// Retrieval info: CONNECT: rdempty 0 0 0 0 @rdempty 0 0 0 0
-// Retrieval info: CONNECT: rdusedw 0 0 12 0 @rdusedw 0 0 12 0
-// Retrieval info: CONNECT: wrfull 0 0 0 0 @wrfull 0 0 0 0
-// Retrieval info: CONNECT: wrusedw 0 0 12 0 @wrusedw 0 0 12 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.inc TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.cmp TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc.bsf TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_inst.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_bb.v TRUE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_waveforms.html FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL fifo_4kx16_dc_wave*.jpg FALSE
diff --git a/usrp/fpga/megacells/fifo_4kx16_dc_inst.v b/usrp/fpga/megacells/fifo_4kx16_dc_inst.v
deleted file mode 100755
index 566f27a17..000000000
--- a/usrp/fpga/megacells/fifo_4kx16_dc_inst.v
+++ /dev/null
@@ -1,13 +0,0 @@
-fifo_4kx16_dc fifo_4kx16_dc_inst (
- .aclr ( aclr_sig ),
- .data ( data_sig ),
- .rdclk ( rdclk_sig ),
- .rdreq ( rdreq_sig ),
- .wrclk ( wrclk_sig ),
- .wrreq ( wrreq_sig ),
- .q ( q_sig ),
- .rdempty ( rdempty_sig ),
- .rdusedw ( rdusedw_sig ),
- .wrfull ( wrfull_sig ),
- .wrusedw ( wrusedw_sig )
- );
diff --git a/usrp/fpga/megacells/mylpm_addsub.bsf b/usrp/fpga/megacells/mylpm_addsub.bsf
deleted file mode 100755
index e5c1ded7f..000000000
--- a/usrp/fpga/megacells/mylpm_addsub.bsf
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 112)
- (text "mylpm_addsub" (rect 26 2 145 21)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 93 30 108)(font "Arial" ))
- (port
- (pt 0 56)
- (input)
- (text "dataa[15..0]" (rect 0 0 75 16)(font "Arial" (font_size 8)))
- (text "dataa[15..0]" (rect 4 40 73 56)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 64 56)(line_width 3))
- )
- (port
- (pt 0 88)
- (input)
- (text "datab[15..0]" (rect 0 0 75 16)(font "Arial" (font_size 8)))
- (text "datab[15..0]" (rect 4 72 73 88)(font "Arial" (font_size 8)))
- (line (pt 0 88)(pt 64 88)(line_width 3))
- )
- (port
- (pt 0 72)
- (input)
- (text "clock" (rect 0 0 34 16)(font "Arial" (font_size 8)))
- (text "clock" (rect 4 56 35 72)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 64 72)(line_width 1))
- )
- (port
- (pt 0 32)
- (input)
- (text "add_sub" (rect 0 0 53 16)(font "Arial" (font_size 8)))
- (text "add_sub" (rect 4 16 53 32)(font "Arial" (font_size 8)))
- (line (pt 0 32)(pt 80 32)(line_width 1))
- )
- (port
- (pt 160 72)
- (output)
- (text "result[15..0]" (rect 0 0 75 16)(font "Arial" (font_size 8)))
- (text "result[15..0]" (rect 88 56 157 72)(font "Arial" (font_size 8)))
- (line (pt 160 72)(pt 96 72)(line_width 3))
- )
- (drawing
- (text "A" (rect 66 48 75 64)(font "Arial" (font_size 8)))
- (text "B" (rect 66 80 75 96)(font "Arial" (font_size 8)))
- (text "A+B/A-B" (rect 82 37 134 53)(font "Arial" (font_size 8)))
- (line (pt 64 48)(pt 96 56)(line_width 1))
- (line (pt 96 56)(pt 96 88)(line_width 1))
- (line (pt 96 88)(pt 64 96)(line_width 1))
- (line (pt 64 96)(pt 64 48)(line_width 1))
- (line (pt 80 32)(pt 80 52)(line_width 1))
- (line (pt 106 40)(pt 125 40)(line_width 1))
- (line (pt 64 66)(pt 70 72)(line_width 1))
- (line (pt 70 72)(pt 64 78)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/mylpm_addsub.cmp b/usrp/fpga/megacells/mylpm_addsub.cmp
deleted file mode 100755
index 311c54a5b..000000000
--- a/usrp/fpga/megacells/mylpm_addsub.cmp
+++ /dev/null
@@ -1,31 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component mylpm_addsub
- PORT
- (
- add_sub : IN STD_LOGIC ;
- dataa : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- datab : IN STD_LOGIC_VECTOR (15 DOWNTO 0);
- clock : IN STD_LOGIC ;
- result : OUT STD_LOGIC_VECTOR (15 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/mylpm_addsub.inc b/usrp/fpga/megacells/mylpm_addsub.inc
deleted file mode 100755
index d8b283f49..000000000
--- a/usrp/fpga/megacells/mylpm_addsub.inc
+++ /dev/null
@@ -1,32 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION mylpm_addsub
-(
- add_sub,
- dataa[15..0],
- datab[15..0],
- clock
-)
-
-RETURNS (
- result[15..0]
-);
diff --git a/usrp/fpga/megacells/mylpm_addsub.v b/usrp/fpga/megacells/mylpm_addsub.v
deleted file mode 100755
index 0566f7e57..000000000
--- a/usrp/fpga/megacells/mylpm_addsub.v
+++ /dev/null
@@ -1,102 +0,0 @@
-// megafunction wizard: %LPM_ADD_SUB%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: lpm_add_sub
-
-// ============================================================
-// File Name: mylpm_addsub.v
-// Megafunction Name(s):
-// lpm_add_sub
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-module mylpm_addsub (
- add_sub,
- dataa,
- datab,
- clock,
- result);
-
- input add_sub;
- input [15:0] dataa;
- input [15:0] datab;
- input clock;
- output [15:0] result;
-
- wire [15:0] sub_wire0;
- wire [15:0] result = sub_wire0[15:0];
-
- lpm_add_sub lpm_add_sub_component (
- .dataa (dataa),
- .add_sub (add_sub),
- .datab (datab),
- .clock (clock),
- .result (sub_wire0));
- defparam
- lpm_add_sub_component.lpm_width = 16,
- lpm_add_sub_component.lpm_direction = "UNUSED",
- lpm_add_sub_component.lpm_type = "LPM_ADD_SUB",
- lpm_add_sub_component.lpm_hint = "ONE_INPUT_IS_CONSTANT=NO",
- lpm_add_sub_component.lpm_pipeline = 1;
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: nBit NUMERIC "16"
-// Retrieval info: PRIVATE: Function NUMERIC "2"
-// Retrieval info: PRIVATE: WhichConstant NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantA NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantB NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtA NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtB NUMERIC "0"
-// Retrieval info: PRIVATE: CarryIn NUMERIC "0"
-// Retrieval info: PRIVATE: CarryOut NUMERIC "0"
-// Retrieval info: PRIVATE: Overflow NUMERIC "0"
-// Retrieval info: PRIVATE: Latency NUMERIC "1"
-// Retrieval info: PRIVATE: aclr NUMERIC "0"
-// Retrieval info: PRIVATE: clken NUMERIC "0"
-// Retrieval info: PRIVATE: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "16"
-// Retrieval info: CONSTANT: LPM_DIRECTION STRING "UNUSED"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_ADD_SUB"
-// Retrieval info: CONSTANT: LPM_HINT STRING "ONE_INPUT_IS_CONSTANT=NO"
-// Retrieval info: CONSTANT: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: USED_PORT: add_sub 0 0 0 0 INPUT NODEFVAL add_sub
-// Retrieval info: USED_PORT: result 0 0 16 0 OUTPUT NODEFVAL result[15..0]
-// Retrieval info: USED_PORT: dataa 0 0 16 0 INPUT NODEFVAL dataa[15..0]
-// Retrieval info: USED_PORT: datab 0 0 16 0 INPUT NODEFVAL datab[15..0]
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock
-// Retrieval info: CONNECT: @add_sub 0 0 0 0 add_sub 0 0 0 0
-// Retrieval info: CONNECT: result 0 0 16 0 @result 0 0 16 0
-// Retrieval info: CONNECT: @dataa 0 0 16 0 dataa 0 0 16 0
-// Retrieval info: CONNECT: @datab 0 0 16 0 datab 0 0 16 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
diff --git a/usrp/fpga/megacells/mylpm_addsub_bb.v b/usrp/fpga/megacells/mylpm_addsub_bb.v
deleted file mode 100755
index 598d3da52..000000000
--- a/usrp/fpga/megacells/mylpm_addsub_bb.v
+++ /dev/null
@@ -1,35 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module mylpm_addsub (
- add_sub,
- dataa,
- datab,
- clock,
- result);
-
- input add_sub;
- input [15:0] dataa;
- input [15:0] datab;
- input clock;
- output [15:0] result;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/mylpm_addsub_inst.v b/usrp/fpga/megacells/mylpm_addsub_inst.v
deleted file mode 100755
index dd732bd6d..000000000
--- a/usrp/fpga/megacells/mylpm_addsub_inst.v
+++ /dev/null
@@ -1,7 +0,0 @@
-mylpm_addsub mylpm_addsub_inst (
- .add_sub ( add_sub_sig ),
- .dataa ( dataa_sig ),
- .datab ( datab_sig ),
- .clock ( clock_sig ),
- .result ( result_sig )
- );
diff --git a/usrp/fpga/megacells/pll.v b/usrp/fpga/megacells/pll.v
deleted file mode 100644
index dacd11f23..000000000
--- a/usrp/fpga/megacells/pll.v
+++ /dev/null
@@ -1,207 +0,0 @@
-// megafunction wizard: %ALTPLL%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: altpll
-
-// ============================================================
-// File Name: pll.v
-// Megafunction Name(s):
-// altpll
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-//
-// 4.0 Build 214 3/25/2004 SP 1 SJ Web Edition
-// ************************************************************
-
-
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-// synopsys translate_off
-`timescale 1 ps / 1 ps
-// synopsys translate_on
-module pll (
- inclk0,
- c0);
-
- input inclk0;
- output c0;
-
- wire [5:0] sub_wire0;
- wire [0:0] sub_wire4 = 1'h0;
- wire [0:0] sub_wire1 = sub_wire0[0:0];
- wire c0 = sub_wire1;
- wire sub_wire2 = inclk0;
- wire [1:0] sub_wire3 = {sub_wire4, sub_wire2};
-
- altpll altpll_component (
- .inclk (sub_wire3),
- .clk (sub_wire0)
- // synopsys translate_off
-,
- .fbin (),
- .pllena (),
- .clkswitch (),
- .areset (),
- .pfdena (),
- .clkena (),
- .extclkena (),
- .scanclk (),
- .scanaclr (),
- .scandata (),
- .scanread (),
- .scanwrite (),
- .extclk (),
- .clkbad (),
- .activeclock (),
- .locked (),
- .clkloss (),
- .scandataout (),
- .scandone (),
- .sclkout1 (),
- .sclkout0 (),
- .enable0 (),
- .enable1 ()
- // synopsys translate_on
-
-);
- defparam
- altpll_component.clk0_duty_cycle = 50,
- altpll_component.lpm_type = "altpll",
- altpll_component.clk0_multiply_by = 1,
- altpll_component.inclk0_input_frequency = 20833,
- altpll_component.clk0_divide_by = 1,
- altpll_component.pll_type = "AUTO",
- altpll_component.clk0_time_delay = "0",
- altpll_component.intended_device_family = "Cyclone",
- altpll_component.operation_mode = "NORMAL",
- altpll_component.compensate_clock = "CLK0",
- altpll_component.clk0_phase_shift = "-3000";
-
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: MIRROR_CLK0 STRING "0"
-// Retrieval info: PRIVATE: PHASE_SHIFT_UNIT0 STRING "ns"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_UNIT0 STRING "MHz"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: SPREAD_USE STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: GLOCKED_COUNTER_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: GLOCK_COUNTER_EDIT NUMERIC "1048575"
-// Retrieval info: PRIVATE: SRC_SYNCH_COMP_RADIO STRING "0"
-// Retrieval info: PRIVATE: DUTY_CYCLE0 STRING "50.00000000"
-// Retrieval info: PRIVATE: PHASE_SHIFT0 STRING "-3.00000000"
-// Retrieval info: PRIVATE: MULT_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ_MODE0 STRING "0"
-// Retrieval info: PRIVATE: SPREAD_PERCENT STRING "0.500"
-// Retrieval info: PRIVATE: LOCKED_OUTPUT_CHECK STRING "0"
-// Retrieval info: PRIVATE: PLL_ARESET_CHECK STRING "0"
-// Retrieval info: PRIVATE: TIME_SHIFT0 STRING "0.00000000"
-// Retrieval info: PRIVATE: STICKY_CLK0 STRING "1"
-// Retrieval info: PRIVATE: BANDWIDTH STRING "1.000"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_CUSTOM STRING "0"
-// Retrieval info: PRIVATE: DEVICE_SPEED_GRADE STRING "8"
-// Retrieval info: PRIVATE: SPREAD_FREQ STRING "50.000"
-// Retrieval info: PRIVATE: BANDWIDTH_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: LONG_SCAN_RADIO STRING "1"
-// Retrieval info: PRIVATE: PLL_ENHPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE_DIRTY NUMERIC "0"
-// Retrieval info: PRIVATE: USE_CLK0 STRING "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: SCAN_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: ZERO_DELAY_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_PFDENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: CREATE_CLKBAD_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK1_FREQ_EDIT STRING "100.000"
-// Retrieval info: PRIVATE: CUR_DEDICATED_CLK STRING "c0"
-// Retrieval info: PRIVATE: PLL_FASTPLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: ACTIVECLK_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_FREQ_UNIT STRING "MHz"
-// Retrieval info: PRIVATE: INCLK0_FREQ_UNIT_COMBO STRING "MHz"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_0 STRING "inclk;fbin;pllena;clkswitch;areset"
-// Retrieval info: PRIVATE: GLOCKED_MODE_CHECK STRING "0"
-// Retrieval info: PRIVATE: NORMAL_MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: CUR_FBIN_CLK STRING "e0"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_1 STRING "pfdena;clkena;extclkena;scanclk;scanaclr"
-// Retrieval info: PRIVATE: DIV_FACTOR0 NUMERIC "1"
-// Retrieval info: PRIVATE: INCLK1_FREQ_UNIT_CHANGED STRING "1"
-// Retrieval info: PRIVATE: HAS_MANUAL_SWITCHOVER STRING "1"
-// Retrieval info: PRIVATE: EXT_FEEDBACK_RADIO STRING "0"
-// Retrieval info: PRIVATE: PLL_AUTOPLL_CHECK NUMERIC "1"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_2 STRING "scandata;scanread;scanwrite;clk;extclk"
-// Retrieval info: PRIVATE: CLKLOSS_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_AUTO STRING "1"
-// Retrieval info: PRIVATE: SHORT_SCAN_RADIO STRING "0"
-// Retrieval info: PRIVATE: LVDS_MODE_DATA_RATE STRING "528.000"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_3 STRING "clkbad;activeclock;locked;clkloss;scandataout"
-// Retrieval info: PRIVATE: CLKSWITCH_CHECK STRING "0"
-// Retrieval info: PRIVATE: SPREAD_FREQ_UNIT STRING "KHz"
-// Retrieval info: PRIVATE: PLL_ENA_CHECK STRING "0"
-// Retrieval info: PRIVATE: INCLK0_FREQ_EDIT STRING "48.000"
-// Retrieval info: PRIVATE: MEGAFN_PORT_INFO_4 STRING "scandone;sclkout1;sclkout0;enable0;enable1"
-// Retrieval info: PRIVATE: CNX_NO_COMPENSATE_RADIO STRING "0"
-// Retrieval info: PRIVATE: INT_FEEDBACK__MODE_RADIO STRING "1"
-// Retrieval info: PRIVATE: OUTPUT_FREQ0 STRING "100.000"
-// Retrieval info: PRIVATE: PRIMARY_CLK_COMBO STRING "inclk0"
-// Retrieval info: PRIVATE: CREATE_INCLK1_CHECK STRING "0"
-// Retrieval info: PRIVATE: SACN_INPUTS_CHECK STRING "0"
-// Retrieval info: PRIVATE: DEV_FAMILY STRING "Cyclone"
-// Retrieval info: PRIVATE: LOCK_LOSS_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: SWITCHOVER_COUNT_EDIT NUMERIC "1"
-// Retrieval info: PRIVATE: SWITCHOVER_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_PRESET STRING "Low"
-// Retrieval info: PRIVATE: GLOCKED_FEATURE_ENABLED STRING "0"
-// Retrieval info: PRIVATE: USE_CLKENA0 STRING "0"
-// Retrieval info: PRIVATE: LVDS_PHASE_SHIFT_UNIT0 STRING "deg"
-// Retrieval info: PRIVATE: CLKBAD_SWITCHOVER_CHECK STRING "0"
-// Retrieval info: PRIVATE: BANDWIDTH_USE_PRESET STRING "0"
-// Retrieval info: PRIVATE: PLL_LVDS_PLL_CHECK NUMERIC "0"
-// Retrieval info: PRIVATE: DEVICE_FAMILY NUMERIC "11"
-// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
-// Retrieval info: CONSTANT: CLK0_DUTY_CYCLE NUMERIC "50"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "altpll"
-// Retrieval info: CONSTANT: CLK0_MULTIPLY_BY NUMERIC "1"
-// Retrieval info: CONSTANT: INCLK0_INPUT_FREQUENCY NUMERIC "20833"
-// Retrieval info: CONSTANT: CLK0_DIVIDE_BY NUMERIC "1"
-// Retrieval info: CONSTANT: PLL_TYPE STRING "AUTO"
-// Retrieval info: CONSTANT: CLK0_TIME_DELAY STRING "0"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: OPERATION_MODE STRING "NORMAL"
-// Retrieval info: CONSTANT: COMPENSATE_CLOCK STRING "CLK0"
-// Retrieval info: CONSTANT: CLK0_PHASE_SHIFT STRING "-3000"
-// Retrieval info: USED_PORT: c0 0 0 0 0 OUTPUT VCC "c0"
-// Retrieval info: USED_PORT: @clk 0 0 6 0 OUTPUT VCC "@clk[5..0]"
-// Retrieval info: USED_PORT: inclk0 0 0 0 0 INPUT GND "inclk0"
-// Retrieval info: USED_PORT: @extclk 0 0 4 0 OUTPUT VCC "@extclk[3..0]"
-// Retrieval info: CONNECT: @inclk 0 0 1 0 inclk0 0 0 0 0
-// Retrieval info: CONNECT: c0 0 0 0 0 @clk 0 0 1 0
-// Retrieval info: CONNECT: @inclk 0 0 1 1 GND 0 0 0 0
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll.v TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll.inc FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll.cmp FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll.bsf FALSE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll_inst.v TRUE FALSE
-// Retrieval info: GEN_FILE: TYPE_NORMAL pll_bb.v TRUE FALSE
diff --git a/usrp/fpga/megacells/pll_bb.v b/usrp/fpga/megacells/pll_bb.v
deleted file mode 100644
index debadaa25..000000000
--- a/usrp/fpga/megacells/pll_bb.v
+++ /dev/null
@@ -1,29 +0,0 @@
-//Copyright (C) 1991-2004 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module pll (
- inclk0,
- c0);
-
- input inclk0;
- output c0;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/pll_inst.v b/usrp/fpga/megacells/pll_inst.v
deleted file mode 100644
index 97db58ba0..000000000
--- a/usrp/fpga/megacells/pll_inst.v
+++ /dev/null
@@ -1,4 +0,0 @@
-pll pll_inst (
- .inclk0 ( inclk0_sig ),
- .c0 ( c0_sig )
- );
diff --git a/usrp/fpga/megacells/sub32.bsf b/usrp/fpga/megacells/sub32.bsf
deleted file mode 100755
index 753fdc738..000000000
--- a/usrp/fpga/megacells/sub32.bsf
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-WARNING: Do NOT edit the input and output ports in this file in a text
-editor if you plan to continue editing the block that represents it in
-the Block Editor! File corruption is VERY likely to occur.
-*/
-/*
-Copyright (C) 1991-2003 Altera Corporation
-Any megafunction design, and related netlist (encrypted or decrypted),
-support information, device programming or simulation file, and any other
-associated documentation or information provided by Altera or a partner
-under Altera's Megafunction Partnership Program may be used only
-to program PLD devices (but not masked PLD devices) from Altera. Any
-other use of such megafunction design, netlist, support information,
-device programming or simulation file, or any other related documentation
-or information is prohibited for any other purpose, including, but not
-limited to modification, reverse engineering, de-compiling, or use with
-any other silicon devices, unless such use is explicitly licensed under
-a separate agreement with Altera or a megafunction partner. Title to the
-intellectual property, including patents, copyrights, trademarks, trade
-secrets, or maskworks, embodied in any such megafunction design, netlist,
-support information, device programming or simulation file, or any other
-related documentation or information provided by Altera or a megafunction
-partner, remains with Altera, the megafunction partner, or their respective
-licensors. No other licenses, including any licenses needed under any third
-party's intellectual property, are provided herein.
-*/
-(header "symbol" (version "1.1"))
-(symbol
- (rect 0 0 160 128)
- (text "sub32" (rect 58 2 109 21)(font "Arial" (font_size 10)))
- (text "inst" (rect 8 109 31 124)(font "Arial" ))
- (port
- (pt 0 40)
- (input)
- (text "dataa[31..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "dataa[31..0]" (rect 4 24 73 40)(font "Arial" (font_size 8)))
- (line (pt 0 40)(pt 64 40)(line_width 3))
- )
- (port
- (pt 0 72)
- (input)
- (text "datab[31..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "datab[31..0]" (rect 4 56 73 72)(font "Arial" (font_size 8)))
- (line (pt 0 72)(pt 64 72)(line_width 3))
- )
- (port
- (pt 0 56)
- (input)
- (text "clock" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clock" (rect 4 40 35 56)(font "Arial" (font_size 8)))
- (line (pt 0 56)(pt 64 56)(line_width 1))
- )
- (port
- (pt 0 96)
- (input)
- (text "clken" (rect 0 0 36 16)(font "Arial" (font_size 8)))
- (text "clken" (rect 4 80 35 96)(font "Arial" (font_size 8)))
- (line (pt 0 96)(pt 74 96)(line_width 1))
- )
- (port
- (pt 0 112)
- (input)
- (text "aclr" (rect 0 0 24 16)(font "Arial" (font_size 8)))
- (text "aclr" (rect 4 96 25 112)(font "Arial" (font_size 8)))
- (line (pt 0 112)(pt 85 112)(line_width 1))
- )
- (port
- (pt 160 56)
- (output)
- (text "result[31..0]" (rect 0 0 81 16)(font "Arial" (font_size 8)))
- (text "result[31..0]" (rect 88 40 157 56)(font "Arial" (font_size 8)))
- (line (pt 160 56)(pt 96 56)(line_width 3))
- )
- (drawing
- (text "A" (rect 66 32 75 48)(font "Arial" (font_size 8)))
- (text "B" (rect 66 64 75 80)(font "Arial" (font_size 8)))
- (text "A-B" (rect 72 48 94 64)(font "Arial" (font_size 8)))
- (line (pt 64 32)(pt 96 40)(line_width 1))
- (line (pt 96 40)(pt 96 72)(line_width 1))
- (line (pt 96 72)(pt 64 80)(line_width 1))
- (line (pt 64 80)(pt 64 32)(line_width 1))
- (line (pt 74 96)(pt 74 77)(line_width 1))
- (line (pt 85 112)(pt 85 74)(line_width 1))
- (line (pt 64 50)(pt 70 56)(line_width 1))
- (line (pt 70 56)(pt 64 62)(line_width 1))
- )
-)
diff --git a/usrp/fpga/megacells/sub32.cmp b/usrp/fpga/megacells/sub32.cmp
deleted file mode 100755
index 0d5b62ef9..000000000
--- a/usrp/fpga/megacells/sub32.cmp
+++ /dev/null
@@ -1,32 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-component sub32
- PORT
- (
- dataa : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
- datab : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
- clock : IN STD_LOGIC ;
- aclr : IN STD_LOGIC ;
- clken : IN STD_LOGIC ;
- result : OUT STD_LOGIC_VECTOR (31 DOWNTO 0)
- );
-end component;
diff --git a/usrp/fpga/megacells/sub32.inc b/usrp/fpga/megacells/sub32.inc
deleted file mode 100755
index 3c64e21c5..000000000
--- a/usrp/fpga/megacells/sub32.inc
+++ /dev/null
@@ -1,33 +0,0 @@
---Copyright (C) 1991-2003 Altera Corporation
---Any megafunction design, and related netlist (encrypted or decrypted),
---support information, device programming or simulation file, and any other
---associated documentation or information provided by Altera or a partner
---under Altera's Megafunction Partnership Program may be used only
---to program PLD devices (but not masked PLD devices) from Altera. Any
---other use of such megafunction design, netlist, support information,
---device programming or simulation file, or any other related documentation
---or information is prohibited for any other purpose, including, but not
---limited to modification, reverse engineering, de-compiling, or use with
---any other silicon devices, unless such use is explicitly licensed under
---a separate agreement with Altera or a megafunction partner. Title to the
---intellectual property, including patents, copyrights, trademarks, trade
---secrets, or maskworks, embodied in any such megafunction design, netlist,
---support information, device programming or simulation file, or any other
---related documentation or information provided by Altera or a megafunction
---partner, remains with Altera, the megafunction partner, or their respective
---licensors. No other licenses, including any licenses needed under any third
---party's intellectual property, are provided herein.
-
-
-FUNCTION sub32
-(
- dataa[31..0],
- datab[31..0],
- clock,
- aclr,
- clken
-)
-
-RETURNS (
- result[31..0]
-);
diff --git a/usrp/fpga/megacells/sub32.v b/usrp/fpga/megacells/sub32.v
deleted file mode 100755
index dd825d91a..000000000
--- a/usrp/fpga/megacells/sub32.v
+++ /dev/null
@@ -1,675 +0,0 @@
-// megafunction wizard: %LPM_ADD_SUB%CBX%
-// GENERATION: STANDARD
-// VERSION: WM1.0
-// MODULE: lpm_add_sub
-
-// ============================================================
-// File Name: sub32.v
-// Megafunction Name(s):
-// lpm_add_sub
-// ============================================================
-// ************************************************************
-// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-// ************************************************************
-
-
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-
-//lpm_add_sub DEVICE_FAMILY=Cyclone LPM_DIRECTION=SUB LPM_PIPELINE=1 LPM_WIDTH=32 aclr clken clock dataa datab result
-//VERSION_BEGIN 3.0 cbx_lpm_add_sub 2003:04:10:18:28:42:SJ cbx_mgl 2003:06:11:11:00:44:SJ cbx_stratix 2003:05:16:10:26:50:SJ VERSION_END
-
-//synthesis_resources = lut 32
-module sub32_add_sub_cqa
- (
- aclr,
- clken,
- clock,
- dataa,
- datab,
- result) /* synthesis synthesis_clearbox=1 */;
- input aclr;
- input clken;
- input clock;
- input [31:0] dataa;
- input [31:0] datab;
- output [31:0] result;
-
- wire [0:0] wire_add_sub_cella_0cout;
- wire [0:0] wire_add_sub_cella_1cout;
- wire [0:0] wire_add_sub_cella_2cout;
- wire [0:0] wire_add_sub_cella_3cout;
- wire [0:0] wire_add_sub_cella_4cout;
- wire [0:0] wire_add_sub_cella_5cout;
- wire [0:0] wire_add_sub_cella_6cout;
- wire [0:0] wire_add_sub_cella_7cout;
- wire [0:0] wire_add_sub_cella_8cout;
- wire [0:0] wire_add_sub_cella_9cout;
- wire [0:0] wire_add_sub_cella_10cout;
- wire [0:0] wire_add_sub_cella_11cout;
- wire [0:0] wire_add_sub_cella_12cout;
- wire [0:0] wire_add_sub_cella_13cout;
- wire [0:0] wire_add_sub_cella_14cout;
- wire [0:0] wire_add_sub_cella_15cout;
- wire [0:0] wire_add_sub_cella_16cout;
- wire [0:0] wire_add_sub_cella_17cout;
- wire [0:0] wire_add_sub_cella_18cout;
- wire [0:0] wire_add_sub_cella_19cout;
- wire [0:0] wire_add_sub_cella_20cout;
- wire [0:0] wire_add_sub_cella_21cout;
- wire [0:0] wire_add_sub_cella_22cout;
- wire [0:0] wire_add_sub_cella_23cout;
- wire [0:0] wire_add_sub_cella_24cout;
- wire [0:0] wire_add_sub_cella_25cout;
- wire [0:0] wire_add_sub_cella_26cout;
- wire [0:0] wire_add_sub_cella_27cout;
- wire [0:0] wire_add_sub_cella_28cout;
- wire [0:0] wire_add_sub_cella_29cout;
- wire [0:0] wire_add_sub_cella_30cout;
- wire [31:0] wire_add_sub_cella_dataa;
- wire [31:0] wire_add_sub_cella_datab;
- wire [31:0] wire_add_sub_cella_regout;
-
- stratix_lcell add_sub_cella_0
- (
- .aclr(aclr),
- .cin(1'b1),
- .clk(clock),
- .cout(wire_add_sub_cella_0cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[0:0]),
- .datab(wire_add_sub_cella_datab[0:0]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[0:0]));
- defparam
- add_sub_cella_0.cin_used = "true",
- add_sub_cella_0.lut_mask = "69b2",
- add_sub_cella_0.operation_mode = "arithmetic",
- add_sub_cella_0.sum_lutc_input = "cin",
- add_sub_cella_0.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_1
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_0cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_1cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[1:1]),
- .datab(wire_add_sub_cella_datab[1:1]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[1:1]));
- defparam
- add_sub_cella_1.cin_used = "true",
- add_sub_cella_1.lut_mask = "69b2",
- add_sub_cella_1.operation_mode = "arithmetic",
- add_sub_cella_1.sum_lutc_input = "cin",
- add_sub_cella_1.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_2
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_1cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_2cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[2:2]),
- .datab(wire_add_sub_cella_datab[2:2]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[2:2]));
- defparam
- add_sub_cella_2.cin_used = "true",
- add_sub_cella_2.lut_mask = "69b2",
- add_sub_cella_2.operation_mode = "arithmetic",
- add_sub_cella_2.sum_lutc_input = "cin",
- add_sub_cella_2.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_3
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_2cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_3cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[3:3]),
- .datab(wire_add_sub_cella_datab[3:3]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[3:3]));
- defparam
- add_sub_cella_3.cin_used = "true",
- add_sub_cella_3.lut_mask = "69b2",
- add_sub_cella_3.operation_mode = "arithmetic",
- add_sub_cella_3.sum_lutc_input = "cin",
- add_sub_cella_3.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_4
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_3cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_4cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[4:4]),
- .datab(wire_add_sub_cella_datab[4:4]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[4:4]));
- defparam
- add_sub_cella_4.cin_used = "true",
- add_sub_cella_4.lut_mask = "69b2",
- add_sub_cella_4.operation_mode = "arithmetic",
- add_sub_cella_4.sum_lutc_input = "cin",
- add_sub_cella_4.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_5
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_4cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_5cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[5:5]),
- .datab(wire_add_sub_cella_datab[5:5]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[5:5]));
- defparam
- add_sub_cella_5.cin_used = "true",
- add_sub_cella_5.lut_mask = "69b2",
- add_sub_cella_5.operation_mode = "arithmetic",
- add_sub_cella_5.sum_lutc_input = "cin",
- add_sub_cella_5.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_6
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_5cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_6cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[6:6]),
- .datab(wire_add_sub_cella_datab[6:6]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[6:6]));
- defparam
- add_sub_cella_6.cin_used = "true",
- add_sub_cella_6.lut_mask = "69b2",
- add_sub_cella_6.operation_mode = "arithmetic",
- add_sub_cella_6.sum_lutc_input = "cin",
- add_sub_cella_6.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_7
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_6cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_7cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[7:7]),
- .datab(wire_add_sub_cella_datab[7:7]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[7:7]));
- defparam
- add_sub_cella_7.cin_used = "true",
- add_sub_cella_7.lut_mask = "69b2",
- add_sub_cella_7.operation_mode = "arithmetic",
- add_sub_cella_7.sum_lutc_input = "cin",
- add_sub_cella_7.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_8
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_7cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_8cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[8:8]),
- .datab(wire_add_sub_cella_datab[8:8]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[8:8]));
- defparam
- add_sub_cella_8.cin_used = "true",
- add_sub_cella_8.lut_mask = "69b2",
- add_sub_cella_8.operation_mode = "arithmetic",
- add_sub_cella_8.sum_lutc_input = "cin",
- add_sub_cella_8.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_9
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_8cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_9cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[9:9]),
- .datab(wire_add_sub_cella_datab[9:9]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[9:9]));
- defparam
- add_sub_cella_9.cin_used = "true",
- add_sub_cella_9.lut_mask = "69b2",
- add_sub_cella_9.operation_mode = "arithmetic",
- add_sub_cella_9.sum_lutc_input = "cin",
- add_sub_cella_9.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_10
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_9cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_10cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[10:10]),
- .datab(wire_add_sub_cella_datab[10:10]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[10:10]));
- defparam
- add_sub_cella_10.cin_used = "true",
- add_sub_cella_10.lut_mask = "69b2",
- add_sub_cella_10.operation_mode = "arithmetic",
- add_sub_cella_10.sum_lutc_input = "cin",
- add_sub_cella_10.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_11
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_10cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_11cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[11:11]),
- .datab(wire_add_sub_cella_datab[11:11]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[11:11]));
- defparam
- add_sub_cella_11.cin_used = "true",
- add_sub_cella_11.lut_mask = "69b2",
- add_sub_cella_11.operation_mode = "arithmetic",
- add_sub_cella_11.sum_lutc_input = "cin",
- add_sub_cella_11.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_12
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_11cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_12cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[12:12]),
- .datab(wire_add_sub_cella_datab[12:12]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[12:12]));
- defparam
- add_sub_cella_12.cin_used = "true",
- add_sub_cella_12.lut_mask = "69b2",
- add_sub_cella_12.operation_mode = "arithmetic",
- add_sub_cella_12.sum_lutc_input = "cin",
- add_sub_cella_12.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_13
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_12cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_13cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[13:13]),
- .datab(wire_add_sub_cella_datab[13:13]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[13:13]));
- defparam
- add_sub_cella_13.cin_used = "true",
- add_sub_cella_13.lut_mask = "69b2",
- add_sub_cella_13.operation_mode = "arithmetic",
- add_sub_cella_13.sum_lutc_input = "cin",
- add_sub_cella_13.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_14
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_13cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_14cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[14:14]),
- .datab(wire_add_sub_cella_datab[14:14]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[14:14]));
- defparam
- add_sub_cella_14.cin_used = "true",
- add_sub_cella_14.lut_mask = "69b2",
- add_sub_cella_14.operation_mode = "arithmetic",
- add_sub_cella_14.sum_lutc_input = "cin",
- add_sub_cella_14.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_15
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_14cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_15cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[15:15]),
- .datab(wire_add_sub_cella_datab[15:15]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[15:15]));
- defparam
- add_sub_cella_15.cin_used = "true",
- add_sub_cella_15.lut_mask = "69b2",
- add_sub_cella_15.operation_mode = "arithmetic",
- add_sub_cella_15.sum_lutc_input = "cin",
- add_sub_cella_15.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_16
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_15cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_16cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[16:16]),
- .datab(wire_add_sub_cella_datab[16:16]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[16:16]));
- defparam
- add_sub_cella_16.cin_used = "true",
- add_sub_cella_16.lut_mask = "69b2",
- add_sub_cella_16.operation_mode = "arithmetic",
- add_sub_cella_16.sum_lutc_input = "cin",
- add_sub_cella_16.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_17
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_16cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_17cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[17:17]),
- .datab(wire_add_sub_cella_datab[17:17]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[17:17]));
- defparam
- add_sub_cella_17.cin_used = "true",
- add_sub_cella_17.lut_mask = "69b2",
- add_sub_cella_17.operation_mode = "arithmetic",
- add_sub_cella_17.sum_lutc_input = "cin",
- add_sub_cella_17.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_18
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_17cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_18cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[18:18]),
- .datab(wire_add_sub_cella_datab[18:18]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[18:18]));
- defparam
- add_sub_cella_18.cin_used = "true",
- add_sub_cella_18.lut_mask = "69b2",
- add_sub_cella_18.operation_mode = "arithmetic",
- add_sub_cella_18.sum_lutc_input = "cin",
- add_sub_cella_18.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_19
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_18cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_19cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[19:19]),
- .datab(wire_add_sub_cella_datab[19:19]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[19:19]));
- defparam
- add_sub_cella_19.cin_used = "true",
- add_sub_cella_19.lut_mask = "69b2",
- add_sub_cella_19.operation_mode = "arithmetic",
- add_sub_cella_19.sum_lutc_input = "cin",
- add_sub_cella_19.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_20
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_19cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_20cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[20:20]),
- .datab(wire_add_sub_cella_datab[20:20]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[20:20]));
- defparam
- add_sub_cella_20.cin_used = "true",
- add_sub_cella_20.lut_mask = "69b2",
- add_sub_cella_20.operation_mode = "arithmetic",
- add_sub_cella_20.sum_lutc_input = "cin",
- add_sub_cella_20.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_21
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_20cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_21cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[21:21]),
- .datab(wire_add_sub_cella_datab[21:21]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[21:21]));
- defparam
- add_sub_cella_21.cin_used = "true",
- add_sub_cella_21.lut_mask = "69b2",
- add_sub_cella_21.operation_mode = "arithmetic",
- add_sub_cella_21.sum_lutc_input = "cin",
- add_sub_cella_21.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_22
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_21cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_22cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[22:22]),
- .datab(wire_add_sub_cella_datab[22:22]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[22:22]));
- defparam
- add_sub_cella_22.cin_used = "true",
- add_sub_cella_22.lut_mask = "69b2",
- add_sub_cella_22.operation_mode = "arithmetic",
- add_sub_cella_22.sum_lutc_input = "cin",
- add_sub_cella_22.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_23
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_22cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_23cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[23:23]),
- .datab(wire_add_sub_cella_datab[23:23]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[23:23]));
- defparam
- add_sub_cella_23.cin_used = "true",
- add_sub_cella_23.lut_mask = "69b2",
- add_sub_cella_23.operation_mode = "arithmetic",
- add_sub_cella_23.sum_lutc_input = "cin",
- add_sub_cella_23.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_24
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_23cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_24cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[24:24]),
- .datab(wire_add_sub_cella_datab[24:24]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[24:24]));
- defparam
- add_sub_cella_24.cin_used = "true",
- add_sub_cella_24.lut_mask = "69b2",
- add_sub_cella_24.operation_mode = "arithmetic",
- add_sub_cella_24.sum_lutc_input = "cin",
- add_sub_cella_24.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_25
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_24cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_25cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[25:25]),
- .datab(wire_add_sub_cella_datab[25:25]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[25:25]));
- defparam
- add_sub_cella_25.cin_used = "true",
- add_sub_cella_25.lut_mask = "69b2",
- add_sub_cella_25.operation_mode = "arithmetic",
- add_sub_cella_25.sum_lutc_input = "cin",
- add_sub_cella_25.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_26
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_25cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_26cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[26:26]),
- .datab(wire_add_sub_cella_datab[26:26]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[26:26]));
- defparam
- add_sub_cella_26.cin_used = "true",
- add_sub_cella_26.lut_mask = "69b2",
- add_sub_cella_26.operation_mode = "arithmetic",
- add_sub_cella_26.sum_lutc_input = "cin",
- add_sub_cella_26.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_27
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_26cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_27cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[27:27]),
- .datab(wire_add_sub_cella_datab[27:27]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[27:27]));
- defparam
- add_sub_cella_27.cin_used = "true",
- add_sub_cella_27.lut_mask = "69b2",
- add_sub_cella_27.operation_mode = "arithmetic",
- add_sub_cella_27.sum_lutc_input = "cin",
- add_sub_cella_27.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_28
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_27cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_28cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[28:28]),
- .datab(wire_add_sub_cella_datab[28:28]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[28:28]));
- defparam
- add_sub_cella_28.cin_used = "true",
- add_sub_cella_28.lut_mask = "69b2",
- add_sub_cella_28.operation_mode = "arithmetic",
- add_sub_cella_28.sum_lutc_input = "cin",
- add_sub_cella_28.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_29
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_28cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_29cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[29:29]),
- .datab(wire_add_sub_cella_datab[29:29]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[29:29]));
- defparam
- add_sub_cella_29.cin_used = "true",
- add_sub_cella_29.lut_mask = "69b2",
- add_sub_cella_29.operation_mode = "arithmetic",
- add_sub_cella_29.sum_lutc_input = "cin",
- add_sub_cella_29.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_30
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_29cout[0:0]),
- .clk(clock),
- .cout(wire_add_sub_cella_30cout[0:0]),
- .dataa(wire_add_sub_cella_dataa[30:30]),
- .datab(wire_add_sub_cella_datab[30:30]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[30:30]));
- defparam
- add_sub_cella_30.cin_used = "true",
- add_sub_cella_30.lut_mask = "69b2",
- add_sub_cella_30.operation_mode = "arithmetic",
- add_sub_cella_30.sum_lutc_input = "cin",
- add_sub_cella_30.lpm_type = "stratix_lcell";
- stratix_lcell add_sub_cella_31
- (
- .aclr(aclr),
- .cin(wire_add_sub_cella_30cout[0:0]),
- .clk(clock),
- .dataa(wire_add_sub_cella_dataa[31:31]),
- .datab(wire_add_sub_cella_datab[31:31]),
- .ena(clken),
- .regout(wire_add_sub_cella_regout[31:31]));
- defparam
- add_sub_cella_31.cin_used = "true",
- add_sub_cella_31.lut_mask = "6969",
- add_sub_cella_31.operation_mode = "normal",
- add_sub_cella_31.sum_lutc_input = "cin",
- add_sub_cella_31.lpm_type = "stratix_lcell";
- assign
- wire_add_sub_cella_dataa = dataa,
- wire_add_sub_cella_datab = datab;
- assign
- result = wire_add_sub_cella_regout;
-endmodule //sub32_add_sub_cqa
-//VALID FILE
-
-
-module sub32 (
- dataa,
- datab,
- clock,
- aclr,
- clken,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [31:0] dataa;
- input [31:0] datab;
- input clock;
- input aclr;
- input clken;
- output [31:0] result;
-
- wire [31:0] sub_wire0;
- wire [31:0] result = sub_wire0[31:0];
-
- sub32_add_sub_cqa sub32_add_sub_cqa_component (
- .dataa (dataa),
- .datab (datab),
- .clken (clken),
- .aclr (aclr),
- .clock (clock),
- .result (sub_wire0));
-
-endmodule
-
-// ============================================================
-// CNX file retrieval info
-// ============================================================
-// Retrieval info: PRIVATE: nBit NUMERIC "32"
-// Retrieval info: PRIVATE: Function NUMERIC "1"
-// Retrieval info: PRIVATE: WhichConstant NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantA NUMERIC "0"
-// Retrieval info: PRIVATE: ConstantB NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtA NUMERIC "0"
-// Retrieval info: PRIVATE: ValidCtB NUMERIC "0"
-// Retrieval info: PRIVATE: CarryIn NUMERIC "0"
-// Retrieval info: PRIVATE: CarryOut NUMERIC "0"
-// Retrieval info: PRIVATE: Overflow NUMERIC "0"
-// Retrieval info: PRIVATE: Latency NUMERIC "1"
-// Retrieval info: PRIVATE: aclr NUMERIC "1"
-// Retrieval info: PRIVATE: clken NUMERIC "1"
-// Retrieval info: PRIVATE: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "32"
-// Retrieval info: CONSTANT: LPM_DIRECTION STRING "SUB"
-// Retrieval info: CONSTANT: LPM_TYPE STRING "LPM_ADD_SUB"
-// Retrieval info: CONSTANT: LPM_HINT STRING "ONE_INPUT_IS_CONSTANT=NO"
-// Retrieval info: CONSTANT: LPM_PIPELINE NUMERIC "1"
-// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "Cyclone"
-// Retrieval info: USED_PORT: result 0 0 32 0 OUTPUT NODEFVAL result[31..0]
-// Retrieval info: USED_PORT: dataa 0 0 32 0 INPUT NODEFVAL dataa[31..0]
-// Retrieval info: USED_PORT: datab 0 0 32 0 INPUT NODEFVAL datab[31..0]
-// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT NODEFVAL clock
-// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT NODEFVAL aclr
-// Retrieval info: USED_PORT: clken 0 0 0 0 INPUT NODEFVAL clken
-// Retrieval info: CONNECT: result 0 0 32 0 @result 0 0 32 0
-// Retrieval info: CONNECT: @dataa 0 0 32 0 dataa 0 0 32 0
-// Retrieval info: CONNECT: @datab 0 0 32 0 datab 0 0 32 0
-// Retrieval info: CONNECT: @clock 0 0 0 0 clock 0 0 0 0
-// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
-// Retrieval info: CONNECT: @clken 0 0 0 0 clken 0 0 0 0
-// Retrieval info: LIBRARY: lpm lpm.lpm_components.all
diff --git a/usrp/fpga/megacells/sub32_bb.v b/usrp/fpga/megacells/sub32_bb.v
deleted file mode 100755
index 488ab51cf..000000000
--- a/usrp/fpga/megacells/sub32_bb.v
+++ /dev/null
@@ -1,37 +0,0 @@
-//Copyright (C) 1991-2003 Altera Corporation
-//Any megafunction design, and related netlist (encrypted or decrypted),
-//support information, device programming or simulation file, and any other
-//associated documentation or information provided by Altera or a partner
-//under Altera's Megafunction Partnership Program may be used only
-//to program PLD devices (but not masked PLD devices) from Altera. Any
-//other use of such megafunction design, netlist, support information,
-//device programming or simulation file, or any other related documentation
-//or information is prohibited for any other purpose, including, but not
-//limited to modification, reverse engineering, de-compiling, or use with
-//any other silicon devices, unless such use is explicitly licensed under
-//a separate agreement with Altera or a megafunction partner. Title to the
-//intellectual property, including patents, copyrights, trademarks, trade
-//secrets, or maskworks, embodied in any such megafunction design, netlist,
-//support information, device programming or simulation file, or any other
-//related documentation or information provided by Altera or a megafunction
-//partner, remains with Altera, the megafunction partner, or their respective
-//licensors. No other licenses, including any licenses needed under any third
-//party's intellectual property, are provided herein.
-
-module sub32 (
- dataa,
- datab,
- clock,
- aclr,
- clken,
- result)/* synthesis synthesis_clearbox = 1 */;
-
- input [31:0] dataa;
- input [31:0] datab;
- input clock;
- input aclr;
- input clken;
- output [31:0] result;
-
-endmodule
-
diff --git a/usrp/fpga/megacells/sub32_inst.v b/usrp/fpga/megacells/sub32_inst.v
deleted file mode 100755
index 1916fc524..000000000
--- a/usrp/fpga/megacells/sub32_inst.v
+++ /dev/null
@@ -1,8 +0,0 @@
-sub32 sub32_inst (
- .dataa ( dataa_sig ),
- .datab ( datab_sig ),
- .clock ( clock_sig ),
- .aclr ( aclr_sig ),
- .clken ( clken_sig ),
- .result ( result_sig )
- );
diff --git a/usrp/fpga/models/bustri.v b/usrp/fpga/models/bustri.v
deleted file mode 100644
index 6e5a0f74c..000000000
--- a/usrp/fpga/models/bustri.v
+++ /dev/null
@@ -1,17 +0,0 @@
-
-// Model for tristate bus on altera
-// FIXME do we really need to use a megacell for this?
-
-module bustri (data,
- enabledt,
- tridata);
-
- input [15:0] data;
- input enabledt;
- inout [15:0] tridata;
-
- assign tridata = enabledt ? data :16'bz;
-
-endmodule // bustri
-
-
diff --git a/usrp/fpga/models/fifo.v b/usrp/fpga/models/fifo.v
deleted file mode 100644
index 0ade49e9c..000000000
--- a/usrp/fpga/models/fifo.v
+++ /dev/null
@@ -1,82 +0,0 @@
-// Model of FIFO in Altera
-
-module fifo( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
- parameter width = 16;
- parameter depth = 1024;
- parameter addr_bits = 10;
-
- //`define rd_req 0; // Set this to 0 for rd_ack, 1 for rd_req
-
- input [width-1:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [width-1:0] q;
- output rdfull;
- output rdempty;
- output reg [addr_bits-1:0] rdusedw;
- output wrfull;
- output wrempty;
- output reg [addr_bits-1:0] wrusedw;
-
- reg [width-1:0] mem [0:depth-1];
- reg [addr_bits-1:0] rdptr;
- reg [addr_bits-1:0] wrptr;
-
-`ifdef rd_req
- reg [width-1:0] q;
-`else
- wire [width-1:0] q;
-`endif
-
- integer i;
-
- always @( aclr)
- begin
- wrptr <= #1 0;
- rdptr <= #1 0;
- for(i=0;i<depth;i=i+1)
- mem[i] <= #1 0;
- end
-
- always @(posedge wrclk)
- if(wrreq)
- begin
- wrptr <= #1 wrptr+1;
- mem[wrptr] <= #1 data;
- end
-
- always @(posedge rdclk)
- if(rdreq)
- begin
- rdptr <= #1 rdptr+1;
-`ifdef rd_req
- q <= #1 mem[rdptr];
-`endif
- end
-
-`ifdef rd_req
-`else
- assign q = mem[rdptr];
-`endif
-
- // Fix these
- always @(posedge wrclk)
- wrusedw <= #1 wrptr - rdptr;
-
- always @(posedge rdclk)
- rdusedw <= #1 wrptr - rdptr;
-
- assign wrempty = (wrusedw == 0);
- assign wrfull = (wrusedw == depth-1);
-
- assign rdempty = (rdusedw == 0);
- assign rdfull = (rdusedw == depth-1);
-
-endmodule // fifo
-
-
diff --git a/usrp/fpga/models/fifo_1c_1k.v b/usrp/fpga/models/fifo_1c_1k.v
deleted file mode 100644
index d11040b54..000000000
--- a/usrp/fpga/models/fifo_1c_1k.v
+++ /dev/null
@@ -1,81 +0,0 @@
-// Model of FIFO in Altera
-
-module fifo_1c_1k ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
- parameter width = 32;
- parameter depth = 1024;
- //`define rd_req 0; // Set this to 0 for rd_ack, 1 for rd_req
-
- input [31:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [31:0] q;
- output rdfull;
- output rdempty;
- output [9:0] rdusedw;
- output wrfull;
- output wrempty;
- output [9:0] wrusedw;
-
- reg [width-1:0] mem [0:depth-1];
- reg [7:0] rdptr;
- reg [7:0] wrptr;
-
-`ifdef rd_req
- reg [width-1:0] q;
-`else
- wire [width-1:0] q;
-`endif
-
- reg [9:0] rdusedw;
- reg [9:0] wrusedw;
-
- integer i;
-
- always @( aclr)
- begin
- wrptr <= #1 0;
- rdptr <= #1 0;
- for(i=0;i<depth;i=i+1)
- mem[i] <= #1 0;
- end
-
- always @(posedge wrclk)
- if(wrreq)
- begin
- wrptr <= #1 wrptr+1;
- mem[wrptr] <= #1 data;
- end
-
- always @(posedge rdclk)
- if(rdreq)
- begin
- rdptr <= #1 rdptr+1;
-`ifdef rd_req
- q <= #1 mem[rdptr];
-`endif
- end
-
-`ifdef rd_req
-`else
- assign q = mem[rdptr];
-`endif
-
- // Fix these
- always @(posedge wrclk)
- wrusedw <= #1 wrptr - rdptr;
-
- always @(posedge rdclk)
- rdusedw <= #1 wrptr - rdptr;
-
- assign wrempty = (wrusedw == 0);
- assign wrfull = (wrusedw == depth-1);
-
- assign rdempty = (rdusedw == 0);
- assign rdfull = (rdusedw == depth-1);
-
-endmodule // fifo_1c_1k
diff --git a/usrp/fpga/models/fifo_1c_2k.v b/usrp/fpga/models/fifo_1c_2k.v
deleted file mode 100644
index 5c3acfef5..000000000
--- a/usrp/fpga/models/fifo_1c_2k.v
+++ /dev/null
@@ -1,81 +0,0 @@
-// Model of FIFO in Altera
-
-module fifo_1c_2k ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
- parameter width = 32;
- parameter depth = 2048;
- //`define rd_req 0; // Set this to 0 for rd_ack, 1 for rd_req
-
- input [31:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [31:0] q;
- output rdfull;
- output rdempty;
- output [10:0] rdusedw;
- output wrfull;
- output wrempty;
- output [10:0] wrusedw;
-
- reg [width-1:0] mem [0:depth-1];
- reg [7:0] rdptr;
- reg [7:0] wrptr;
-
-`ifdef rd_req
- reg [width-1:0] q;
-`else
- wire [width-1:0] q;
-`endif
-
- reg [10:0] rdusedw;
- reg [10:0] wrusedw;
-
- integer i;
-
- always @( aclr)
- begin
- wrptr <= #1 0;
- rdptr <= #1 0;
- for(i=0;i<depth;i=i+1)
- mem[i] <= #1 0;
- end
-
- always @(posedge wrclk)
- if(wrreq)
- begin
- wrptr <= #1 wrptr+1;
- mem[wrptr] <= #1 data;
- end
-
- always @(posedge rdclk)
- if(rdreq)
- begin
- rdptr <= #1 rdptr+1;
-`ifdef rd_req
- q <= #1 mem[rdptr];
-`endif
- end
-
-`ifdef rd_req
-`else
- assign q = mem[rdptr];
-`endif
-
- // Fix these
- always @(posedge wrclk)
- wrusedw <= #1 wrptr - rdptr;
-
- always @(posedge rdclk)
- rdusedw <= #1 wrptr - rdptr;
-
- assign wrempty = (wrusedw == 0);
- assign wrfull = (wrusedw == depth-1);
-
- assign rdempty = (rdusedw == 0);
- assign rdfull = (rdusedw == depth-1);
-
-endmodule // fifo_1c_2k
diff --git a/usrp/fpga/models/fifo_1c_4k.v b/usrp/fpga/models/fifo_1c_4k.v
deleted file mode 100644
index 3e5ddd052..000000000
--- a/usrp/fpga/models/fifo_1c_4k.v
+++ /dev/null
@@ -1,76 +0,0 @@
-// Model of FIFO in Altera
-
-module fifo_1c_4k ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
- parameter width = 32;
- parameter depth = 4096;
- //`define rd_req 0; // Set this to 0 for rd_ack, 1 for rd_req
-
- input [31:0] data;
- input wrreq;
- input rdreq;
- input rdclk;
- input wrclk;
- input aclr;
- output [31:0] q;
- output rdfull;
- output rdempty;
- output [7:0] rdusedw;
- output wrfull;
- output wrempty;
- output [7:0] wrusedw;
-
- reg [width-1:0] mem [0:depth-1];
- reg [7:0] rdptr;
- reg [7:0] wrptr;
-
-`ifdef rd_req
- reg [width-1:0] q;
-`else
- wire [width-1:0] q;
-`endif
-
- reg [7:0] rdusedw;
- reg [7:0] wrusedw;
-
- integer i;
-
- always @( aclr)
- begin
- wrptr <= #1 0;
- rdptr <= #1 0;
- for(i=0;i<depth;i=i+1)
- mem[i] <= #1 0;
- end
-
- always @(posedge wrclk)
- if(wrreq)
- begin
- wrptr <= #1 wrptr+1;
- mem[wrptr] <= #1 data;
- end
-
- always @(posedge rdclk)
- if(rdreq)
- begin
- rdptr <= #1 rdptr+1;
-`ifdef rd_req
- q <= #1 mem[rdptr];
-`endif
- end
-
-`ifdef rd_req
-`else
- assign q = mem[rdptr];
-`endif
-
- // Fix these
- always @(posedge wrclk)
- wrusedw <= #1 wrptr - rdptr;
-
- always @(posedge rdclk)
- rdusedw <= #1 wrptr - rdptr;
-
-
-endmodule // fifo_1c_4k
diff --git a/usrp/fpga/models/fifo_1k.v b/usrp/fpga/models/fifo_1k.v
deleted file mode 100644
index acfa4d176..000000000
--- a/usrp/fpga/models/fifo_1k.v
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-module fifo_1k
- ( input [15:0] data,
- input wrreq,
- input rdreq,
- input rdclk,
- input wrclk,
- input aclr,
- output [15:0] q,
- output rdfull,
- output rdempty,
- output [9:0] rdusedw,
- output wrfull,
- output wrempty,
- output [9:0] wrusedw
- );
-
-fifo #(.width(16),.depth(1024),.addr_bits(10)) fifo_1k
- ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
-endmodule // fifo_1k
-
diff --git a/usrp/fpga/models/fifo_2k.v b/usrp/fpga/models/fifo_2k.v
deleted file mode 100644
index 50cd7811d..000000000
--- a/usrp/fpga/models/fifo_2k.v
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-module fifo_2k
- ( input [15:0] data,
- input wrreq,
- input rdreq,
- input rdclk,
- input wrclk,
- input aclr,
- output [15:0] q,
- output rdfull,
- output rdempty,
- output [10:0] rdusedw,
- output wrfull,
- output wrempty,
- output [10:0] wrusedw
- );
-
-fifo #(.width(16),.depth(2048),.addr_bits(11)) fifo_2k
- ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
-endmodule // fifo_1k
-
diff --git a/usrp/fpga/models/fifo_4k.v b/usrp/fpga/models/fifo_4k.v
deleted file mode 100644
index 1fa4ba0a7..000000000
--- a/usrp/fpga/models/fifo_4k.v
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-module fifo_4k
- ( input [15:0] data,
- input wrreq,
- input rdreq,
- input rdclk,
- input wrclk,
- input aclr,
- output [15:0] q,
- output rdfull,
- output rdempty,
- output [11:0] rdusedw,
- output wrfull,
- output wrempty,
- output [11:0] wrusedw
- );
-
-fifo #(.width(16),.depth(4096),.addr_bits(12)) fifo_4k
- ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
-endmodule // fifo_1k
-
diff --git a/usrp/fpga/models/fifo_4k_18.v b/usrp/fpga/models/fifo_4k_18.v
deleted file mode 100644
index 3efbf74f0..000000000
--- a/usrp/fpga/models/fifo_4k_18.v
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-module fifo_4k_18
- (input [17:0] data,
- input wrreq,
- input wrclk,
- output wrfull,
- output wrempty,
- output [11:0] wrusedw,
-
- output [17:0] q,
- input rdreq,
- input rdclk,
- output rdfull,
- output rdempty,
- output [11:0] rdusedw,
-
- input aclr );
-
-fifo #(.width(18),.depth(4096),.addr_bits(12)) fifo_4k
- ( data, wrreq, rdreq, rdclk, wrclk, aclr, q,
- rdfull, rdempty, rdusedw, wrfull, wrempty, wrusedw);
-
-endmodule // fifo_4k_18
-
-
diff --git a/usrp/fpga/models/pll.v b/usrp/fpga/models/pll.v
deleted file mode 100644
index 1d0cc7966..000000000
--- a/usrp/fpga/models/pll.v
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Very simple model for the PLL in the RX buffer
-
-module pll (inclk0,c0);
-
- input inclk0;
- output c0;
-
- assign c0 = #9 inclk0;
-
-endmodule // pll
-
-
diff --git a/usrp/fpga/models/ssram.v b/usrp/fpga/models/ssram.v
deleted file mode 100644
index fd7339970..000000000
--- a/usrp/fpga/models/ssram.v
+++ /dev/null
@@ -1,38 +0,0 @@
-
-// Model of Pipelined [ZBT] Synchronous SRAM
-
-module ssram(clock,addr,data,wen,ce);
- parameter addrbits = 19;
- parameter depth = 524288;
-
- input clock;
- input [addrbits-1:0] addr;
- inout [35:0] data;
- input wen;
- input ce;
-
- reg [35:0] ram [0:depth-1];
-
- reg read_d1,read_d2;
- reg write_d1,write_d2;
- reg [addrbits-1:0] addr_d1,addr_d2;
-
- always @(posedge clock)
- begin
- read_d1 <= #1 ce & ~wen;
- write_d1 <= #1 ce & wen;
- addr_d1 <= #1 addr;
- read_d2 <= #1 read_d1;
- write_d2 <= #1 write_d1;
- addr_d2 <= #1 addr_d1;
- if(write_d2)
- ram[addr_d2] = data;
- end // always @ (posedge clock)
-
- data = (ce & read_d2) ? ram[addr_d2] : 36'bz;
-
- always @(posedge clock)
- if(~ce & (write_d2 | write_d1 | wen))
- $display("$time ERROR: RAM CE not asserted during write cycle");
-
-endmodule // ssram
diff --git a/usrp/fpga/sdr_lib/.gitignore b/usrp/fpga/sdr_lib/.gitignore
deleted file mode 100644
index e7fc78c42..000000000
--- a/usrp/fpga/sdr_lib/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/db
-/*.vcd
diff --git a/usrp/fpga/sdr_lib/adc_interface.v b/usrp/fpga/sdr_lib/adc_interface.v
deleted file mode 100644
index f18ffc104..000000000
--- a/usrp/fpga/sdr_lib/adc_interface.v
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-`include "../../firmware/include/fpga_regs_common.v"
-`include "../../firmware/include/fpga_regs_standard.v"
-
-module adc_interface
- (input clock, input reset, input enable,
- input wire [6:0] serial_addr, input wire [31:0] serial_data, input serial_strobe,
- input wire [11:0] rx_a_a, input wire [11:0] rx_b_a, input wire [11:0] rx_a_b, input wire [11:0] rx_b_b,
- output wire [31:0] rssi_0, output wire [31:0] rssi_1, output wire [31:0] rssi_2, output wire [31:0] rssi_3,
- output reg [15:0] ddc0_in_i, output reg [15:0] ddc0_in_q,
- output reg [15:0] ddc1_in_i, output reg [15:0] ddc1_in_q,
- output reg [15:0] ddc2_in_i, output reg [15:0] ddc2_in_q,
- output reg [15:0] ddc3_in_i, output reg [15:0] ddc3_in_q,
- output wire [3:0] rx_numchan);
-
- // Buffer at input to chip
- reg [11:0] adc0,adc1,adc2,adc3;
- always @(posedge clock)
- begin
- adc0 <= #1 rx_a_a;
- adc1 <= #1 rx_b_a;
- adc2 <= #1 rx_a_b;
- adc3 <= #1 rx_b_b;
- end
-
- // then scale and subtract dc offset
- wire [3:0] dco_en;
- wire [15:0] adc0_corr,adc1_corr,adc2_corr,adc3_corr;
-
- setting_reg #(`FR_DC_OFFSET_CL_EN) sr_dco_en(.clock(clock),.reset(reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(dco_en));
-
- rx_dcoffset #(`FR_ADC_OFFSET_0) rx_dcoffset0(.clock(clock),.enable(dco_en[0]),.reset(reset),.adc_in({adc0[11],adc0,3'b0}),.adc_out(adc0_corr),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
- rx_dcoffset #(`FR_ADC_OFFSET_1) rx_dcoffset1(.clock(clock),.enable(dco_en[1]),.reset(reset),.adc_in({adc1[11],adc1,3'b0}),.adc_out(adc1_corr),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
- rx_dcoffset #(`FR_ADC_OFFSET_2) rx_dcoffset2(.clock(clock),.enable(dco_en[2]),.reset(reset),.adc_in({adc2[11],adc2,3'b0}),.adc_out(adc2_corr),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
- rx_dcoffset #(`FR_ADC_OFFSET_3) rx_dcoffset3(.clock(clock),.enable(dco_en[3]),.reset(reset),.adc_in({adc3[11],adc3,3'b0}),.adc_out(adc3_corr),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
-
- // Level sensing for AGC
- rssi rssi_block_0 (.clock(clock),.reset(reset),.enable(enable),.adc(adc0),.rssi(rssi_0[15:0]),.over_count(rssi_0[31:16]));
- rssi rssi_block_1 (.clock(clock),.reset(reset),.enable(enable),.adc(adc1),.rssi(rssi_1[15:0]),.over_count(rssi_1[31:16]));
- rssi rssi_block_2 (.clock(clock),.reset(reset),.enable(enable),.adc(adc2),.rssi(rssi_2[15:0]),.over_count(rssi_2[31:16]));
- rssi rssi_block_3 (.clock(clock),.reset(reset),.enable(enable),.adc(adc3),.rssi(rssi_3[15:0]),.over_count(rssi_3[31:16]));
-
- // And mux to the appropriate outputs
- wire [3:0] ddc3mux,ddc2mux,ddc1mux,ddc0mux;
- wire rx_realsignals;
-
- setting_reg #(`FR_RX_MUX) sr_rxmux(.clock(clock),.reset(reset),.strobe(serial_strobe),.addr(serial_addr),
- .in(serial_data),.out({ddc3mux,ddc2mux,ddc1mux,ddc0mux,rx_realsignals,rx_numchan[3:1]}));
- assign rx_numchan[0] = 1'b0;
-
- always @(posedge clock)
- begin
- ddc0_in_i <= #1 ddc0mux[1] ? (ddc0mux[0] ? adc3_corr : adc2_corr) : (ddc0mux[0] ? adc1_corr : adc0_corr);
- ddc0_in_q <= #1 rx_realsignals ? 16'd0 : ddc0mux[3] ? (ddc0mux[2] ? adc3_corr : adc2_corr) : (ddc0mux[2] ? adc1_corr : adc0_corr);
- ddc1_in_i <= #1 ddc1mux[1] ? (ddc1mux[0] ? adc3_corr : adc2_corr) : (ddc1mux[0] ? adc1_corr : adc0_corr);
- ddc1_in_q <= #1 rx_realsignals ? 16'd0 : ddc1mux[3] ? (ddc1mux[2] ? adc3_corr : adc2_corr) : (ddc1mux[2] ? adc1_corr : adc0_corr);
- ddc2_in_i <= #1 ddc2mux[1] ? (ddc2mux[0] ? adc3_corr : adc2_corr) : (ddc2mux[0] ? adc1_corr : adc0_corr);
- ddc2_in_q <= #1 rx_realsignals ? 16'd0 : ddc2mux[3] ? (ddc2mux[2] ? adc3_corr : adc2_corr) : (ddc2mux[2] ? adc1_corr : adc0_corr);
- ddc3_in_i <= #1 ddc3mux[1] ? (ddc3mux[0] ? adc3_corr : adc2_corr) : (ddc3mux[0] ? adc1_corr : adc0_corr);
- ddc3_in_q <= #1 rx_realsignals ? 16'd0 : ddc3mux[3] ? (ddc3mux[2] ? adc3_corr : adc2_corr) : (ddc3mux[2] ? adc1_corr : adc0_corr);
- end
-
-endmodule // adc_interface
-
-
diff --git a/usrp/fpga/sdr_lib/atr_delay.v b/usrp/fpga/sdr_lib/atr_delay.v
deleted file mode 100644
index bbba9e291..000000000
--- a/usrp/fpga/sdr_lib/atr_delay.v
+++ /dev/null
@@ -1,83 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2007 Corgan Enterprises LLC
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module atr_delay(clk_i,rst_i,ena_i,tx_empty_i,tx_delay_i,rx_delay_i,atr_tx_o);
- input clk_i;
- input rst_i;
- input ena_i;
- input tx_empty_i;
- input [11:0] tx_delay_i;
- input [11:0] rx_delay_i;
- output atr_tx_o;
-
- reg [3:0] state;
- reg [11:0] count;
-
- `define ST_RX_DELAY 4'b0001
- `define ST_RX 4'b0010
- `define ST_TX_DELAY 4'b0100
- `define ST_TX 4'b1000
-
- always @(posedge clk_i)
- if (rst_i | ~ena_i)
- begin
- state <= `ST_RX;
- count <= 12'b0;
- end
- else
- case (state)
- `ST_RX:
- if (!tx_empty_i)
- begin
- state <= `ST_TX_DELAY;
- count <= tx_delay_i;
- end
-
- `ST_TX_DELAY:
- if (count == 0)
- state <= `ST_TX;
- else
- count <= count - 1;
-
- `ST_TX:
- if (tx_empty_i)
- begin
- state <= `ST_RX_DELAY;
- count <= rx_delay_i;
- end
-
- `ST_RX_DELAY:
- if (count == 0)
- state <= `ST_RX;
- else
- count <= count - 1;
-
- default: // Error
- begin
- state <= `ST_RX;
- count <= 0;
- end
- endcase
-
- assign atr_tx_o = (state == `ST_TX) | (state == `ST_RX_DELAY);
-
-endmodule // atr_delay
-
diff --git a/usrp/fpga/sdr_lib/bidir_reg.v b/usrp/fpga/sdr_lib/bidir_reg.v
deleted file mode 100644
index b12441252..000000000
--- a/usrp/fpga/sdr_lib/bidir_reg.v
+++ /dev/null
@@ -1,29 +0,0 @@
-// Bidirectional registers
-
-module bidir_reg
- ( inout wire [15:0] tristate,
- input wire [15:0] oe,
- input wire [15:0] reg_val );
-
- // This would be much cleaner if all the tools
- // supported "for generate"........
-
- assign tristate[0] = oe[0] ? reg_val[0] : 1'bz;
- assign tristate[1] = oe[1] ? reg_val[1] : 1'bz;
- assign tristate[2] = oe[2] ? reg_val[2] : 1'bz;
- assign tristate[3] = oe[3] ? reg_val[3] : 1'bz;
- assign tristate[4] = oe[4] ? reg_val[4] : 1'bz;
- assign tristate[5] = oe[5] ? reg_val[5] : 1'bz;
- assign tristate[6] = oe[6] ? reg_val[6] : 1'bz;
- assign tristate[7] = oe[7] ? reg_val[7] : 1'bz;
- assign tristate[8] = oe[8] ? reg_val[8] : 1'bz;
- assign tristate[9] = oe[9] ? reg_val[9] : 1'bz;
- assign tristate[10] = oe[10] ? reg_val[10] : 1'bz;
- assign tristate[11] = oe[11] ? reg_val[11] : 1'bz;
- assign tristate[12] = oe[12] ? reg_val[12] : 1'bz;
- assign tristate[13] = oe[13] ? reg_val[13] : 1'bz;
- assign tristate[14] = oe[14] ? reg_val[14] : 1'bz;
- assign tristate[15] = oe[15] ? reg_val[15] : 1'bz;
-
-endmodule // bidir_reg
-
diff --git a/usrp/fpga/sdr_lib/cic_dec_shifter.v b/usrp/fpga/sdr_lib/cic_dec_shifter.v
deleted file mode 100644
index a213303c8..000000000
--- a/usrp/fpga/sdr_lib/cic_dec_shifter.v
+++ /dev/null
@@ -1,100 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// NOTE This only works for N=4, max decim rate of 128
-// NOTE signal "rate" is ONE LESS THAN the actual rate
-
-module cic_dec_shifter(rate,signal_in,signal_out);
- parameter bw = 16;
- parameter maxbitgain = 28;
-
- input [7:0] rate;
- input wire [bw+maxbitgain-1:0] signal_in;
- output reg [bw-1:0] signal_out;
-
- function [4:0] bitgain;
- input [7:0] rate;
- case(rate)
- // Exact Cases -- N*log2(rate)
- 8'd4 : bitgain = 8;
- 8'd8 : bitgain = 12;
- 8'd16 : bitgain = 16;
- 8'd32 : bitgain = 20;
- 8'd64 : bitgain = 24;
- 8'd128 : bitgain = 28;
-
- // Nearest without overflow -- ceil(N*log2(rate))
- 8'd5 : bitgain = 10;
- 8'd6 : bitgain = 11;
- 8'd7 : bitgain = 12;
- 8'd9 : bitgain = 13;
- 8'd10,8'd11 : bitgain = 14;
- 8'd12,8'd13 : bitgain = 15;
- 8'd14,8'd15 : bitgain = 16;
- 8'd17,8'd18,8'd19 : bitgain = 17;
- 8'd20,8'd21,8'd22 : bitgain = 18;
- 8'd23,8'd24,8'd25,8'd26 : bitgain = 19;
- 8'd27,8'd28,8'd29,8'd30,8'd31 : bitgain = 20;
- 8'd33,8'd34,8'd35,8'd36,8'd37,8'd38 : bitgain = 21;
- 8'd39,8'd40,8'd41,8'd42,8'd43,8'd44,8'd45 : bitgain = 22;
- 8'd46,8'd47,8'd48,8'd49,8'd50,8'd51,8'd52,8'd53 : bitgain = 23;
- 8'd54,8'd55,8'd56,8'd57,8'd58,8'd59,8'd60,8'd61,8'd62,8'd63 : bitgain = 24;
- 8'd65,8'd66,8'd67,8'd68,8'd69,8'd70,8'd71,8'd72,8'd73,8'd74,8'd75,8'd76 : bitgain = 25;
- 8'd77,8'd78,8'd79,8'd80,8'd81,8'd82,8'd83,8'd84,8'd85,8'd86,8'd87,8'd88,8'd89,8'd90 : bitgain = 26;
- 8'd91,8'd92,8'd93,8'd94,8'd95,8'd96,8'd97,8'd98,8'd99,8'd100,8'd101,8'd102,8'd103,8'd104,8'd105,8'd106,8'd107 : bitgain = 27;
- default : bitgain = 28;
- endcase // case(rate)
- endfunction // bitgain
-
- wire [4:0] shift = bitgain(rate+1);
-
- // We should be able to do this, but can't ....
- // assign signal_out = signal_in[shift+bw-1:shift];
-
- always @*
- case(shift)
- 5'd8 : signal_out = signal_in[8+bw-1:8];
- 5'd10 : signal_out = signal_in[10+bw-1:10];
- 5'd11 : signal_out = signal_in[11+bw-1:11];
- 5'd12 : signal_out = signal_in[12+bw-1:12];
- 5'd13 : signal_out = signal_in[13+bw-1:13];
- 5'd14 : signal_out = signal_in[14+bw-1:14];
- 5'd15 : signal_out = signal_in[15+bw-1:15];
- 5'd16 : signal_out = signal_in[16+bw-1:16];
- 5'd17 : signal_out = signal_in[17+bw-1:17];
- 5'd18 : signal_out = signal_in[18+bw-1:18];
- 5'd19 : signal_out = signal_in[19+bw-1:19];
- 5'd20 : signal_out = signal_in[20+bw-1:20];
- 5'd21 : signal_out = signal_in[21+bw-1:21];
- 5'd22 : signal_out = signal_in[22+bw-1:22];
- 5'd23 : signal_out = signal_in[23+bw-1:23];
- 5'd24 : signal_out = signal_in[24+bw-1:24];
- 5'd25 : signal_out = signal_in[25+bw-1:25];
- 5'd26 : signal_out = signal_in[26+bw-1:26];
- 5'd27 : signal_out = signal_in[27+bw-1:27];
- 5'd28 : signal_out = signal_in[28+bw-1:28];
-
- default : signal_out = signal_in[28+bw-1:28];
- endcase // case(shift)
-
-endmodule // cic_dec_shifter
-
diff --git a/usrp/fpga/sdr_lib/cic_decim.v b/usrp/fpga/sdr_lib/cic_decim.v
deleted file mode 100755
index 8c44f006d..000000000
--- a/usrp/fpga/sdr_lib/cic_decim.v
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-module cic_decim
- ( clock,reset,enable,rate,strobe_in,strobe_out,signal_in,signal_out);
- parameter bw = 16;
- parameter N = 4;
- parameter log2_of_max_rate = 7;
- parameter maxbitgain = N * log2_of_max_rate;
-
- input clock;
- input reset;
- input enable;
- input [7:0] rate;
- input strobe_in,strobe_out;
- input [bw-1:0] signal_in;
- output [bw-1:0] signal_out;
- reg [bw-1:0] signal_out;
- wire [bw-1:0] signal_out_unreg;
-
- wire [bw+maxbitgain-1:0] signal_in_ext;
- reg [bw+maxbitgain-1:0] integrator [0:N-1];
- reg [bw+maxbitgain-1:0] differentiator [0:N-1];
- reg [bw+maxbitgain-1:0] pipeline [0:N-1];
- reg [bw+maxbitgain-1:0] sampler;
-
- integer i;
-
- sign_extend #(bw,bw+maxbitgain)
- ext_input (.in(signal_in),.out(signal_in_ext));
-
- always @(posedge clock)
- if(reset)
- for(i=0;i<N;i=i+1)
- integrator[i] <= #1 0;
- else if (enable && strobe_in)
- begin
- integrator[0] <= #1 integrator[0] + signal_in_ext;
- for(i=1;i<N;i=i+1)
- integrator[i] <= #1 integrator[i] + integrator[i-1];
- end
-
- always @(posedge clock)
- if(reset)
- begin
- sampler <= #1 0;
- for(i=0;i<N;i=i+1)
- begin
- pipeline[i] <= #1 0;
- differentiator[i] <= #1 0;
- end
- end
- else if (enable && strobe_out)
- begin
- sampler <= #1 integrator[N-1];
- differentiator[0] <= #1 sampler;
- pipeline[0] <= #1 sampler - differentiator[0];
- for(i=1;i<N;i=i+1)
- begin
- differentiator[i] <= #1 pipeline[i-1];
- pipeline[i] <= #1 pipeline[i-1] - differentiator[i];
- end
- end // if (enable && strobe_out)
-
- wire [bw+maxbitgain-1:0] signal_out_unnorm = pipeline[N-1];
-
- cic_dec_shifter #(bw)
- cic_dec_shifter(rate,signal_out_unnorm,signal_out_unreg);
-
- always @(posedge clock)
- signal_out <= #1 signal_out_unreg;
-
-endmodule // cic_decim
-
diff --git a/usrp/fpga/sdr_lib/cic_int_shifter.v b/usrp/fpga/sdr_lib/cic_int_shifter.v
deleted file mode 100644
index a8a3276f1..000000000
--- a/usrp/fpga/sdr_lib/cic_int_shifter.v
+++ /dev/null
@@ -1,94 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// NOTE This only works for N=4, max interp rate of 128
-// NOTE signal "rate" is ONE LESS THAN the actual rate
-
-module cic_int_shifter(rate,signal_in,signal_out);
- parameter bw = 16;
- parameter maxbitgain = 21;
-
- input [7:0] rate;
- input wire [bw+maxbitgain-1:0] signal_in;
- output reg [bw-1:0] signal_out;
-
- function [4:0] bitgain;
- input [7:0] rate;
- case(rate)
- // Exact Cases
- 8'd4 : bitgain = 6;
- 8'd8 : bitgain = 9;
- 8'd16 : bitgain = 12;
- 8'd32 : bitgain = 15;
- 8'd64 : bitgain = 18;
- 8'd128 : bitgain = 21;
-
- // Nearest without overflow
- 8'd5 : bitgain = 7;
- 8'd6 : bitgain = 8;
- 8'd7 : bitgain = 9;
- 8'd9,8'd10 : bitgain = 10;
- 8'd11,8'd12 : bitgain = 11;
- 8'd13,8'd14,8'd15 : bitgain = 12;
- 8'd17,8'd18,8'd19,8'd20 : bitgain = 13;
- 8'd21,8'd22,8'd23,8'd24,8'd25 : bitgain = 14;
- 8'd26,8'd27,8'd28,8'd29,8'd30,8'd31 : bitgain = 15;
- 8'd33,8'd34,8'd35,8'd36,8'd37,8'd38,8'd39,8'd40 : bitgain = 16;
- 8'd41,8'd42,8'd43,8'd44,8'd45,8'd46,8'd47,8'd48,8'd49,8'd50 : bitgain = 17;
- 8'd51,8'd52,8'd53,8'd54,8'd55,8'd56,8'd57,8'd58,8'd59,8'd60,8'd61,8'd62,8'd63 : bitgain = 18;
- 8'd65,8'd66,8'd67,8'd68,8'd69,8'd70,8'd71,8'd72,8'd73,8'd74,8'd75,8'd76,8'd77,8'd78,8'd79,8'd80 : bitgain = 19;
- 8'd81,8'd82,8'd83,8'd84,8'd85,8'd86,8'd87,8'd88,8'd89,8'd90,8'd91,8'd92,8'd93,8'd94,8'd95,8'd96,8'd97,8'd98,8'd99,8'd100,8'd101 : bitgain = 20;
-
- default : bitgain = 21;
- endcase // case(rate)
- endfunction // bitgain
-
- wire [4:0] shift = bitgain(rate+1);
-
- // We should be able to do this, but can't ....
- // assign signal_out = signal_in[shift+bw-1:shift];
-
- always @*
- case(shift)
- 5'd6 : signal_out = signal_in[6+bw-1:6];
- 5'd9 : signal_out = signal_in[9+bw-1:9];
- 5'd12 : signal_out = signal_in[12+bw-1:12];
- 5'd15 : signal_out = signal_in[15+bw-1:15];
- 5'd18 : signal_out = signal_in[18+bw-1:18];
- 5'd21 : signal_out = signal_in[21+bw-1:21];
-
- 5'd7 : signal_out = signal_in[7+bw-1:7];
- 5'd8 : signal_out = signal_in[8+bw-1:8];
- 5'd10 : signal_out = signal_in[10+bw-1:10];
- 5'd11 : signal_out = signal_in[11+bw-1:11];
- 5'd13 : signal_out = signal_in[13+bw-1:13];
- 5'd14 : signal_out = signal_in[14+bw-1:14];
- 5'd16 : signal_out = signal_in[16+bw-1:16];
- 5'd17 : signal_out = signal_in[17+bw-1:17];
- 5'd19 : signal_out = signal_in[19+bw-1:19];
- 5'd20 : signal_out = signal_in[20+bw-1:20];
-
- default : signal_out = signal_in[21+bw-1:21];
- endcase // case(shift)
-
-endmodule // cic_int_shifter
-
diff --git a/usrp/fpga/sdr_lib/cic_interp.v b/usrp/fpga/sdr_lib/cic_interp.v
deleted file mode 100755
index 32d106861..000000000
--- a/usrp/fpga/sdr_lib/cic_interp.v
+++ /dev/null
@@ -1,90 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-module cic_interp(clock,reset,enable,rate,strobe_in,strobe_out,signal_in,signal_out);
- parameter bw = 16;
- parameter N = 4;
- parameter log2_of_max_rate = 7;
- parameter maxbitgain = (N-1)*log2_of_max_rate;
-
- input clock;
- input reset;
- input enable;
- input [7:0] rate;
- input strobe_in,strobe_out;
- input [bw-1:0] signal_in;
- wire [bw-1:0] signal_in;
- output [bw-1:0] signal_out;
- wire [bw-1:0] signal_out;
-
- wire [bw+maxbitgain-1:0] signal_in_ext;
- reg [bw+maxbitgain-1:0] integrator [0:N-1];
- reg [bw+maxbitgain-1:0] differentiator [0:N-1];
- reg [bw+maxbitgain-1:0] pipeline [0:N-1];
-
- integer i;
-
- sign_extend #(bw,bw+maxbitgain)
- ext_input (.in(signal_in),.out(signal_in_ext));
-
- wire clear_me = reset | ~enable;
- //FIXME Note that this section has pipe and diff reversed
- // It still works, but is confusing
- always @(posedge clock)
- if(clear_me)
- for(i=0;i<N;i=i+1)
- integrator[i] <= #1 0;
- else if (enable & strobe_out)
- begin
- if(strobe_in)
- integrator[0] <= #1 integrator[0] + pipeline[N-1];
- for(i=1;i<N;i=i+1)
- integrator[i] <= #1 integrator[i] + integrator[i-1];
- end
-
- always @(posedge clock)
- if(clear_me)
- begin
- for(i=0;i<N;i=i+1)
- begin
- differentiator[i] <= #1 0;
- pipeline[i] <= #1 0;
- end
- end
- else if (enable && strobe_in)
- begin
- differentiator[0] <= #1 signal_in_ext;
- pipeline[0] <= #1 signal_in_ext - differentiator[0];
- for(i=1;i<N;i=i+1)
- begin
- differentiator[i] <= #1 pipeline[i-1];
- pipeline[i] <= #1 pipeline[i-1] - differentiator[i];
- end
- end
-
- wire [bw+maxbitgain-1:0] signal_out_unnorm = integrator[N-1];
-
- cic_int_shifter #(bw)
- cic_int_shifter(rate,signal_out_unnorm,signal_out);
-
-endmodule // cic_interp
-
diff --git a/usrp/fpga/sdr_lib/clk_divider.v b/usrp/fpga/sdr_lib/clk_divider.v
deleted file mode 100755
index fdef234d2..000000000
--- a/usrp/fpga/sdr_lib/clk_divider.v
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-module clk_divider(input reset, input wire in_clk,output reg out_clk, input [7:0] ratio);
- reg [7:0] counter;
-
- // FIXME maybe should use PLL or switch to double edge version
-
- always @(posedge in_clk or posedge reset)
- if(reset)
- counter <= #1 8'd0;
- else if(counter == 0)
- counter <= #1 ratio[7:1] + (ratio[0] & out_clk) - 8'b1;
- else
- counter <= #1 counter-8'd1;
-
- always @(posedge in_clk or posedge reset)
- if(reset)
- out_clk <= #1 1'b0;
- else if(counter == 0)
- out_clk <= #1 ~out_clk;
-
-endmodule // clk_divider
-
diff --git a/usrp/fpga/sdr_lib/cordic.v b/usrp/fpga/sdr_lib/cordic.v
deleted file mode 100755
index ea4119426..000000000
--- a/usrp/fpga/sdr_lib/cordic.v
+++ /dev/null
@@ -1,109 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module cordic(clock, reset, enable, xi, yi, zi, xo, yo, zo );
- parameter bitwidth = 16;
- parameter zwidth = 16;
-
- input clock;
- input reset;
- input enable;
- input [bitwidth-1:0] xi, yi;
- output [bitwidth-1:0] xo, yo;
- input [zwidth-1:0] zi;
- output [zwidth-1:0] zo;
-
- reg [bitwidth+1:0] x0,y0;
- reg [zwidth-2:0] z0;
- wire [bitwidth+1:0] x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12;
- wire [bitwidth+1:0] y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12;
- wire [zwidth-2:0] z1,z2,z3,z4,z5,z6,z7,z8,z9,z10,z11,z12;
-
- wire [bitwidth+1:0] xi_ext = {{2{xi[bitwidth-1]}},xi};
- wire [bitwidth+1:0] yi_ext = {{2{yi[bitwidth-1]}},yi};
-
- // Compute consts. Would be easier if vlog had atan...
- // see gen_cordic_consts.py
-
-`define c00 16'd8192
-`define c01 16'd4836
-`define c02 16'd2555
-`define c03 16'd1297
-`define c04 16'd651
-`define c05 16'd326
-`define c06 16'd163
-`define c07 16'd81
-`define c08 16'd41
-`define c09 16'd20
-`define c10 16'd10
-`define c11 16'd5
-`define c12 16'd3
-`define c13 16'd1
-`define c14 16'd1
-`define c15 16'd0
-`define c16 16'd0
-
- always @(posedge clock)
- if(reset)
- begin
- x0 <= #1 0; y0 <= #1 0; z0 <= #1 0;
- end
- else if(enable)
- begin
- z0 <= #1 zi[zwidth-2:0];
- case (zi[zwidth-1:zwidth-2])
- 2'b00, 2'b11 :
- begin
- x0 <= #1 xi_ext;
- y0 <= #1 yi_ext;
- end
- 2'b01, 2'b10 :
- begin
- x0 <= #1 -xi_ext;
- y0 <= #1 -yi_ext;
- end
- endcase // case(zi[zwidth-1:zwidth-2])
- end // else: !if(reset)
-
- // FIXME need to handle variable number of stages
- // FIXME should be able to narrow zwidth but quartus makes it bigger...
- // This would be easier if arrays worked better in vlog...
- cordic_stage #(bitwidth+2,zwidth-1,0) cordic_stage0 (clock,reset,enable,x0,y0,z0,`c00,x1,y1,z1);
- cordic_stage #(bitwidth+2,zwidth-1,1) cordic_stage1 (clock,reset,enable,x1,y1,z1,`c01,x2,y2,z2);
- cordic_stage #(bitwidth+2,zwidth-1,2) cordic_stage2 (clock,reset,enable,x2,y2,z2,`c02,x3,y3,z3);
- cordic_stage #(bitwidth+2,zwidth-1,3) cordic_stage3 (clock,reset,enable,x3,y3,z3,`c03,x4,y4,z4);
- cordic_stage #(bitwidth+2,zwidth-1,4) cordic_stage4 (clock,reset,enable,x4,y4,z4,`c04,x5,y5,z5);
- cordic_stage #(bitwidth+2,zwidth-1,5) cordic_stage5 (clock,reset,enable,x5,y5,z5,`c05,x6,y6,z6);
- cordic_stage #(bitwidth+2,zwidth-1,6) cordic_stage6 (clock,reset,enable,x6,y6,z6,`c06,x7,y7,z7);
- cordic_stage #(bitwidth+2,zwidth-1,7) cordic_stage7 (clock,reset,enable,x7,y7,z7,`c07,x8,y8,z8);
- cordic_stage #(bitwidth+2,zwidth-1,8) cordic_stage8 (clock,reset,enable,x8,y8,z8,`c08,x9,y9,z9);
- cordic_stage #(bitwidth+2,zwidth-1,9) cordic_stage9 (clock,reset,enable,x9,y9,z9,`c09,x10,y10,z10);
- cordic_stage #(bitwidth+2,zwidth-1,10) cordic_stage10 (clock,reset,enable,x10,y10,z10,`c10,x11,y11,z11);
- cordic_stage #(bitwidth+2,zwidth-1,11) cordic_stage11 (clock,reset,enable,x11,y11,z11,`c11,x12,y12,z12);
-
- assign xo = x12[bitwidth:1];
- assign yo = y12[bitwidth:1];
- //assign xo = x12[bitwidth+1:2]; // CORDIC gain is ~1.6, plus gain from rotating vectors
- //assign yo = y12[bitwidth+1:2];
- assign zo = z12;
-
-endmodule // cordic
-
diff --git a/usrp/fpga/sdr_lib/cordic_stage.v b/usrp/fpga/sdr_lib/cordic_stage.v
deleted file mode 100755
index d44998b0d..000000000
--- a/usrp/fpga/sdr_lib/cordic_stage.v
+++ /dev/null
@@ -1,60 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module cordic_stage( clock, reset, enable, xi,yi,zi,constant,xo,yo,zo);
- parameter bitwidth = 16;
- parameter zwidth = 16;
- parameter shift = 1;
-
- input clock;
- input reset;
- input enable;
- input [bitwidth-1:0] xi,yi;
- input [zwidth-1:0] zi;
- input [zwidth-1:0] constant;
- output [bitwidth-1:0] xo,yo;
- output [zwidth-1:0] zo;
-
- wire z_is_pos = ~zi[zwidth-1];
-
- reg [bitwidth-1:0] xo,yo;
- reg [zwidth-1:0] zo;
-
- always @(posedge clock)
- if(reset)
- begin
- xo <= #1 0;
- yo <= #1 0;
- zo <= #1 0;
- end
- else if(enable)
- begin
- xo <= #1 z_is_pos ?
- xi - {{shift+1{yi[bitwidth-1]}},yi[bitwidth-2:shift]} :
- xi + {{shift+1{yi[bitwidth-1]}},yi[bitwidth-2:shift]};
- yo <= #1 z_is_pos ?
- yi + {{shift+1{xi[bitwidth-1]}},xi[bitwidth-2:shift]} :
- yi - {{shift+1{xi[bitwidth-1]}},xi[bitwidth-2:shift]};
- zo <= #1 z_is_pos ?
- zi - constant :
- zi + constant;
- end
-endmodule
diff --git a/usrp/fpga/sdr_lib/ddc.v b/usrp/fpga/sdr_lib/ddc.v
deleted file mode 100755
index 0d4da9bbc..000000000
--- a/usrp/fpga/sdr_lib/ddc.v
+++ /dev/null
@@ -1,97 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-// DDC block
-
-module ddc(input clock,
- input reset,
- input enable,
- input [3:0] rate1,
- input [3:0] rate2,
- output strobe,
- input [31:0] freq,
- input [15:0] i_in,
- input [15:0] q_in,
- output [15:0] i_out,
- output [15:0] q_out
- );
- parameter bw = 16;
- parameter zw = 16;
-
- wire [15:0] i_cordic_out, q_cordic_out;
- wire [31:0] phase;
-
- wire strobe1, strobe2;
- reg [3:0] strobe_ctr1,strobe_ctr2;
-
- always @(posedge clock)
- if(reset | ~enable)
- strobe_ctr2 <= #1 4'd0;
- else if(strobe2)
- strobe_ctr2 <= #1 4'd0;
- else
- strobe_ctr2 <= #1 strobe_ctr2 + 4'd1;
-
- always @(posedge clock)
- if(reset | ~enable)
- strobe_ctr1 <= #1 4'd0;
- else if(strobe1)
- strobe_ctr1 <= #1 4'd0;
- else if(strobe2)
- strobe_ctr1 <= #1 strobe_ctr1 + 4'd1;
-
-
- assign strobe2 = enable & ( strobe_ctr2 == rate2 );
- assign strobe1 = strobe2 & ( strobe_ctr1 == rate1 );
-
- assign strobe = strobe1;
-
- function [2:0] log_ceil;
- input [3:0] val;
-
- log_ceil = val[3] ? 3'd4 : val[2] ? 3'd3 : val[1] ? 3'd2 : 3'd1;
- endfunction
-
- wire [2:0] shift1 = log_ceil(rate1);
- wire [2:0] shift2 = log_ceil(rate2);
-
- cordic #(.bitwidth(bw),.zwidth(zw),.stages(16))
- cordic(.clock(clock), .reset(reset), .enable(enable),
- .xi(i_in), .yi(q_in), .zi(phase[31:32-zw]),
- .xo(i_cordic_out), .yo(q_cordic_out), .zo() );
-
- cic_decim_2stage #(.bw(bw),.N(4))
- decim_i(.clock(clock),.reset(reset),.enable(enable),
- .strobe1(1'b1),.strobe2(strobe2),.strobe3(strobe1),.shift1(shift2),.shift2(shift1),
- .signal_in(i_cordic_out),.signal_out(i_out));
-
- cic_decim_2stage #(.bw(bw),.N(4))
- decim_q(.clock(clock),.reset(reset),.enable(enable),
- .strobe1(1'b1),.strobe2(strobe2),.strobe3(strobe1),.shift1(shift2),.shift2(shift1),
- .signal_in(q_cordic_out),.signal_out(q_out));
-
- phase_acc #(.resolution(32))
- nco (.clk(clock),.reset(reset),.enable(enable),
- .freq(freq),.phase(phase));
-
-endmodule
diff --git a/usrp/fpga/sdr_lib/dpram.v b/usrp/fpga/sdr_lib/dpram.v
deleted file mode 100644
index 28af90163..000000000
--- a/usrp/fpga/sdr_lib/dpram.v
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-module dpram(wclk,wdata,waddr,wen,rclk,rdata,raddr);
- parameter depth = 4;
- parameter width = 16;
- parameter size = 16;
-
- input wclk;
- input [width-1:0] wdata;
- input [depth-1:0] waddr;
- input wen;
-
- input rclk;
- output reg [width-1:0] rdata;
- input [depth-1:0] raddr;
-
- reg [width-1:0] ram [0:size-1];
-
- always @(posedge wclk)
- if(wen)
- ram[waddr] <= #1 wdata;
-
- always @(posedge rclk)
- rdata <= #1 ram[raddr];
-
-endmodule // dpram
diff --git a/usrp/fpga/sdr_lib/duc.v b/usrp/fpga/sdr_lib/duc.v
deleted file mode 100755
index 6dac95b49..000000000
--- a/usrp/fpga/sdr_lib/duc.v
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// DUC block
-
-module duc(input clock,
- input reset,
- input enable,
- input [3:0] rate1,
- input [3:0] rate2,
- output strobe,
- input [31:0] freq,
- input [15:0] i_in,
- input [15:0] q_in,
- output [15:0] i_out,
- output [15:0] q_out
- );
- parameter bw = 16;
- parameter zw = 16;
-
- wire [15:0] i_interp_out, q_interp_out;
- wire [31:0] phase;
-
- wire strobe1, strobe2;
- reg [3:0] strobe_ctr1,strobe_ctr2;
-
- always @(posedge clock)
- if(reset | ~enable)
- strobe_ctr2 <= #1 4'd0;
- else if(strobe2)
- strobe_ctr2 <= #1 4'd0;
- else
- strobe_ctr2 <= #1 strobe_ctr2 + 4'd1;
-
- always @(posedge clock)
- if(reset | ~enable)
- strobe_ctr1 <= #1 4'd0;
- else if(strobe1)
- strobe_ctr1 <= #1 4'd0;
- else if(strobe2)
- strobe_ctr1 <= #1 strobe_ctr1 + 4'd1;
-
-
- assign strobe2 = enable & ( strobe_ctr2 == rate2 );
- assign strobe1 = strobe2 & ( strobe_ctr1 == rate1 );
-
- assign strobe = strobe1;
-
- function [2:0] log_ceil;
- input [3:0] val;
-
- log_ceil = val[3] ? 3'd4 : val[2] ? 3'd3 : val[1] ? 3'd2 : 3'd1;
- endfunction
-
- wire [2:0] shift1 = log_ceil(rate1);
- wire [2:0] shift2 = log_ceil(rate2);
-
- cordic #(.bitwidth(bw),.zwidth(zw),.stages(16))
- cordic(.clock(clock), .reset(reset), .enable(enable),
- .xi(i_interp_out), .yi(q_interp_out), .zi(phase[31:32-zw]),
- .xo(i_out), .yo(q_out), .zo() );
-
- cic_interp_2stage #(.bw(bw),.N(4))
- interp_i(.clock(clock),.reset(reset),.enable(enable),
- .strobe1(strobe1),.strobe2(strobe2),.strobe3(1'b1),.shift1(shift1),.shift2(shift2),
- .signal_in(i_in),.signal_out(i_interp_out));
-
- cic_interp_2stage #(.bw(bw),.N(4))
- interp_q(.clock(clock),.reset(reset),.enable(enable),
- .strobe1(strobe1),.strobe2(strobe2),.strobe3(1'b1),.shift1(shift1),.shift2(shift2),
- .signal_in(q_in),.signal_out(q_interp_out));
-
- phase_acc #(.resolution(32))
- nco (.clk(clock),.reset(reset),.enable(enable),
- .freq(freq),.phase(phase));
-
-endmodule
diff --git a/usrp/fpga/sdr_lib/ext_fifo.v b/usrp/fpga/sdr_lib/ext_fifo.v
deleted file mode 100644
index 41e30de71..000000000
--- a/usrp/fpga/sdr_lib/ext_fifo.v
+++ /dev/null
@@ -1,126 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// Vendor Independent FIFO module
-// Width and Depth should be parameterizable
-// Asynchronous clocks for each side
-// Read side is read-acknowledge, not read-request
-// FIFO does not enforce "don't write when full, don't read when empty"
-// That is up to the connecting modules
-// The FIFO only holds 2^N-1 entries, not 2^N
-
-module fifo (reset,data,write,wrclk,wr_used,q,read_ack,rdclk,rd_used);
- parameter width=32;
- parameter depth=10;
-
- input reset; // Asynchronous
- input [width-1:0] data;
- input write;
- input wrclk;
- output [depth-1:0] wr_used;
- output [width-1:0] q;
- input read_ack;
- input rdclk;
- output [depth-1:0] rd_used;
-
- reg [depth-1:0] read_addr, write_addr,
- read_addr_gray, read_addr_gray_sync,
- write_addr_gray, write_addr_gray_sync;
-
- // Pseudo-dual-port RAM
- dpram #(.depth(10),.width(width),.size(1024))
- fifo_ram (.wclk(wrclk),.wdata(data),.waddr(write_addr),.wen(write),
- .rclk(rdclk), .rdata(q),.raddr(read_addr) );
-
- wire [depth-1:0] wag,rag;
-
- // Keep track of own side's pointer
- always @(posedge wrclk or posedge reset)
- if(reset) write_addr <= #1 0;
- else if(write) write_addr <= #1 write_addr + 1;
-
- always @(posedge rdclk or posedge reset)
- if(reset) read_addr <= #1 0;
- else if(read_ack) read_addr <= #1 read_addr + 1;
-
- // Convert own side pointer to gray
- bin2gray #(depth) write_b2g (write_addr,wag);
- bin2gray #(depth) read_b2g (read_addr,rag);
-
- // Latch it
- always @(posedge wrclk or posedge reset)
- if(reset) write_addr_gray <= #1 0;
- else write_addr_gray <= #1 wag;
-
- always @(posedge rdclk or posedge reset)
- if(reset) read_addr_gray <= #1 0;
- else read_addr_gray <= #1 rag;
-
- // Send it to other side and latch
- always @(posedge wrclk or posedge reset)
- if(reset) read_addr_gray_sync <= #1 0;
- else read_addr_gray_sync <= #1 read_addr_gray;
-
- always @(posedge rdclk or posedge reset)
- if(reset) write_addr_gray_sync <= #1 0;
- else write_addr_gray_sync <= #1 write_addr_gray;
-
- wire [depth-1:0] write_addr_sync, read_addr_sync;
-
- // Convert back to binary
- gray2bin #(depth) write_g2b (write_addr_gray_sync, write_addr_sync);
- gray2bin #(depth) read_g2b (read_addr_gray_sync, read_addr_sync);
-
- assign rd_used = write_addr_sync - read_addr;
- assign wr_used = write_addr - read_addr_sync;
-
-endmodule // fifo
-
-module bin2gray(bin_val,gray_val);
- parameter width = 8;
- input [width-1:0] bin_val;
- output reg [width-1:0] gray_val;
-
- integer i;
-
- always @*
- begin
- gray_val[width-1] = bin_val[width-1];
- for(i=0;i<width-1;i=i+1)
- gray_val[i] = bin_val[i] ^ bin_val[i+1];
- end
-endmodule // bin2gray
-
-module gray2bin(gray_val,bin_val);
- parameter width = 8;
- input [width-1:0] gray_val;
- output reg [width-1:0] bin_val;
-
- integer i;
-
- always @*
- begin
- bin_val[width-1] = gray_val[width-1];
- for(i=width-2;i>=0;i=i-1)
- bin_val[i] = bin_val[i+1] ^ gray_val[i];
- end
-endmodule // gray2bin
diff --git a/usrp/fpga/sdr_lib/gen_cordic_consts.py b/usrp/fpga/sdr_lib/gen_cordic_consts.py
deleted file mode 100755
index ab66cfe01..000000000
--- a/usrp/fpga/sdr_lib/gen_cordic_consts.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-
-import math
-
-zwidth = 16
-
-for i in range(17):
- c = math.atan (1.0/(2**i)) / (2 * math.pi) * (1 << zwidth)
- print "`define c%02d %d'd%d" % (i, zwidth, round (c))
-
diff --git a/usrp/fpga/sdr_lib/gen_sync.v b/usrp/fpga/sdr_lib/gen_sync.v
deleted file mode 100644
index d6efdba98..000000000
--- a/usrp/fpga/sdr_lib/gen_sync.v
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module gen_sync
- ( input clock,
- input reset,
- input enable,
- input [7:0] rate,
- output wire sync );
-
-// parameter width = 8;
-
- reg [7:0] counter;
- assign sync = |(((rate+1)>>1)& counter);
-
- always @(posedge clock)
- if(reset || ~enable)
- counter <= #1 0;
- else if(counter == rate)
- counter <= #1 0;
- else
- counter <= #1 counter + 8'd1;
-
-endmodule // gen_sync
-
diff --git a/usrp/fpga/sdr_lib/hb/acc.v b/usrp/fpga/sdr_lib/hb/acc.v
deleted file mode 100644
index 195d5ea94..000000000
--- a/usrp/fpga/sdr_lib/hb/acc.v
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-module acc (input clock, input reset, input clear, input enable_in, output reg enable_out,
- input signed [30:0] addend, output reg signed [33:0] sum );
-
- always @(posedge clock)
- if(reset)
- sum <= #1 34'd0;
- //else if(clear & enable_in)
- // sum <= #1 addend;
- //else if(clear)
- // sum <= #1 34'd0;
- else if(clear)
- sum <= #1 addend;
- else if(enable_in)
- sum <= #1 sum + addend;
-
- always @(posedge clock)
- enable_out <= #1 enable_in;
-
-endmodule // acc
-
diff --git a/usrp/fpga/sdr_lib/hb/coeff_rom.v b/usrp/fpga/sdr_lib/hb/coeff_rom.v
deleted file mode 100644
index 7f8886b4e..000000000
--- a/usrp/fpga/sdr_lib/hb/coeff_rom.v
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-module coeff_rom (input clock, input [2:0] addr, output reg [15:0] data);
-
- always @(posedge clock)
- case (addr)
- 3'd0 : data <= #1 -16'd49;
- 3'd1 : data <= #1 16'd165;
- 3'd2 : data <= #1 -16'd412;
- 3'd3 : data <= #1 16'd873;
- 3'd4 : data <= #1 -16'd1681;
- 3'd5 : data <= #1 16'd3135;
- 3'd6 : data <= #1 -16'd6282;
- 3'd7 : data <= #1 16'd20628;
- endcase // case(addr)
-
-endmodule // coeff_rom
-
-
diff --git a/usrp/fpga/sdr_lib/hb/halfband_decim.v b/usrp/fpga/sdr_lib/hb/halfband_decim.v
deleted file mode 100644
index dff4d902c..000000000
--- a/usrp/fpga/sdr_lib/hb/halfband_decim.v
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- verilog -*-
- *
- * USRP - Universal Software Radio Peripheral
- *
- * Copyright (C) 2005 Matt Ettus
- *
- * This program 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 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
- */
-
-/*
- * This implements a 31-tap halfband filter that decimates by two.
- * The coefficients are symmetric, and with the exception of the middle tap,
- * every other coefficient is zero. The middle section of taps looks like this:
- *
- * ..., -1468, 0, 2950, 0, -6158, 0, 20585, 32768, 20585, 0, -6158, 0, 2950, 0, -1468, ...
- * |
- * middle tap -------+
- *
- * See coeff_rom.v for the full set. The taps are scaled relative to 32768,
- * thus the middle tap equals 1.0. Not counting the middle tap, there are 8
- * non-zero taps on each side, and they are symmetric. A naive implementation
- * requires a mulitply for each non-zero tap. Because of symmetry, we can
- * replace 2 multiplies with 1 add and 1 multiply. Thus, to compute each output
- * sample, we need to perform 8 multiplications. Since the middle tap is 1.0,
- * we just add the corresponding delay line value.
- *
- * About timing: We implement this with a single multiplier, so it takes
- * 8 cycles to compute a single output. However, since we're decimating by two
- * we can accept a new input value every 4 cycles. strobe_in is asserted when
- * there's a new input sample available. Depending on the overall decimation
- * rate, strobe_in may be asserted less frequently than once every 4 clocks.
- * On the output side, we assert strobe_out when output contains a new sample.
- *
- * Implementation: Every time strobe_in is asserted we store the new data into
- * the delay line. We split the delay line into two components, one for the
- * even samples, and one for the odd samples. ram16_odd is the delay line for
- * the odd samples. This ram is written on each odd assertion of strobe_in, and
- * is read on each clock when we're computing the dot product. ram16_even is
- * similar, although because it holds the even samples we must be able to read
- * two samples from different addresses at the same time, while writing the incoming
- * even samples. Thus it's "triple-ported".
- */
-
-module halfband_decim
- (input clock, input reset, input enable, input strobe_in, output wire strobe_out,
- input wire [15:0] data_in, output reg [15:0] data_out,output wire [15:0] debugctrl);
-
- reg [3:0] rd_addr1;
- reg [3:0] rd_addr2;
- reg [3:0] phase;
- reg [3:0] base_addr;
-
- wire signed [15:0] mac_out,middle_data, sum, coeff;
- wire signed [30:0] product;
- wire signed [33:0] sum_even;
- wire clear;
- reg store_odd;
-
- always @(posedge clock)
- if(reset)
- store_odd <= #1 1'b0;
- else
- if(strobe_in)
- store_odd <= #1 ~store_odd;
-
- wire start = strobe_in & store_odd;
- always @(posedge clock)
- if(reset)
- base_addr <= #1 4'd0;
- else if(start)
- base_addr <= #1 base_addr + 4'd1;
-
- always @(posedge clock)
- if(reset)
- phase <= #1 4'd8;
- else if (start)
- phase <= #1 4'd0;
- else if(phase != 4'd8)
- phase <= #1 phase + 4'd1;
-
- reg start_d1,start_d2,start_d3,start_d4,start_d5,start_d6,start_d7,start_d8,start_d9,start_dA,start_dB,start_dC,start_dD;
- always @(posedge clock)
- begin
- start_d1 <= #1 start;
- start_d2 <= #1 start_d1;
- start_d3 <= #1 start_d2;
- start_d4 <= #1 start_d3;
- start_d5 <= #1 start_d4;
- start_d6 <= #1 start_d5;
- start_d7 <= #1 start_d6;
- start_d8 <= #1 start_d7;
- start_d9 <= #1 start_d8;
- start_dA <= #1 start_d9;
- start_dB <= #1 start_dA;
- start_dC <= #1 start_dB;
- start_dD <= #1 start_dC;
- end // always @ (posedge clock)
-
- reg mult_en, mult_en_pre;
- always @(posedge clock)
- begin
- mult_en_pre <= #1 phase!=8;
- mult_en <= #1 mult_en_pre;
- end
-
- assign clear = start_d4; // was dC
- wire latch_result = start_d4; // was dC
- assign strobe_out = start_d5; // was dD
- wire acc_en;
-
- always @*
- case(phase[2:0])
- 3'd0 : begin rd_addr1 = base_addr + 4'd0; rd_addr2 = base_addr + 4'd15; end
- 3'd1 : begin rd_addr1 = base_addr + 4'd1; rd_addr2 = base_addr + 4'd14; end
- 3'd2 : begin rd_addr1 = base_addr + 4'd2; rd_addr2 = base_addr + 4'd13; end
- 3'd3 : begin rd_addr1 = base_addr + 4'd3; rd_addr2 = base_addr + 4'd12; end
- 3'd4 : begin rd_addr1 = base_addr + 4'd4; rd_addr2 = base_addr + 4'd11; end
- 3'd5 : begin rd_addr1 = base_addr + 4'd5; rd_addr2 = base_addr + 4'd10; end
- 3'd6 : begin rd_addr1 = base_addr + 4'd6; rd_addr2 = base_addr + 4'd9; end
- 3'd7 : begin rd_addr1 = base_addr + 4'd7; rd_addr2 = base_addr + 4'd8; end
- default: begin rd_addr1 = base_addr + 4'd0; rd_addr2 = base_addr + 4'd15; end
- endcase // case(phase)
-
- coeff_rom coeff_rom (.clock(clock),.addr(phase[2:0]-3'd1),.data(coeff));
-
- ram16_2sum ram16_even (.clock(clock),.write(strobe_in & ~store_odd),
- .wr_addr(base_addr),.wr_data(data_in),
- .rd_addr1(rd_addr1),.rd_addr2(rd_addr2),
- .sum(sum));
-
- ram16 ram16_odd (.clock(clock),.write(strobe_in & store_odd), // Holds middle items
- .wr_addr(base_addr),.wr_data(data_in),
- //.rd_addr(base_addr+4'd7),.rd_data(middle_data));
- .rd_addr(base_addr+4'd6),.rd_data(middle_data));
-
- mult mult(.clock(clock),.x(coeff),.y(sum),.product(product),.enable_in(mult_en),.enable_out(acc_en));
-
- acc acc(.clock(clock),.reset(reset),.enable_in(acc_en),.enable_out(),
- .clear(clear),.addend(product),.sum(sum_even));
-
- wire signed [33:0] dout = sum_even + {{4{middle_data[15]}},middle_data,14'b0}; // We already divided product by 2!!!!
-
- always @(posedge clock)
- if(reset)
- data_out <= #1 16'd0;
- else if(latch_result)
- data_out <= #1 dout[30:15] + (dout[33]& |dout[14:0]);
-
- assign debugctrl = { clock,reset,acc_en,mult_en,clear,latch_result,store_odd,strobe_in,strobe_out,phase};
-
-endmodule // halfband_decim
diff --git a/usrp/fpga/sdr_lib/hb/halfband_interp.v b/usrp/fpga/sdr_lib/hb/halfband_interp.v
deleted file mode 100644
index cdb11c1f6..000000000
--- a/usrp/fpga/sdr_lib/hb/halfband_interp.v
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-module halfband_interp
- (input clock, input reset, input enable,
- input strobe_in, input strobe_out,
- input [15:0] signal_in_i, input [15:0] signal_in_q,
- output reg [15:0] signal_out_i, output reg [15:0] signal_out_q,
- output wire [12:0] debug);
-
- wire [15:0] coeff_ram_out;
- wire [15:0] data_ram_out_i;
- wire [15:0] data_ram_out_q;
-
- wire [3:0] data_rd_addr;
- reg [3:0] data_wr_addr;
- reg [2:0] coeff_rd_addr;
-
- wire filt_done;
-
- wire [15:0] mac_out_i;
- wire [15:0] mac_out_q;
- reg [15:0] delayed_middle_i, delayed_middle_q;
- wire [7:0] shift = 8'd9;
-
- reg stb_out_happened;
-
- wire [15:0] data_ram_out_i_b;
-
- always @(posedge clock)
- if(strobe_in)
- stb_out_happened <= #1 1'b0;
- else if(strobe_out)
- stb_out_happened <= #1 1'b1;
-
-assign debug = {filt_done,data_rd_addr,data_wr_addr,coeff_rd_addr};
-
- wire [15:0] signal_out_i = stb_out_happened ? mac_out_i : delayed_middle_i;
- wire [15:0] signal_out_q = stb_out_happened ? mac_out_q : delayed_middle_q;
-
-/* always @(posedge clock)
- if(reset)
- begin
- signal_out_i <= #1 16'd0;
- signal_out_q <= #1 16'd0;
- end
- else if(strobe_in)
- begin
- signal_out_i <= #1 delayed_middle_i; // Multiply by 1 for middle coeff
- signal_out_q <= #1 delayed_middle_q;
- end
- //else if(filt_done&stb_out_happened)
- else if(stb_out_happened)
- begin
- signal_out_i <= #1 mac_out_i;
- signal_out_q <= #1 mac_out_q;
- end
-*/
-
- always @(posedge clock)
- if(reset)
- coeff_rd_addr <= #1 3'd0;
- else if(coeff_rd_addr != 3'd0)
- coeff_rd_addr <= #1 coeff_rd_addr + 3'd1;
- else if(strobe_in)
- coeff_rd_addr <= #1 3'd1;
-
- reg filt_done_d1;
- always@(posedge clock)
- filt_done_d1 <= #1 filt_done;
-
- always @(posedge clock)
- if(reset)
- data_wr_addr <= #1 4'd0;
- //else if(strobe_in)
- else if(filt_done & ~filt_done_d1)
- data_wr_addr <= #1 data_wr_addr + 4'd1;
-
- always @(posedge clock)
- if(coeff_rd_addr == 3'd7)
- begin
- delayed_middle_i <= #1 data_ram_out_i_b;
- // delayed_middle_q <= #1 data_ram_out_q_b;
- end
-
-// always @(posedge clock)
-// if(reset)
-// data_rd_addr <= #1 4'd0;
-// else if(strobe_in)
-// data_rd_addr <= #1 data_wr_addr + 4'd1;
-// else if(!filt_done)
-// data_rd_addr <= #1 data_rd_addr + 4'd1;
-// else
-// data_rd_addr <= #1 data_wr_addr;
-
- wire [3:0] data_rd_addr1 = data_wr_addr + {1'b0,coeff_rd_addr};
- wire [3:0] data_rd_addr2 = data_wr_addr + 15 - {1'b0,coeff_rd_addr};
-// always @(posedge clock)
-// if(reset)
-// filt_done <= #1 1'b1;
-// else if(strobe_in)
- // filt_done <= #1 1'b0;
-// else if(coeff_rd_addr == 4'd0)
-// filt_done <= #1 1'b1;
-
- assign filt_done = (coeff_rd_addr == 3'd0);
-
- coeff_ram coeff_ram ( .clock(clock),.rd_addr({1'b0,coeff_rd_addr}),.rd_data(coeff_ram_out) );
-
- ram16_2sum data_ram_i ( .clock(clock),.write(strobe_in),.wr_addr(data_wr_addr),.wr_data(signal_in_i),
- .rd_addr1(data_rd_addr1),.rd_addr2(data_rd_addr2),.rd_data(data_ram_out_i_b),.sum(data_ram_out_i));
-
- ram16_2sum data_ram_q ( .clock(clock),.write(strobe_in),.wr_addr(data_wr_addr),.wr_data(signal_in_q),
- .rd_addr1(data_rd_addr1),.rd_addr2(data_rd_addr2),.rd_data(data_ram_out_q));
-
- mac mac_i (.clock(clock),.reset(reset),.enable(~filt_done),.clear(strobe_in),
- .x(data_ram_out_i),.y(coeff_ram_out),.shift(shift),.z(mac_out_i) );
-
- mac mac_q (.clock(clock),.reset(reset),.enable(~filt_done),.clear(strobe_in),
- .x(data_ram_out_q),.y(coeff_ram_out),.shift(shift),.z(mac_out_q) );
-
-endmodule // halfband_interp
diff --git a/usrp/fpga/sdr_lib/hb/hbd_tb/HBD b/usrp/fpga/sdr_lib/hb/hbd_tb/HBD
deleted file mode 100644
index 574fbba91..000000000
--- a/usrp/fpga/sdr_lib/hb/hbd_tb/HBD
+++ /dev/null
@@ -1,80 +0,0 @@
-*-6.432683 5736 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-@28
-test_hbd.clock
-test_hbd.reset
-@420
-test_hbd.halfband_decim.middle_data[15:0]
-@22
-test_hbd.halfband_decim.sum_even[33:0]
-test_hbd.halfband_decim.base_addr[3:0]
-@420
-test_hbd.i_in[15:0]
-@24
-test_hbd.halfband_decim.phase[3:0]
-test_hbd.halfband_decim.ram16_even.rd_addr1[3:0]
-test_hbd.halfband_decim.ram16_even.rd_addr2[3:0]
-test_hbd.halfband_decim.ram16_even.wr_addr[3:0]
-test_hbd.halfband_decim.ram16_even.wr_data[15:0]
-@28
-test_hbd.halfband_decim.ram16_even.write
-@420
-test_hbd.halfband_decim.sum[15:0]
-test_hbd.halfband_decim.product[30:0]
-test_hbd.halfband_decim.dout[33:0]
-test_hbd.halfband_decim.sum_even[33:0]
-@22
-test_hbd.halfband_decim.acc.addend[30:0]
-@28
-test_hbd.halfband_decim.acc.reset
-@420
-test_hbd.halfband_decim.acc.sum[33:0]
-test_hbd.halfband_decim.mult.x[15:0]
-test_hbd.halfband_decim.mult.y[15:0]
-@28
-test_hbd.halfband_decim.acc.clear
-test_hbd.strobe_in
-test_hbd.strobe_out
-test_hbd.halfband_decim.acc_en
-@420
-test_hbd.i_out[15:0]
-@28
-test_hbd.halfband_decim.mult_en
-test_hbd.halfband_decim.latch_result
-@420
-test_hbd.halfband_decim.sum[15:0]
-test_hbd.halfband_decim.sum_even[33:0]
-test_hbd.halfband_decim.dout[33:0]
-test_hbd.halfband_decim.data_out[15:0]
-@22
-test_hbd.halfband_decim.data_out[15:0]
-@28
-test_hbd.halfband_decim.dout[33:0]
-@29
-test_hbd.halfband_decim.acc_en
-@22
-test_hbd.halfband_decim.base_addr[3:0]
-@28
-test_hbd.halfband_decim.clear
-test_hbd.halfband_decim.latch_result
-test_hbd.halfband_decim.mult_en
-test_hbd.halfband_decim.mult_en_pre
-@22
-test_hbd.halfband_decim.phase[3:0]
-@28
-test_hbd.halfband_decim.start
-test_hbd.halfband_decim.start_d1
-test_hbd.halfband_decim.start_d2
-test_hbd.halfband_decim.start_d3
-test_hbd.halfband_decim.start_d4
-test_hbd.halfband_decim.start_d5
-test_hbd.halfband_decim.start_d6
-test_hbd.halfband_decim.start_d7
-test_hbd.halfband_decim.start_d8
-test_hbd.halfband_decim.start_d9
-test_hbd.halfband_decim.start_dA
-test_hbd.halfband_decim.start_dB
-test_hbd.halfband_decim.start_dC
-test_hbd.halfband_decim.start_dD
-test_hbd.halfband_decim.store_odd
-test_hbd.halfband_decim.strobe_in
-test_hbd.halfband_decim.strobe_out
diff --git a/usrp/fpga/sdr_lib/hb/hbd_tb/really_golden b/usrp/fpga/sdr_lib/hb/hbd_tb/really_golden
deleted file mode 100644
index 2d24a9e14..000000000
--- a/usrp/fpga/sdr_lib/hb/hbd_tb/really_golden
+++ /dev/null
@@ -1,142 +0,0 @@
-VCD info: dumpfile test_hbd.vcd opened for output.
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 8192
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
-- 4
- 18
-- 63
- 167
-- 367
- 737
-- 1539
- 5146
- 5146
-- 1539
- 737
-- 367
- 167
-- 63
- 18
-- 4
- 0
- 0
- 0
- 0
- 0
-- 4
- 14
-- 49
- 118
-- 249
- 488
- 7141
-12287
-17433
-15894
-16631
-16264
-16432
-16368
-16387
-16383
-16383
-16383
-16383
-16383
-16387
-16368
-16432
-16264
-16631
-15894
- 9241
- 4095
-- 1051
- 488
-- 249
- 118
-- 49
- 14
-- 4
- 0
- 0
- 0
- 0
- 0
-- 4
- 14
-- 49
- 118
-- 249
- 488
-- 1051
-12287
-17433
-15894
-16631
-16264
-16432
-16368
-16387
-16383
-16383
-16383
-16383
-16383
-16387
-16368
-16432
-16264
-16631
-15894
-17433
- 4095
-- 1051
- 488
-- 249
- 118
-- 49
- 14
-- 4
- 0
- 0
- 0
- 0
diff --git a/usrp/fpga/sdr_lib/hb/hbd_tb/regression b/usrp/fpga/sdr_lib/hb/hbd_tb/regression
deleted file mode 100644
index fc279c2f2..000000000
--- a/usrp/fpga/sdr_lib/hb/hbd_tb/regression
+++ /dev/null
@@ -1,95 +0,0 @@
-echo "Baseline 1000"
-iverilog -y .. -o test_hbd -DRATE=1000 test_hbd.v ; ./test_hbd >golden
-diff golden really_golden
-
-echo
-echo "Test 100"
-iverilog -y .. -o test_hbd -DRATE=100 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 50"
-iverilog -y .. -o test_hbd -DRATE=50 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 40"
-iverilog -y .. -o test_hbd -DRATE=40 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 30"
-iverilog -y .. -o test_hbd -DRATE=30 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 25"
-iverilog -y .. -o test_hbd -DRATE=25 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 20"
-iverilog -y .. -o test_hbd -DRATE=20 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 19"
-iverilog -y .. -o test_hbd -DRATE=19 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 18"
-iverilog -y .. -o test_hbd -DRATE=18 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 17"
-iverilog -y .. -o test_hbd -DRATE=17 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 16"
-iverilog -y .. -o test_hbd -DRATE=16 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 15"
-iverilog -y .. -o test_hbd -DRATE=15 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 14"
-iverilog -y .. -o test_hbd -DRATE=14 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 13"
-iverilog -y .. -o test_hbd -DRATE=13 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 12"
-iverilog -y .. -o test_hbd -DRATE=12 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 11"
-iverilog -y .. -o test_hbd -DRATE=11 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 10"
-iverilog -y .. -o test_hbd -DRATE=10 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 9"
-iverilog -y .. -o test_hbd -DRATE=9 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 8"
-iverilog -y .. -o test_hbd -DRATE=8 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 7"
-iverilog -y .. -o test_hbd -DRATE=7 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 6"
-iverilog -y .. -o test_hbd -DRATE=6 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 5"
-iverilog -y .. -o test_hbd -DRATE=5 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 4"
-iverilog -y .. -o test_hbd -DRATE=4 test_hbd.v ; ./test_hbd >output ; diff output golden
-
-echo
-echo "Test 3"
-iverilog -y .. -o test_hbd -DRATE=3 test_hbd.v ; ./test_hbd >output ; diff output golden
diff --git a/usrp/fpga/sdr_lib/hb/hbd_tb/run_hbd b/usrp/fpga/sdr_lib/hb/hbd_tb/run_hbd
deleted file mode 100755
index b8aec7574..000000000
--- a/usrp/fpga/sdr_lib/hb/hbd_tb/run_hbd
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-iverilog -y .. -o test_hbd test_hbd.v
-./test_hbd
diff --git a/usrp/fpga/sdr_lib/hb/hbd_tb/test_hbd.v b/usrp/fpga/sdr_lib/hb/hbd_tb/test_hbd.v
deleted file mode 100644
index 01ab5e7e0..000000000
--- a/usrp/fpga/sdr_lib/hb/hbd_tb/test_hbd.v
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-module test_hbd();
-
- reg clock;
- initial clock = 1'b0;
- always #5 clock <= ~clock;
-
- reg reset;
- initial reset = 1'b1;
- initial #1000 reset = 1'b0;
-
- initial $dumpfile("test_hbd.vcd");
- initial $dumpvars(0,test_hbd);
-
- reg [15:0] i_in, q_in;
- wire [15:0] i_out, q_out;
-
- reg strobe_in;
- wire strobe_out;
- reg coeff_write;
- reg [15:0] coeff_data;
- reg [4:0] coeff_addr;
-
- halfband_decim halfband_decim
- ( .clock(clock),.reset(reset),.enable(),.strobe_in(strobe_in),.strobe_out(strobe_out),
- .data_in(i_in),.data_out(i_out) );
-
- always @(posedge strobe_out)
- if(i_out[15])
- $display("-%d",65536-i_out);
- else
- $display("%d",i_out);
-
- initial
- begin
- strobe_in = 1'b0;
- @(negedge reset);
- @(posedge clock);
- while(1)
- begin
- strobe_in <= #1 1'b1;
- @(posedge clock);
- strobe_in <= #1 1'b0;
- repeat (`RATE)
- @(posedge clock);
- end
- end
-
- initial #10000000 $finish; // Just in case...
-
- initial
- begin
- i_in <= #1 16'd0;
- repeat (40) @(posedge strobe_in);
- i_in <= #1 16'd16384;
- @(posedge strobe_in);
- i_in <= #1 16'd0;
- repeat (40) @(posedge strobe_in);
- i_in <= #1 16'd16384;
- @(posedge strobe_in);
- i_in <= #1 16'd0;
- repeat (40) @(posedge strobe_in);
- i_in <= #1 16'd16384;
- repeat (40) @(posedge strobe_in);
- i_in <= #1 16'd0;
- repeat (41) @(posedge strobe_in);
- i_in <= #1 16'd16384;
- repeat (40) @(posedge strobe_in);
- i_in <= #1 16'd0;
- repeat (40) @(posedge strobe_in);
- repeat (7) @(posedge clock);
- $finish;
- end // initial begin
-endmodule // test_hb
diff --git a/usrp/fpga/sdr_lib/hb/mac.v b/usrp/fpga/sdr_lib/hb/mac.v
deleted file mode 100644
index 5a270bc73..000000000
--- a/usrp/fpga/sdr_lib/hb/mac.v
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-module mac (input clock, input reset, input enable, input clear,
- input signed [15:0] x, input signed [15:0] y,
- input [7:0] shift, output [15:0] z );
-
- reg signed [30:0] product;
- reg signed [39:0] z_int;
- reg signed [15:0] z_shift;
-
- reg enable_d1;
- always @(posedge clock)
- enable_d1 <= #1 enable;
-
- always @(posedge clock)
- if(reset | clear)
- z_int <= #1 40'd0;
- else if(enable_d1)
- z_int <= #1 z_int + {{9{product[30]}},product};
-
- always @(posedge clock)
- product <= #1 x*y;
-
- always @* // FIXME full case? parallel case?
- case(shift)
- //8'd0 : z_shift <= z_int[39:24];
- //8'd1 : z_shift <= z_int[38:23];
- //8'd2 : z_shift <= z_int[37:22];
- //8'd3 : z_shift <= z_int[36:21];
- //8'd4 : z_shift <= z_int[35:20];
- //8'd5 : z_shift <= z_int[34:19];
- 8'd6 : z_shift <= z_int[33:18];
- 8'd7 : z_shift <= z_int[32:17];
- 8'd8 : z_shift <= z_int[31:16];
- 8'd9 : z_shift <= z_int[30:15];
- 8'd10 : z_shift <= z_int[29:14];
- 8'd11 : z_shift <= z_int[28:13];
- //8'd12 : z_shift <= z_int[27:12];
- //8'd13 : z_shift <= z_int[26:11];
- //8'd14 : z_shift <= z_int[25:10];
- //8'd15 : z_shift <= z_int[24:9];
- //8'd16 : z_shift <= z_int[23:8];
- //8'd17 : z_shift <= z_int[22:7];
- //8'd18 : z_shift <= z_int[21:6];
- //8'd19 : z_shift <= z_int[20:5];
- //8'd20 : z_shift <= z_int[19:4];
- //8'd21 : z_shift <= z_int[18:3];
- //8'd22 : z_shift <= z_int[17:2];
- //8'd23 : z_shift <= z_int[16:1];
- //8'd24 : z_shift <= z_int[15:0];
- default : z_shift <= z_int[15:0];
- endcase // case(shift)
-
- // FIXME do we need to saturate?
- //assign z = z_shift;
- assign z = z_int[15:0];
-
-endmodule // mac
diff --git a/usrp/fpga/sdr_lib/hb/mult.v b/usrp/fpga/sdr_lib/hb/mult.v
deleted file mode 100644
index a8d4cb1b7..000000000
--- a/usrp/fpga/sdr_lib/hb/mult.v
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-module mult (input clock, input signed [15:0] x, input signed [15:0] y, output reg signed [30:0] product,
- input enable_in, output reg enable_out );
-
- always @(posedge clock)
- if(enable_in)
- product <= #1 x*y;
- else
- product <= #1 31'd0;
-
- always @(posedge clock)
- enable_out <= #1 enable_in;
-
-endmodule // mult
-
diff --git a/usrp/fpga/sdr_lib/hb/ram16_2port.v b/usrp/fpga/sdr_lib/hb/ram16_2port.v
deleted file mode 100644
index e1761a926..000000000
--- a/usrp/fpga/sdr_lib/hb/ram16_2port.v
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-module ram16_2port (input clock, input write,
- input [3:0] wr_addr, input [15:0] wr_data,
- input [3:0] rd_addr1, output reg [15:0] rd_data1,
- input [3:0] rd_addr2, output reg [15:0] rd_data2);
-
- reg [15:0] ram_array [0:31];
-
- always @(posedge clock)
- rd_data1 <= #1 ram_array[rd_addr1];
-
- always @(posedge clock)
- rd_data2 <= #1 ram_array[rd_addr2];
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
-endmodule // ram16_2port
-
-
diff --git a/usrp/fpga/sdr_lib/hb/ram16_2sum.v b/usrp/fpga/sdr_lib/hb/ram16_2sum.v
deleted file mode 100644
index 559b06fd5..000000000
--- a/usrp/fpga/sdr_lib/hb/ram16_2sum.v
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-module ram16_2sum (input clock, input write,
- input [3:0] wr_addr, input [15:0] wr_data,
- input [3:0] rd_addr1, input [3:0] rd_addr2,
- output reg [15:0] sum);
-
- reg signed [15:0] ram_array [0:15];
- reg signed [15:0] a,b;
- wire signed [16:0] sum_int;
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
- always @(posedge clock)
- begin
- a <= #1 ram_array[rd_addr1];
- b <= #1 ram_array[rd_addr2];
- end
-
- assign sum_int = {a[15],a} + {b[15],b};
-
- always @(posedge clock)
- sum <= #1 sum_int[16:1] + (sum_int[16]&sum_int[0]);
-
-endmodule // ram16_2sum
diff --git a/usrp/fpga/sdr_lib/hb/ram32_2sum.v b/usrp/fpga/sdr_lib/hb/ram32_2sum.v
deleted file mode 100644
index d1f55b7d0..000000000
--- a/usrp/fpga/sdr_lib/hb/ram32_2sum.v
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-module ram32_2sum (input clock, input write,
- input [4:0] wr_addr, input [15:0] wr_data,
- input [4:0] rd_addr1, input [4:0] rd_addr2,
- output reg [15:0] sum);
-
- reg [15:0] ram_array [0:31];
- wire [16:0] sum_int;
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
- assign sum_int = ram_array[rd_addr1] + ram_array[rd_addr2];
-
- always @(posedge clock)
- sum <= #1 sum_int[16:1] + (sum_int[16]&sum_int[0]);
-
-
-endmodule // ram32_2sum
-
diff --git a/usrp/fpga/sdr_lib/io_pins.v b/usrp/fpga/sdr_lib/io_pins.v
deleted file mode 100644
index ad1b7b4a8..000000000
--- a/usrp/fpga/sdr_lib/io_pins.v
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2005,2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-`include "../../firmware/include/fpga_regs_common.v"
-`include "../../firmware/include/fpga_regs_standard.v"
-
-module io_pins
- ( inout wire [15:0] io_0, inout wire [15:0] io_1, inout wire [15:0] io_2, inout wire [15:0] io_3,
- input wire [15:0] reg_0, input wire [15:0] reg_1, input wire [15:0] reg_2, input wire [15:0] reg_3,
- input clock, input rx_reset, input tx_reset,
- input [6:0] serial_addr, input [31:0] serial_data, input serial_strobe);
-
- reg [15:0] io_0_oe,io_1_oe,io_2_oe,io_3_oe;
-
- bidir_reg bidir_reg_0 (.tristate(io_0),.oe(io_0_oe),.reg_val(reg_0));
- bidir_reg bidir_reg_1 (.tristate(io_1),.oe(io_1_oe),.reg_val(reg_1));
- bidir_reg bidir_reg_2 (.tristate(io_2),.oe(io_2_oe),.reg_val(reg_2));
- bidir_reg bidir_reg_3 (.tristate(io_3),.oe(io_3_oe),.reg_val(reg_3));
-
- // Upper 16 bits are mask for lower 16
- always @(posedge clock)
- if(serial_strobe)
- case(serial_addr)
- `FR_OE_0 : io_0_oe
- <= #1 (io_0_oe & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_OE_1 : io_1_oe
- <= #1 (io_1_oe & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_OE_2 : io_2_oe
- <= #1 (io_2_oe & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_OE_3 : io_3_oe
- <= #1 (io_3_oe & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- endcase // case(serial_addr)
-
-endmodule // io_pins
diff --git a/usrp/fpga/sdr_lib/master_control.v b/usrp/fpga/sdr_lib/master_control.v
deleted file mode 100644
index 3bce55f23..000000000
--- a/usrp/fpga/sdr_lib/master_control.v
+++ /dev/null
@@ -1,163 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003,2005 Matt Ettus
-// Copyright (C) 2007 Corgan Enterprises LLC
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Clock, enable, and reset controls for whole system
-
-module master_control
- ( input master_clk, input usbclk,
- input wire [6:0] serial_addr, input wire [31:0] serial_data, input wire serial_strobe,
- output tx_bus_reset, output rx_bus_reset,
- output wire tx_dsp_reset, output wire rx_dsp_reset,
- output wire enable_tx, output wire enable_rx,
- output wire [7:0] interp_rate, output wire [7:0] decim_rate,
- output tx_sample_strobe, output strobe_interp,
- output rx_sample_strobe, output strobe_decim,
- input tx_empty,
- input wire [15:0] debug_0,input wire [15:0] debug_1,input wire [15:0] debug_2,input wire [15:0] debug_3,
- output wire [15:0] reg_0, output wire [15:0] reg_1, output wire [15:0] reg_2, output wire [15:0] reg_3
- );
-
- // FIXME need a separate reset for all control settings
- // Master Controls assignments
- wire [7:0] master_controls;
- setting_reg #(`FR_MASTER_CTRL) sr_mstr_ctrl(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(master_controls));
- assign enable_tx = master_controls[0];
- assign enable_rx = master_controls[1];
- assign tx_dsp_reset = master_controls[2];
- assign rx_dsp_reset = master_controls[3];
- // Unused - 4-7
-
- // Strobe Generators
- setting_reg #(`FR_INTERP_RATE) sr_interp(.clock(master_clk),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(interp_rate));
- setting_reg #(`FR_DECIM_RATE) sr_decim(.clock(master_clk),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(decim_rate));
-
- strobe_gen da_strobe_gen
- ( .clock(master_clk),.reset(tx_dsp_reset),.enable(enable_tx),
- .rate(8'd1),.strobe_in(1'b1),.strobe(tx_sample_strobe) );
-
- strobe_gen tx_strobe_gen
- ( .clock(master_clk),.reset(tx_dsp_reset),.enable(enable_tx),
- .rate(interp_rate),.strobe_in(tx_sample_strobe),.strobe(strobe_interp) );
-
- assign rx_sample_strobe = 1'b1;
-
- strobe_gen decim_strobe_gen
- ( .clock(master_clk),.reset(rx_dsp_reset),.enable(enable_rx),
- .rate(decim_rate),.strobe_in(rx_sample_strobe),.strobe(strobe_decim) );
-
- // Reset syncs for bus (usbclk) side
- // The RX bus side reset isn't used, the TX bus side one may not be needed
- reg tx_reset_bus_sync1, rx_reset_bus_sync1, tx_reset_bus_sync2, rx_reset_bus_sync2;
-
- always @(posedge usbclk)
- begin
- tx_reset_bus_sync1 <= #1 tx_dsp_reset;
- rx_reset_bus_sync1 <= #1 rx_dsp_reset;
- tx_reset_bus_sync2 <= #1 tx_reset_bus_sync1;
- rx_reset_bus_sync2 <= #1 rx_reset_bus_sync1;
- end
-
- assign tx_bus_reset = tx_reset_bus_sync2;
- assign rx_bus_reset = rx_reset_bus_sync2;
-
- wire [7:0] txa_refclk, rxa_refclk, txb_refclk, rxb_refclk;
- wire txaclk,txbclk,rxaclk,rxbclk;
- wire [3:0] debug_en, txcvr_ctrl;
-
- wire [31:0] txcvr_rxlines, txcvr_txlines;
-
- setting_reg #(`FR_TX_A_REFCLK) sr_txaref(.clock(master_clk),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(txa_refclk));
- setting_reg #(`FR_RX_A_REFCLK) sr_rxaref(.clock(master_clk),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(rxa_refclk));
- setting_reg #(`FR_TX_B_REFCLK) sr_txbref(.clock(master_clk),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(txb_refclk));
- setting_reg #(`FR_RX_B_REFCLK) sr_rxbref(.clock(master_clk),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(rxb_refclk));
-
- setting_reg #(`FR_DEBUG_EN) sr_debugen(.clock(master_clk),.reset(rx_dsp_reset|tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(debug_en));
-
- clk_divider clk_div_0 (.reset(tx_dsp_reset),.in_clk(master_clk),.out_clk(txaclk),.ratio(txa_refclk[6:0]));
- clk_divider clk_div_1 (.reset(rx_dsp_reset),.in_clk(master_clk),.out_clk(rxaclk),.ratio(rxa_refclk[6:0]));
- clk_divider clk_div_2 (.reset(tx_dsp_reset),.in_clk(master_clk),.out_clk(txbclk),.ratio(txb_refclk[6:0]));
- clk_divider clk_div_3 (.reset(rx_dsp_reset),.in_clk(master_clk),.out_clk(rxbclk),.ratio(rxb_refclk[6:0]));
-
- reg [15:0] io_0_reg,io_1_reg,io_2_reg,io_3_reg;
- // Upper 16 bits are mask for lower 16
- always @(posedge master_clk)
- if(serial_strobe)
- case(serial_addr)
- `FR_IO_0 : io_0_reg
- <= #1 (io_0_reg & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_IO_1 : io_1_reg
- <= #1 (io_1_reg & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_IO_2 : io_2_reg
- <= #1 (io_2_reg & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- `FR_IO_3 : io_3_reg
- <= #1 (io_3_reg & ~serial_data[31:16]) | (serial_data[15:0] & serial_data[31:16] );
- endcase // case(serial_addr)
-
- wire transmit_now;
- wire atr_ctl;
- wire [11:0] atr_tx_delay, atr_rx_delay;
- wire [15:0] atr_mask_0, atr_txval_0, atr_rxval_0, atr_mask_1, atr_txval_1, atr_rxval_1, atr_mask_2, atr_txval_2, atr_rxval_2, atr_mask_3, atr_txval_3, atr_rxval_3;
-
- setting_reg #(`FR_ATR_MASK_0) sr_atr_mask_0(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_mask_0));
- setting_reg #(`FR_ATR_TXVAL_0) sr_atr_txval_0(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_txval_0));
- setting_reg #(`FR_ATR_RXVAL_0) sr_atr_rxval_0(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_rxval_0));
-
- setting_reg #(`FR_ATR_MASK_1) sr_atr_mask_1(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_mask_1));
- setting_reg #(`FR_ATR_TXVAL_1) sr_atr_txval_1(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_txval_1));
- setting_reg #(`FR_ATR_RXVAL_1) sr_atr_rxval_1(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_rxval_1));
-
- setting_reg #(`FR_ATR_MASK_2) sr_atr_mask_2(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_mask_2));
- setting_reg #(`FR_ATR_TXVAL_2) sr_atr_txval_2(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_txval_2));
- setting_reg #(`FR_ATR_RXVAL_2) sr_atr_rxval_2(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_rxval_2));
-
- setting_reg #(`FR_ATR_MASK_3) sr_atr_mask_3(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_mask_3));
- setting_reg #(`FR_ATR_TXVAL_3) sr_atr_txval_3(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_txval_3));
- setting_reg #(`FR_ATR_RXVAL_3) sr_atr_rxval_3(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_rxval_3));
-
- //setting_reg #(`FR_ATR_CTL) sr_atr_ctl(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_ctl));
- setting_reg #(`FR_ATR_TX_DELAY) sr_atr_tx_delay(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_tx_delay));
- setting_reg #(`FR_ATR_RX_DELAY) sr_atr_rx_delay(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(atr_rx_delay));
-
- assign atr_ctl = 1'b1;
-
- atr_delay atr_delay(.clk_i(master_clk),.rst_i(tx_dsp_reset),.ena_i(atr_ctl),.tx_empty_i(tx_empty),
- .tx_delay_i(atr_tx_delay),.rx_delay_i(atr_rx_delay),.atr_tx_o(transmit_now));
-
- wire [15:0] atr_selected_0 = transmit_now ? atr_txval_0 : atr_rxval_0;
- wire [15:0] io_0 = ({{16{atr_ctl}}} & atr_mask_0 & atr_selected_0) | (~({{16{atr_ctl}}} & atr_mask_0) & io_0_reg);
-
- wire [15:0] atr_selected_1 = transmit_now ? atr_txval_1 : atr_rxval_1;
- wire [15:0] io_1 = ({{16{atr_ctl}}} & atr_mask_1 & atr_selected_1) | (~({{16{atr_ctl}}} & atr_mask_1) & io_1_reg);
-
- wire [15:0] atr_selected_2 = transmit_now ? atr_txval_2 : atr_rxval_2;
- wire [15:0] io_2 = ({{16{atr_ctl}}} & atr_mask_2 & atr_selected_2) | (~({{16{atr_ctl}}} & atr_mask_2) & io_2_reg);
-
- wire [15:0] atr_selected_3 = transmit_now ? atr_txval_3 : atr_rxval_3;
- wire [15:0] io_3 = ({{16{atr_ctl}}} & atr_mask_3 & atr_selected_3) | (~({{16{atr_ctl}}} & atr_mask_3) & io_3_reg);
-
- assign reg_0 = debug_en[0] ? debug_0 : txa_refclk[7] ? {io_0[15:1],txaclk} : io_0;
- assign reg_1 = debug_en[1] ? debug_1 : rxa_refclk[7] ? {io_1[15:1],rxaclk} : io_1;
- assign reg_2 = debug_en[2] ? debug_2 : txb_refclk[7] ? {io_2[15:1],txbclk} : io_2;
- assign reg_3 = debug_en[3] ? debug_3 : rxb_refclk[7] ? {io_3[15:1],rxbclk} : io_3;
-
-
-endmodule // master_control
diff --git a/usrp/fpga/sdr_lib/master_control_multi.v b/usrp/fpga/sdr_lib/master_control_multi.v
deleted file mode 100644
index cab96a79f..000000000
--- a/usrp/fpga/sdr_lib/master_control_multi.v
+++ /dev/null
@@ -1,73 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Martin Dudok van Heel
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-`include "config.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-// Clock, enable, and reset controls for whole system
-// Modified version to enable multi_usrp synchronisation
-
-module master_control_multi
- ( input master_clk, input usbclk,
- input wire [6:0] serial_addr, input wire [31:0] serial_data, input wire serial_strobe,
- input wire rx_slave_sync,
- output tx_bus_reset, output rx_bus_reset,
- output wire tx_dsp_reset, output wire rx_dsp_reset,
- output wire enable_tx, output wire enable_rx,
- output wire sync_rx,
- output wire [7:0] interp_rate, output wire [7:0] decim_rate,
- output tx_sample_strobe, output strobe_interp,
- output rx_sample_strobe, output strobe_decim,
- input tx_empty,
- input wire [15:0] debug_0,input wire [15:0] debug_1,input wire [15:0] debug_2,input wire [15:0] debug_3,
- output wire [15:0] reg_0, output wire [15:0] reg_1, output wire [15:0] reg_2, output wire [15:0] reg_3
- );
-
- wire [15:0] reg_1_std;
-
- master_control master_control_standard
- ( .master_clk(master_clk),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- .debug_0(debug_0),.debug_1(debug_1),
- .debug_2(debug_2),.debug_3(debug_3),
- .reg_0(reg_0),.reg_1(reg_1_std),.reg_2(reg_2),.reg_3(reg_3) );
-
- // FIXME need a separate reset for all control settings
- // Master/slave Controls assignments
- wire [7:0] rx_master_slave_controls;
- setting_reg_masked #(`FR_RX_MASTER_SLAVE) sr_rx_mstr_slv_ctrl(.clock(master_clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(rx_master_slave_controls));
-
- assign sync_rx = rx_master_slave_controls[`bitnoFR_RX_SYNC] | (rx_master_slave_controls[`bitnoFR_RX_SYNC_SLAVE] & rx_slave_sync);
- //sync if we are told by master_control or if we get a hardware slave sync
- //TODO There can be a one sample difference between master and slave sync.
- // Maybe use a register for sync_rx which uses the (neg or pos) edge of master_clock and/or rx_slave_sync to trigger
- // Or even use a seperate sync_rx_out and sync_rx_internal (which lags behind)
- //TODO make output pin not hardwired
-assign reg_1 ={(rx_master_slave_controls[`bitnoFR_RX_SYNC_MASTER])? sync_rx:reg_1_std[15],reg_1_std[14:0]};
-
-
-endmodule // master_control
diff --git a/usrp/fpga/sdr_lib/phase_acc.v b/usrp/fpga/sdr_lib/phase_acc.v
deleted file mode 100755
index f44853d36..000000000
--- a/usrp/fpga/sdr_lib/phase_acc.v
+++ /dev/null
@@ -1,52 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-// Basic Phase accumulator for DDS
-
-
-module phase_acc (clk,reset,enable,strobe,serial_addr,serial_data,serial_strobe,phase);
- parameter FREQADDR = 0;
- parameter PHASEADDR = 0;
- parameter resolution = 32;
-
- input clk, reset, enable, strobe;
- input [6:0] serial_addr;
- input [31:0] serial_data;
- input serial_strobe;
-
- output reg [resolution-1:0] phase;
- wire [resolution-1:0] freq;
-
- setting_reg #(FREQADDR) sr_rxfreq0(.clock(clk),.reset(1'b0),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(freq));
-
- always @(posedge clk)
- if(reset)
- phase <= #1 32'b0;
- else if(serial_strobe & (serial_addr == PHASEADDR))
- phase <= #1 serial_data;
- else if(enable & strobe)
- phase <= #1 phase + freq;
-
-endmodule // phase_acc
-
-
diff --git a/usrp/fpga/sdr_lib/ram.v b/usrp/fpga/sdr_lib/ram.v
deleted file mode 100644
index fb64cdeae..000000000
--- a/usrp/fpga/sdr_lib/ram.v
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-module ram (input clock, input write,
- input [4:0] wr_addr, input [15:0] wr_data,
- input [4:0] rd_addr, output reg [15:0] rd_data);
-
- reg [15:0] ram_array [0:31];
-
- always @(posedge clock)
- rd_data <= #1 ram_array[rd_addr];
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
-endmodule // ram
diff --git a/usrp/fpga/sdr_lib/ram16.v b/usrp/fpga/sdr_lib/ram16.v
deleted file mode 100644
index 0c93da2be..000000000
--- a/usrp/fpga/sdr_lib/ram16.v
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-module ram16 (input clock, input write,
- input [3:0] wr_addr, input [15:0] wr_data,
- input [3:0] rd_addr, output reg [15:0] rd_data);
-
- reg [15:0] ram_array [0:15];
-
- always @(posedge clock)
- rd_data <= #1 ram_array[rd_addr];
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
-endmodule // ram16
-
diff --git a/usrp/fpga/sdr_lib/ram32.v b/usrp/fpga/sdr_lib/ram32.v
deleted file mode 100644
index 064e2735a..000000000
--- a/usrp/fpga/sdr_lib/ram32.v
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-module ram32 (input clock, input write,
- input [4:0] wr_addr, input [15:0] wr_data,
- input [4:0] rd_addr, output reg [15:0] rd_data);
-
- reg [15:0] ram_array [0:31];
-
- always @(posedge clock)
- rd_data <= #1 ram_array[rd_addr];
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
-endmodule // ram32
-
diff --git a/usrp/fpga/sdr_lib/ram64.v b/usrp/fpga/sdr_lib/ram64.v
deleted file mode 100644
index 084545808..000000000
--- a/usrp/fpga/sdr_lib/ram64.v
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-module ram64 (input clock, input write,
- input [5:0] wr_addr, input [15:0] wr_data,
- input [5:0] rd_addr, output reg [15:0] rd_data);
-
- reg [15:0] ram_array [0:63];
-
- always @(posedge clock)
- rd_data <= #1 ram_array[rd_addr];
-
- always @(posedge clock)
- if(write)
- ram_array[wr_addr] <= #1 wr_data;
-
-endmodule // ram64
diff --git a/usrp/fpga/sdr_lib/rssi.v b/usrp/fpga/sdr_lib/rssi.v
deleted file mode 100644
index e45e2148c..000000000
--- a/usrp/fpga/sdr_lib/rssi.v
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-module rssi (input clock, input reset, input enable,
- input [11:0] adc, output [15:0] rssi, output [15:0] over_count);
-
- wire over_hi = (adc == 12'h7FF);
- wire over_lo = (adc == 12'h800);
- wire over = over_hi | over_lo;
-
- reg [25:0] over_count_int;
- always @(posedge clock)
- if(reset | ~enable)
- over_count_int <= #1 26'd0;
- else
- over_count_int <= #1 over_count_int + (over ? 26'd65535 : 26'd0) - over_count_int[25:10];
-
- assign over_count = over_count_int[25:10];
-
- wire [11:0] abs_adc = adc[11] ? ~adc : adc;
-
- reg [25:0] rssi_int;
- always @(posedge clock)
- if(reset | ~enable)
- rssi_int <= #1 26'd0;
- else
- rssi_int <= #1 rssi_int + abs_adc - rssi_int[25:10];
-
- assign rssi = rssi_int[25:10];
-
-endmodule // rssi
diff --git a/usrp/fpga/sdr_lib/rx_buffer.v b/usrp/fpga/sdr_lib/rx_buffer.v
deleted file mode 100644
index d17294b98..000000000
--- a/usrp/fpga/sdr_lib/rx_buffer.v
+++ /dev/null
@@ -1,237 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Interface to Cypress FX2 bus
-// A packet is 512 Bytes, the fifo has 4096 lines of 18 bits each
-
-`include "../../firmware/include/fpga_regs_common.v"
-`include "../../firmware/include/fpga_regs_standard.v"
-
-module rx_buffer
- ( // Read/USB side
- input usbclk,
- input bus_reset,
- output [15:0] usbdata,
- input RD,
- output reg have_pkt_rdy,
- output reg rx_overrun,
- input clear_status,
- // Write/DSP side
- input rxclk,
- input reset, // DSP side reset (used here), do not reset registers
- input rxstrobe,
- input wire [3:0] channels,
- input wire [15:0] ch_0,
- input wire [15:0] ch_1,
- input wire [15:0] ch_2,
- input wire [15:0] ch_3,
- input wire [15:0] ch_4,
- input wire [15:0] ch_5,
- input wire [15:0] ch_6,
- input wire [15:0] ch_7,
- // Settings, on rxclk also
- input [6:0] serial_addr, input [31:0] serial_data, input serial_strobe,
- input reset_regs, //Only reset registers
- output [31:0] debugbus
- );
-
- wire [15:0] fifodata, fifodata_8;
- reg [15:0] fifodata_16;
-
- wire [11:0] rxfifolevel;
- wire rx_full;
-
- wire bypass_hb, want_q;
- wire [4:0] bitwidth;
- wire [3:0] bitshift;
-
- setting_reg #(`FR_RX_FORMAT) sr_rxformat(.clock(rxclk),.reset(reset_regs),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({bypass_hb,want_q,bitwidth,bitshift}));
-
- // USB Read Side of FIFO
- always @(negedge usbclk)
- have_pkt_rdy <= (rxfifolevel >= 256);
-
- // 257 Bug Fix
- reg [8:0] read_count;
- always @(negedge usbclk)
- if(bus_reset)
- read_count <= 0;
- else if(RD)
- read_count <= read_count + 1;
- else
- read_count <= 0;
-
- // FIFO
- wire ch0_in, ch0_out, iq_out;
- assign ch0_in = (phase == 1);
-
- fifo_4k_18 rxfifo
- ( // DSP Write Side
- .data ( {ch0_in, phase[0], fifodata} ),
- .wrreq (~rx_full & (phase != 0)),
- .wrclk ( rxclk ),
- .wrfull ( rx_full ),
- .wrempty ( ),
- .wrusedw ( ),
- // USB Read Side
- .q ( {ch0_out,iq_out,usbdata} ),
- .rdreq ( RD & ~read_count[8] ),
- .rdclk ( ~usbclk ),
- .rdfull ( ),
- .rdempty ( ),
- .rdusedw ( rxfifolevel ),
- // Async, shared
- .aclr ( reset ) );
-
- // DSP Write Side of FIFO
- reg [15:0] ch_0_reg;
- reg [15:0] ch_1_reg;
- reg [15:0] ch_2_reg;
- reg [15:0] ch_3_reg;
- reg [15:0] ch_4_reg;
- reg [15:0] ch_5_reg;
- reg [15:0] ch_6_reg;
- reg [15:0] ch_7_reg;
-
- always @(posedge rxclk)
- if (rxstrobe)
- begin
- ch_0_reg <= ch_0;
- ch_1_reg <= ch_1;
- ch_2_reg <= ch_2;
- ch_3_reg <= ch_3;
- ch_4_reg <= ch_4;
- ch_5_reg <= ch_5;
- ch_6_reg <= ch_6;
- ch_7_reg <= ch_7;
- end
-
- reg [3:0] phase;
- always @(posedge rxclk)
- if(reset)
- phase <= 4'd0;
- else if(phase == 0)
- begin
- if(rxstrobe)
- phase <= 4'd1;
- end
- else if(~rx_full)
- if(phase == ((bitwidth == 5'd8) ? (channels>>1) : channels))
- phase <= 4'd0;
- else
- phase <= phase + 4'd1;
-
- assign fifodata = (bitwidth == 5'd8) ? fifodata_8 : fifodata_16;
-
- assign fifodata_8 = {round_8(top),round_8(bottom)};
- reg [15:0] top,bottom;
-
- function [7:0] round_8;
- input [15:0] in_val;
-
- round_8 = in_val[15:8] + (in_val[15] & |in_val[7:0]);
- endfunction // round_8
-
- always @*
- case(phase)
- 4'd1 : begin
- bottom = ch_0_reg;
- top = ch_1_reg;
- end
- 4'd2 : begin
- bottom = ch_2_reg;
- top = ch_3_reg;
- end
- 4'd3 : begin
- bottom = ch_4_reg;
- top = ch_5_reg;
- end
- 4'd4 : begin
- bottom = ch_6_reg;
- top = ch_7_reg;
- end
- default : begin
- top = 16'hFFFF;
- bottom = 16'hFFFF;
- end
- endcase // case(phase)
-
- always @*
- case(phase)
- 4'd1 : fifodata_16 = ch_0_reg;
- 4'd2 : fifodata_16 = ch_1_reg;
- 4'd3 : fifodata_16 = ch_2_reg;
- 4'd4 : fifodata_16 = ch_3_reg;
- 4'd5 : fifodata_16 = ch_4_reg;
- 4'd6 : fifodata_16 = ch_5_reg;
- 4'd7 : fifodata_16 = ch_6_reg;
- 4'd8 : fifodata_16 = ch_7_reg;
- default : fifodata_16 = 16'hFFFF;
- endcase // case(phase)
-
- // Detect overrun
- reg clear_status_dsp, rx_overrun_dsp;
- always @(posedge rxclk)
- clear_status_dsp <= clear_status;
-
- always @(negedge usbclk)
- rx_overrun <= rx_overrun_dsp;
-
- always @(posedge rxclk)
- if(reset)
- rx_overrun_dsp <= 1'b0;
- else if(rxstrobe & (phase != 0))
- rx_overrun_dsp <= 1'b1;
- else if(clear_status_dsp)
- rx_overrun_dsp <= 1'b0;
-
- // Debug bus
- //
- // 15:0 rxclk domain => TXA 15:0
- // 31:16 usbclk domain => RXA 15:0
-
- assign debugbus[0] = reset;
- assign debugbus[1] = reset_regs;
- assign debugbus[2] = rxstrobe;
- assign debugbus[6:3] = channels;
- assign debugbus[7] = rx_full;
- assign debugbus[11:8] = phase;
- assign debugbus[12] = ch0_in;
- assign debugbus[13] = clear_status_dsp;
- assign debugbus[14] = rx_overrun_dsp;
- assign debugbus[15] = rxclk;
-
- assign debugbus[16] = bus_reset;
- assign debugbus[17] = RD;
- assign debugbus[18] = have_pkt_rdy;
- assign debugbus[19] = rx_overrun;
- assign debugbus[20] = read_count[0];
- assign debugbus[21] = read_count[8];
- assign debugbus[22] = ch0_out;
- assign debugbus[23] = iq_out;
- assign debugbus[24] = clear_status;
- assign debugbus[30:25] = 0;
- assign debugbus[31] = usbclk;
-
-endmodule // rx_buffer
-
diff --git a/usrp/fpga/sdr_lib/rx_chain.v b/usrp/fpga/sdr_lib/rx_chain.v
deleted file mode 100644
index bc4336e41..000000000
--- a/usrp/fpga/sdr_lib/rx_chain.v
+++ /dev/null
@@ -1,106 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Following defines conditionally include RX path circuitry
-
-`include "config.vh" // resolved relative to project root
-
-module rx_chain
- (input clock,
- input reset,
- input enable,
- input wire [7:0] decim_rate,
- input sample_strobe,
- input decimator_strobe,
- output wire hb_strobe,
- input [6:0] serial_addr, input [31:0] serial_data, input serial_strobe,
- input wire [15:0] i_in,
- input wire [15:0] q_in,
- output wire [15:0] i_out,
- output wire [15:0] q_out,
- output wire [15:0] debugdata,output wire [15:0] debugctrl
- );
-
- parameter FREQADDR = 0;
- parameter PHASEADDR = 0;
-
- wire [31:0] phase;
- wire [15:0] bb_i, bb_q;
- wire [15:0] hb_in_i, hb_in_q;
-
- assign debugdata = hb_in_i;
-
-`ifdef RX_NCO_ON
- phase_acc #(FREQADDR,PHASEADDR,32) rx_phase_acc
- (.clk(clock),.reset(reset),.enable(enable),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .strobe(sample_strobe),.phase(phase) );
-
- cordic rx_cordic
- ( .clock(clock),.reset(reset),.enable(enable),
- .xi(i_in),.yi(q_in),.zi(phase[31:16]),
- .xo(bb_i),.yo(bb_q),.zo() );
-`else
- assign bb_i = i_in;
- assign bb_q = q_in;
- assign sample_strobe = 1;
-`endif // !`ifdef RX_NCO_ON
-
-`ifdef RX_CIC_ON
- cic_decim cic_decim_i_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_i),.signal_out(hb_in_i) );
-`else
- assign hb_in_i = bb_i;
- assign decimator_strobe = sample_strobe;
-`endif
-
-`ifdef RX_HB_ON
- halfband_decim hbd_i_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .strobe_in(decimator_strobe),.strobe_out(hb_strobe),
- .data_in(hb_in_i),.data_out(i_out),.debugctrl(debugctrl) );
-`else
- assign i_out = hb_in_i;
- assign hb_strobe = decimator_strobe;
-`endif
-
-`ifdef RX_CIC_ON
- cic_decim cic_decim_q_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_q),.signal_out(hb_in_q) );
-`else
- assign hb_in_q = bb_q;
-`endif
-
-`ifdef RX_HB_ON
- halfband_decim hbd_q_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .strobe_in(decimator_strobe),.strobe_out(),
- .data_in(hb_in_q),.data_out(q_out) );
-`else
- assign q_out = hb_in_q;
-`endif
-
-
-endmodule // rx_chain
diff --git a/usrp/fpga/sdr_lib/rx_chain_dual.v b/usrp/fpga/sdr_lib/rx_chain_dual.v
deleted file mode 100644
index d9d98f3fc..000000000
--- a/usrp/fpga/sdr_lib/rx_chain_dual.v
+++ /dev/null
@@ -1,103 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module rx_chain_dual
- (input clock,
- input clock_2x,
- input reset,
- input enable,
- input wire [7:0] decim_rate,
- input sample_strobe,
- input decimator_strobe,
- input wire [31:0] freq0,
- input wire [15:0] i_in0,
- input wire [15:0] q_in0,
- output wire [15:0] i_out0,
- output wire [15:0] q_out0,
- input wire [31:0] freq1,
- input wire [15:0] i_in1,
- input wire [15:0] q_in1,
- output wire [15:0] i_out1,
- output wire [15:0] q_out1
- );
-
- wire [15:0] phase;
- wire [15:0] bb_i, bb_q;
- wire [15:0] i_in, q_in;
-
- wire [31:0] phase0;
- wire [31:0] phase1;
- reg [15:0] bb_i0, bb_q0;
- reg [15:0] bb_i1, bb_q1;
-
- // We want to time-share the CORDIC by double-clocking it
-
- phase_acc rx_phase_acc_0
- (.clk(clock),.reset(reset),.enable(enable),
- .strobe(sample_strobe),.freq(freq0),.phase(phase0) );
-
- phase_acc rx_phase_acc_1
- (.clk(clock),.reset(reset),.enable(enable),
- .strobe(sample_strobe),.freq(freq1),.phase(phase1) );
-
- assign phase = clock ? phase0[31:16] : phase1[31:16];
- assign i_in = clock ? i_in0 : i_in1;
- assign q_in = clock ? q_in0 : q_in1;
-
-// This appears reversed because of the number of CORDIC stages
- always @(posedge clock_2x)
- if(clock)
- begin
- bb_i1 <= #1 bb_i;
- bb_q1 <= #1 bb_q;
- end
- else
- begin
- bb_i0 <= #1 bb_i;
- bb_q0 <= #1 bb_q;
- end
-
- cordic rx_cordic
- ( .clock(clock_2x),.reset(reset),.enable(enable),
- .xi(i_in),.yi(q_in),.zi(phase),
- .xo(bb_i),.yo(bb_q),.zo() );
-
- cic_decim cic_decim_i_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_i0),.signal_out(i_out0) );
-
- cic_decim cic_decim_q_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_q0),.signal_out(q_out0) );
-
- cic_decim cic_decim_i_1
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_i1),.signal_out(i_out1) );
-
- cic_decim cic_decim_q_1
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
- .signal_in(bb_q1),.signal_out(q_out1) );
-
-endmodule // rx_chain
diff --git a/usrp/fpga/sdr_lib/rx_dcoffset.v b/usrp/fpga/sdr_lib/rx_dcoffset.v
deleted file mode 100644
index 3be475ed6..000000000
--- a/usrp/fpga/sdr_lib/rx_dcoffset.v
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-module rx_dcoffset (input clock, input enable, input reset,
- input signed [15:0] adc_in, output signed [15:0] adc_out,
- input wire [6:0] serial_addr, input wire [31:0] serial_data, input serial_strobe);
- parameter MYADDR = 0;
-
- reg signed [31:0] integrator;
- wire signed [15:0] scaled_integrator = integrator[31:16] + (integrator[31] & |integrator[15:0]);
- assign adc_out = adc_in - scaled_integrator;
-
- // FIXME do we need signed?
- //FIXME What do we do when clipping?
- always @(posedge clock)
- if(reset)
- integrator <= #1 32'd0;
- else if(serial_strobe & (MYADDR == serial_addr))
- integrator <= #1 {serial_data[15:0],16'd0};
- else if(enable)
- integrator <= #1 integrator + adc_out;
-
-endmodule // rx_dcoffset
diff --git a/usrp/fpga/sdr_lib/serial_io.v b/usrp/fpga/sdr_lib/serial_io.v
deleted file mode 100644
index 62f92bed2..000000000
--- a/usrp/fpga/sdr_lib/serial_io.v
+++ /dev/null
@@ -1,118 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003,2004 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-// Serial Control Bus from Cypress chip
-
-module serial_io
- ( input master_clk,
- input serial_clock,
- input serial_data_in,
- input enable,
- input reset,
- inout wire serial_data_out,
- output reg [6:0] serial_addr,
- output reg [31:0] serial_data,
- output wire serial_strobe,
- input wire [31:0] readback_0,
- input wire [31:0] readback_1,
- input wire [31:0] readback_2,
- input wire [31:0] readback_3,
- input wire [31:0] readback_4,
- input wire [31:0] readback_5,
- input wire [31:0] readback_6,
- input wire [31:0] readback_7
- );
-
- reg is_read;
- reg [7:0] ser_ctr;
- reg write_done;
-
- assign serial_data_out = is_read ? serial_data[31] : 1'bz;
-
- always @(posedge serial_clock, posedge reset, negedge enable)
- if(reset)
- ser_ctr <= #1 8'd0;
- else if(~enable)
- ser_ctr <= #1 8'd0;
- else if(ser_ctr == 39)
- ser_ctr <= #1 8'd0;
- else
- ser_ctr <= #1 ser_ctr + 8'd1;
-
- always @(posedge serial_clock, posedge reset, negedge enable)
- if(reset)
- is_read <= #1 1'b0;
- else if(~enable)
- is_read <= #1 1'b0;
- else if((ser_ctr == 7)&&(serial_addr[6]==1))
- is_read <= #1 1'b1;
-
- always @(posedge serial_clock, posedge reset)
- if(reset)
- begin
- serial_addr <= #1 7'b0;
- serial_data <= #1 32'b0;
- write_done <= #1 1'b0;
- end
- else if(~enable)
- begin
- //serial_addr <= #1 7'b0;
- //serial_data <= #1 32'b0;
- write_done <= #1 1'b0;
- end
- else
- begin
- if(~is_read && (ser_ctr == 39))
- write_done <= #1 1'b1;
- else
- write_done <= #1 1'b0;
- if(is_read & (ser_ctr==8))
- case (serial_addr)
- 7'd1: serial_data <= #1 readback_0;
- 7'd2: serial_data <= #1 readback_1;
- 7'd3: serial_data <= #1 readback_2;
- 7'd4: serial_data <= #1 readback_3;
- 7'd5: serial_data <= #1 readback_4;
- 7'd6: serial_data <= #1 readback_5;
- 7'd7: serial_data <= #1 readback_6;
- 7'd8: serial_data <= #1 readback_7;
- default: serial_data <= #1 32'd0;
- endcase // case(serial_addr)
- else if(ser_ctr >= 8)
- serial_data <= #1 {serial_data[30:0],serial_data_in};
- else if(ser_ctr < 8)
- serial_addr <= #1 {serial_addr[5:0],serial_data_in};
- end // else: !if(~enable)
-
- reg enable_d1, enable_d2;
- always @(posedge master_clk)
- begin
- enable_d1 <= #1 enable;
- enable_d2 <= #1 enable_d1;
- end
-
- assign serial_strobe = enable_d2 & ~enable_d1;
-
-endmodule // serial_io
-
-
diff --git a/usrp/fpga/sdr_lib/setting_reg.v b/usrp/fpga/sdr_lib/setting_reg.v
deleted file mode 100644
index 3d31a9efb..000000000
--- a/usrp/fpga/sdr_lib/setting_reg.v
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-module setting_reg
- ( input clock, input reset, input strobe, input wire [6:0] addr,
- input wire [31:0] in, output reg [31:0] out, output reg changed);
- parameter my_addr = 0;
-
- always @(posedge clock)
- if(reset)
- begin
- out <= #1 32'd0;
- changed <= #1 1'b0;
- end
- else
- if(strobe & (my_addr==addr))
- begin
- out <= #1 in;
- changed <= #1 1'b1;
- end
- else
- changed <= #1 1'b0;
-
-endmodule // setting_reg
diff --git a/usrp/fpga/sdr_lib/setting_reg_masked.v b/usrp/fpga/sdr_lib/setting_reg_masked.v
deleted file mode 100644
index 72f7e21eb..000000000
--- a/usrp/fpga/sdr_lib/setting_reg_masked.v
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-module setting_reg_masked
- ( input clock, input reset, input strobe, input wire [6:0] addr,
- input wire [31:0] in, output reg [31:0] out, output reg changed);
-/* upper 16 bits are mask, lower 16 bits are value
- * Note that you get a 16 bit register, not a 32 bit one */
-
- parameter my_addr = 0;
-
- always @(posedge clock)
- if(reset)
- begin
- out <= #1 32'd0;
- changed <= #1 1'b0;
- end
- else
- if(strobe & (my_addr==addr))
- begin
- out <= #1 (out & ~in[31:16]) | (in[15:0] & in[31:16] );
- changed <= #1 1'b1;
- end
- else
- changed <= #1 1'b0;
-
-endmodule // setting_reg_masked
diff --git a/usrp/fpga/sdr_lib/sign_extend.v b/usrp/fpga/sdr_lib/sign_extend.v
deleted file mode 100644
index eae67faf2..000000000
--- a/usrp/fpga/sdr_lib/sign_extend.v
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// Sign extension "macro"
-// bits_out should be greater than bits_in
-
-module sign_extend (in,out);
- parameter bits_in=0; // FIXME Quartus insists on a default
- parameter bits_out=0;
-
- input [bits_in-1:0] in;
- output [bits_out-1:0] out;
-
- assign out = {{(bits_out-bits_in){in[bits_in-1]}},in};
-
-endmodule
diff --git a/usrp/fpga/sdr_lib/strobe_gen.v b/usrp/fpga/sdr_lib/strobe_gen.v
deleted file mode 100644
index ba1a8ab28..000000000
--- a/usrp/fpga/sdr_lib/strobe_gen.v
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-module strobe_gen
- ( input clock,
- input reset,
- input enable,
- input [7:0] rate, // Rate should be 1 LESS THAN your desired divide ratio
- input strobe_in,
- output wire strobe );
-
-// parameter width = 8;
-
- reg [7:0] counter;
- assign strobe = ~|counter && enable && strobe_in;
-
- always @(posedge clock)
- if(reset | ~enable)
- counter <= #1 8'd0;
- else if(strobe_in)
- if(counter == 0)
- counter <= #1 rate;
- else
- counter <= #1 counter - 8'd1;
-
-endmodule // strobe_gen
diff --git a/usrp/fpga/sdr_lib/tx_buffer.v b/usrp/fpga/sdr_lib/tx_buffer.v
deleted file mode 100644
index 58642229d..000000000
--- a/usrp/fpga/sdr_lib/tx_buffer.v
+++ /dev/null
@@ -1,170 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Interface to Cypress FX2 bus
-// A packet is 512 Bytes. Each fifo line is 2 bytes
-// Fifo has 1024 or 2048 lines
-
-module tx_buffer
- ( // USB Side
- input usbclk,
- input bus_reset, // Used here for the 257-Hack to fix the FX2 bug
- input [15:0] usbdata,
- input wire WR,
- output reg have_space,
- output reg tx_underrun,
- input clear_status,
-
- // DSP Side
- input txclk,
- input reset, // standard DSP-side reset
- input wire [3:0] channels,
- output reg [15:0] tx_i_0,
- output reg [15:0] tx_q_0,
- output reg [15:0] tx_i_1,
- output reg [15:0] tx_q_1,
- input txstrobe,
- output wire tx_empty,
- output [31:0] debugbus
- );
-
- wire [11:0] txfifolevel;
- wire [15:0] fifodata;
- wire rdreq;
- reg [3:0] phase;
- wire sop_f, iq_f;
- reg sop;
-
- // USB Side of FIFO
- reg [15:0] usbdata_reg;
- reg wr_reg;
- reg [8:0] write_count;
-
- always @(posedge usbclk)
- have_space <= (txfifolevel < (4092-256)); // be extra conservative
-
- always @(posedge usbclk)
- begin
- wr_reg <= WR;
- usbdata_reg <= usbdata;
- end
-
- always @(posedge usbclk)
- if(bus_reset)
- write_count <= 0;
- else if(wr_reg)
- write_count <= write_count + 1;
- else
- write_count <= 0;
-
- always @(posedge usbclk)
- sop <= WR & ~wr_reg; // Edge detect
-
- // FIFO
- fifo_4k_18 txfifo
- ( // USB Write Side
- .data ( {sop,write_count[0],usbdata_reg} ),
- .wrreq ( wr_reg & ~write_count[8] ),
- .wrclk ( usbclk ),
- .wrfull ( ),
- .wrempty ( ),
- .wrusedw ( txfifolevel ),
- // DSP Read Side
- .q ( {sop_f, iq_f, fifodata} ),
- .rdreq ( rdreq ),
- .rdclk ( txclk ),
- .rdfull ( ),
- .rdempty ( tx_empty ),
- .rdusedw ( ),
- // Async, shared
- .aclr ( reset ) );
-
- // DAC Side of FIFO
- always @(posedge txclk)
- if(reset)
- begin
- {tx_i_0,tx_q_0,tx_i_1,tx_q_1} <= 64'h0;
- phase <= 4'd0;
- end
- else if(phase == channels)
- begin
- if(txstrobe)
- phase <= 4'd0;
- end
- else
- if(~tx_empty)
- begin
- case(phase)
- 4'd0 : tx_i_0 <= fifodata;
- 4'd1 : tx_q_0 <= fifodata;
- 4'd2 : tx_i_1 <= fifodata;
- 4'd3 : tx_q_1 <= fifodata;
- endcase // case(phase)
- phase <= phase + 4'd1;
- end
-
- assign rdreq = ((phase != channels) & ~tx_empty);
-
- // Detect Underruns, cross clock domains
- reg clear_status_dsp, tx_underrun_dsp;
- always @(posedge txclk)
- clear_status_dsp <= clear_status;
-
- always @(posedge usbclk)
- tx_underrun <= tx_underrun_dsp;
-
- always @(posedge txclk)
- if(reset)
- tx_underrun_dsp <= 1'b0;
- else if(txstrobe & (phase != channels))
- tx_underrun_dsp <= 1'b1;
- else if(clear_status_dsp)
- tx_underrun_dsp <= 1'b0;
-
- // TX debug bus
- //
- // 15:0 txclk domain => TXA [15:0]
- // 31:16 usbclk domain => RXA [15:0]
-
- assign debugbus[0] = reset;
- assign debugbus[1] = txstrobe;
- assign debugbus[2] = rdreq;
- assign debugbus[6:3] = phase;
- assign debugbus[7] = tx_empty;
- assign debugbus[8] = tx_underrun_dsp;
- assign debugbus[9] = iq_f;
- assign debugbus[10] = sop_f;
- assign debugbus[14:11] = 0;
- assign debugbus[15] = txclk;
-
- assign debugbus[16] = bus_reset;
- assign debugbus[17] = WR;
- assign debugbus[18] = wr_reg;
- assign debugbus[19] = have_space;
- assign debugbus[20] = write_count[8];
- assign debugbus[21] = write_count[0];
- assign debugbus[22] = sop;
- assign debugbus[23] = tx_underrun;
- assign debugbus[30:24] = 0;
- assign debugbus[31] = usbclk;
-
-endmodule // tx_buffer
-
diff --git a/usrp/fpga/sdr_lib/tx_chain.v b/usrp/fpga/sdr_lib/tx_chain.v
deleted file mode 100644
index 60f868475..000000000
--- a/usrp/fpga/sdr_lib/tx_chain.v
+++ /dev/null
@@ -1,65 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module tx_chain
- (input clock,
- input reset,
- input enable,
- input wire [7:0] interp_rate,
- input sample_strobe,
- input interpolator_strobe,
- input wire [31:0] freq,
- input wire [15:0] i_in,
- input wire [15:0] q_in,
- output wire [15:0] i_out,
- output wire [15:0] q_out
- );
-
- wire [15:0] bb_i, bb_q;
-
- cic_interp cic_interp_i
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(interp_rate),.strobe_in(interpolator_strobe),.strobe_out(sample_strobe),
- .signal_in(i_in),.signal_out(bb_i) );
-
- cic_interp cic_interp_q
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(interp_rate),.strobe_in(interpolator_strobe),.strobe_out(sample_strobe),
- .signal_in(q_in),.signal_out(bb_q) );
-
-`define NOCORDIC_TX
-`ifdef NOCORDIC_TX
- assign i_out = bb_i;
- assign q_out = bb_q;
-`else
- wire [31:0] phase;
-
- phase_acc phase_acc_tx
- (.clk(clock),.reset(reset),.enable(enable),
- .strobe(sample_strobe),.freq(freq),.phase(phase) );
-
- cordic tx_cordic_0
- ( .clock(clock),.reset(reset),.enable(sample_strobe),
- .xi(bb_i),.yi(bb_q),.zi(phase[31:16]),
- .xo(i_out),.yo(q_out),.zo() );
-`endif
-
-endmodule // tx_chain
diff --git a/usrp/fpga/sdr_lib/tx_chain_hb.v b/usrp/fpga/sdr_lib/tx_chain_hb.v
deleted file mode 100644
index 5594348b4..000000000
--- a/usrp/fpga/sdr_lib/tx_chain_hb.v
+++ /dev/null
@@ -1,76 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module tx_chain_hb
- (input clock,
- input reset,
- input enable,
- input wire [7:0] interp_rate,
- input sample_strobe,
- input interpolator_strobe,
- input hb_strobe,
- input wire [31:0] freq,
- input wire [15:0] i_in,
- input wire [15:0] q_in,
- output wire [15:0] i_out,
- output wire [15:0] q_out,
-output wire [15:0] debug, output [15:0] hb_i_out
- );
-assign debug[15:13] = {sample_strobe,hb_strobe,interpolator_strobe};
-
- wire [15:0] bb_i, bb_q;
- wire [15:0] hb_i_out, hb_q_out;
-
- halfband_interp hb
- (.clock(clock),.reset(reset),.enable(enable),
- .strobe_in(interpolator_strobe),.strobe_out(hb_strobe),
- .signal_in_i(i_in),.signal_in_q(q_in),
- .signal_out_i(hb_i_out),.signal_out_q(hb_q_out),
- .debug(debug[12:0]));
-
- cic_interp cic_interp_i
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(interp_rate),.strobe_in(hb_strobe),.strobe_out(sample_strobe),
- .signal_in(hb_i_out),.signal_out(bb_i) );
-
- cic_interp cic_interp_q
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(interp_rate),.strobe_in(hb_strobe),.strobe_out(sample_strobe),
- .signal_in(hb_q_out),.signal_out(bb_q) );
-
-`define NOCORDIC_TX
-`ifdef NOCORDIC_TX
- assign i_out = bb_i;
- assign q_out = bb_q;
-`else
- wire [31:0] phase;
-
- phase_acc phase_acc_tx
- (.clk(clock),.reset(reset),.enable(enable),
- .strobe(sample_strobe),.freq(freq),.phase(phase) );
-
- cordic tx_cordic_0
- ( .clock(clock),.reset(reset),.enable(sample_strobe),
- .xi(bb_i),.yi(bb_q),.zi(phase[31:16]),
- .xo(i_out),.yo(q_out),.zo() );
-`endif
-
-endmodule // tx_chain
diff --git a/usrp/fpga/tb/.gitignore b/usrp/fpga/tb/.gitignore
deleted file mode 100644
index 6bc85aa2d..000000000
--- a/usrp/fpga/tb/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/*.vcd
-/*.out
-/fullchip_tb
diff --git a/usrp/fpga/tb/cbus_tb.v b/usrp/fpga/tb/cbus_tb.v
deleted file mode 100644
index 53cc1272b..000000000
--- a/usrp/fpga/tb/cbus_tb.v
+++ /dev/null
@@ -1,71 +0,0 @@
-module cbus_tb;
-
-`define ch1in_freq 0
-`define ch2in_freq 1
-`define ch3in_freq 2
-`define ch4in_freq 3
-`define ch1out_freq 4
-`define ch2out_freq 5
-`define ch3out_freq 6
-`define ch4out_freq 7
-`define rates 8
-`define misc 9
-
- task send_config_word;
- input [7:0] addr;
- input [31:0] data;
- integer i;
-
- begin
- #10 serenable = 1;
- for(i=7;i>=0;i=i-1)
- begin
- #10 serdata = addr[i];
- #10 serclk = 0;
- #10 serclk = 1;
- #10 serclk = 0;
- end
- for(i=31;i>=0;i=i-1)
- begin
- #10 serdata = data[i];
- #10 serclk = 0;
- #10 serclk = 1;
- #10 serclk = 0;
- end
- #10 serenable = 0;
- // #10 serclk = 1;
- // #10 serclk = 0;
- end
- endtask // send_config_word
-
- initial $dumpfile("cbus_tb.vcd");
- initial $dumpvars(0,cbus_tb);
-
- initial reset = 1;
- initial #500 reset = 0;
-
- reg serclk, serdata, serenable, reset;
- wire SDO;
-
- control_bus control_bus
- ( .serial_clock(serclk),
- .serial_data_in(serdata),
- .enable(serenable),
- .reset(reset),
- .serial_data_out(SDO) );
-
-
- initial
- begin
- #1000 send_config_word(8'd1,32'hDEAD_BEEF);
- #1000 send_config_word(8'd3,32'hDDEE_FF01);
- #1000 send_config_word(8'd19,32'hFFFF_FFFF);
- #1000 send_config_word(8'd23,32'h1234_FEDC);
- #1000 send_config_word(8'h80,32'h0);
- #1000 send_config_word(8'h81,32'h0);
- #1000 send_config_word(8'h82,32'h0);
- #1000 reset = 1;
- #1 $finish;
- end
-
-endmodule // cbus_tb
diff --git a/usrp/fpga/tb/cordic_tb.v b/usrp/fpga/tb/cordic_tb.v
deleted file mode 100644
index 946fc776c..000000000
--- a/usrp/fpga/tb/cordic_tb.v
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-
-module cordic_tb();
-
- cordic cordic(clk, reset, enable, xi, yi, zi, xo, yo, zo );
-
- reg reset;
- reg clk;
- reg enable;
- reg [15:0] xi, yi, zi;
-
- initial reset = 1'b1;
- initial #1000 reset = 1'b0;
-
- initial clk = 1'b0;
- always #50 clk <= ~clk;
-
- initial enable = 1'b1;
-
- initial zi = 16'b0;
-
- always @(posedge clk)
- zi <= #1 zi + 16'd0;
-
- wire [15:0] xo,yo,zo;
-
- initial $dumpfile("cordic.vcd");
- initial $dumpvars(0,cordic_tb);
- initial
- begin
-`include "sine.txt"
- end
-
- wire [15:0] xiu = {~xi[15],xi[14:0]};
- wire [15:0] yiu = {~yi[15],yi[14:0]};
- wire [15:0] xou = {~xo[15],xo[14:0]};
- wire [15:0] you = {~yo[15],yo[14:0]};
- initial $monitor("%d\t%d\t%d\t%d\t%d",$time,xiu,yiu,xou,you);
-
-endmodule // cordic_tb
diff --git a/usrp/fpga/tb/decim_tb.v b/usrp/fpga/tb/decim_tb.v
deleted file mode 100644
index d9a926125..000000000
--- a/usrp/fpga/tb/decim_tb.v
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// testbench for fullchip
-
-module decim_tb();
-
-`include "usrp_tasks.v"
-
- reg clk_120mhz;
- reg usbclk;
- reg reset;
-
- reg [11:0] adc1_data, adc2_data;
- wire [13:0] dac1_data, dac2_data;
-
- wire [5:0] usbctl;
- wire [5:0] usbrdy;
-
- wire [15:0] usbdata;
-
- reg WE, RD, OE;
-
- assign usbctl[0] = WE;
- assign usbctl[1] = RD;
- assign usbctl[2] = OE;
- assign usbctl[5:3] = 0;
-
- reg tb_oe;
- assign usbdata = tb_oe ? usbdatareg : 16'hxxxx;
- reg serload, serenable, serclk, serdata;
- reg enable_tx, enable_rx;
- reg [15:0] usbdatareg;
-
-///////////////////////////////////////////////
-// Simulation Control
-initial
-begin
- $dumpfile("decim_tb.vcd");
- $dumpvars(0, fc_tb);
-end
-
-initial #100000 $finish;
-
-///////////////////////////////////////////////
-// Monitors
-
-reg [7:0] counter_decim;
-wire [7:0] decim_rate;
-assign decim_rate = 32;
-initial $monitor(dac1_data);
-
- always @(posedge clk_120mhz)
- begin
- if(reset | ~enable_tx)
- counter_decim <= #1 0;
- else if(counter_decim == 0)
- counter_decim <= #1 decim_rate - 8'b1;
- else
- counter_decim <= #1 counter_decim - 8'b1;
- end
-
-///////////////////////////////////////////////
-// Clock and reset
-
-initial clk_120mhz = 0;
-initial usbclk = 0;
-always #48 clk_120mhz = ~clk_120mhz;
-always #120 usbclk = ~usbclk;
-
-initial reset = 1'b1;
-initial #500 reset = 1'b0;
-
-
-initial enable_tx = 1'b1;
-
- wire [31:0] decim_out, q_decim_out;
- wire [31:0] decim_out;
- wire [31:0] phase;
-
- cic_decim #(.bitwidth(32),.stages(4))
- decim_i(.clock(clk_120mhz),.reset(reset),.enable(enable_tx),
- .strobe(counter_decim == 8'b0),.signal_in(32'h1),.signal_out(decim_out));
-
- cic_decim #(.bitwidth(32),.stages(4))
- decim(.clock(clk_120mhz),.reset(reset),.enable(enable_tx),
- .strobe(counter_decim == 8'b0),.signal_in(32'h1),.signal_out(decim_out));
-
-endmodule
diff --git a/usrp/fpga/tb/fullchip_tb.v b/usrp/fpga/tb/fullchip_tb.v
deleted file mode 100755
index 2406fa777..000000000
--- a/usrp/fpga/tb/fullchip_tb.v
+++ /dev/null
@@ -1,174 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// testbench for fullchip
-
-`timescale 1ns/1ns
-
-module fullchip_tb();
-
-`include "usrp_tasks.v"
-
-fullchip fullchip
- (
- .clk_120mhz(clk_120mhz),
- .reset(reset),
- .enable_rx(enable_rx),
- .enable_tx(enable_tx),
- .SLD(serload),
- .SEN(serenable),
- .clear_status(),
- .SDI(serdata),
- .SCLK(serclk),
-
- .adc1_data(adc1_data),
- .adc2_data(adc2_data),
- .adc3_data(adc1_data),
- .adc4_data(adc2_data),
-
- .dac1_data(dac1_data),
- .dac2_data(dac2_data),
- .dac3_data(),.dac4_data(),
-
- .adclk0(adclk),.adclk1(),
-
- .adc_oeb(),.adc_otr(4'b0),
-
- .clk_out(clk_out),
-
- .misc_pins(),
-
- // USB interface
- .usbclk(usbclk),.usbctl(usbctl),
- .usbrdy(usbrdy),.usbdata(usbdata)
- );
-
- reg clk_120mhz;
- reg usbclk;
- reg reset;
-
- reg [11:0] adc1_data, adc2_data;
- wire [13:0] dac1_data, dac2_data;
-
- wire [5:0] usbctl;
- wire [5:0] usbrdy;
-
- wire [15:0] usbdata;
-
- reg WE, RD, OE;
-
- assign usbctl[0] = WE;
- assign usbctl[1] = RD;
- assign usbctl[2] = OE;
- assign usbctl[5:3] = 0;
-
- wire have_packet_rdy = usbrdy[1];
-
- reg tb_oe;
- initial tb_oe=1'b1;
-
- assign usbdata = tb_oe ? usbdatareg : 16'hxxxx;
- reg serload, serenable, serclk, serdata;
- reg enable_tx, enable_rx;
- reg [15:0] usbdatareg;
-
-///////////////////////////////////////////////
-// Simulation Control
-initial
-begin
- $dumpfile("fullchip_tb.vcd");
- $dumpvars(0, fullchip_tb);
-end
-
-//initial #1000000 $finish;
-
-///////////////////////////////////////////////
-// Monitors
-
-//initial $monitor(dac1_data);
-
-///////////////////////////////////////////////
-// Clock and reset
-
-initial clk_120mhz = 0;
-initial usbclk = 0;
-always #24 clk_120mhz = ~clk_120mhz;
-always #60 usbclk = ~usbclk;
-
-initial reset = 1'b1;
-initial #500 reset = 1'b0;
-
-/////////////////////////////////////////////////
-// Run AD input
-
-always @(posedge adclk) adc1_data <= #1 12'd1234;
-always @(posedge adclk) adc2_data <= #1 12'd1234;
-
-/////////////////////////////////////////////////
-// USB interface
-
- initial
- begin
- initialize_usb;
- #30000 @(posedge usbclk);
- burst_usb_write(257);
-
- #30000 burst_usb_read(256);
- #10000 $finish;
-
-// repeat(30)
-// begin
-// write_from_usb;
-// read_from_usb;
-// end
-end
-
-/////////////////////////////////////////////////
-// TX and RX enable
-
-initial enable_tx = 1'b0;
-initial #40000 enable_tx = 1'b1;
-initial enable_rx = 1'b0;
-initial #40000 enable_rx = 1'b1;
-
-//////////////////////////////////////////////////
-// Set up control bus
-
-initial
-begin
- #1000 send_config_word(`ch1in_freq,32'h0); // 1 MHz on 60 MHz clock
- send_config_word(`ch2in_freq,32'h0);
- send_config_word(`ch3in_freq,32'h0);
- send_config_word(`ch4in_freq,32'h0);
- send_config_word(`ch1out_freq,32'h01234567);
- send_config_word(`ch2out_freq,32'h0);
- send_config_word(`ch3out_freq,32'h0);
- send_config_word(`ch4out_freq,32'h0);
- send_config_word(`misc,32'h0);
- send_config_word(`rates,{8'd2,8'd12,8'h0f,8'h07});
- // adc, ext, interp, decim
-end
-
-/////////////////////////////////////////////////////////
-
-endmodule
-
diff --git a/usrp/fpga/tb/interp_tb.v b/usrp/fpga/tb/interp_tb.v
deleted file mode 100755
index 830fceb31..000000000
--- a/usrp/fpga/tb/interp_tb.v
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-// testbench for fullchip
-
-module interp_tb();
-
-`include "usrp_tasks.v"
-
- reg clk_120mhz;
- reg usbclk;
- reg reset;
-
- reg [11:0] adc1_data, adc2_data;
- wire [13:0] dac1_data, dac2_data;
-
- wire [5:0] usbctl;
- wire [5:0] usbrdy;
-
- wire [15:0] usbdata;
-
- reg WE, RD, OE;
-
- assign usbctl[0] = WE;
- assign usbctl[1] = RD;
- assign usbctl[2] = OE;
- assign usbctl[5:3] = 0;
-
- reg tb_oe;
- assign usbdata = tb_oe ? usbdatareg : 16'hxxxx;
- reg serload, serenable, serclk, serdata;
- reg enable_tx, enable_rx;
- reg [15:0] usbdatareg;
-
-///////////////////////////////////////////////
-// Simulation Control
-initial
-begin
- $dumpfile("interp_tb.vcd");
- $dumpvars(0, fc_tb);
-end
-
-initial #100000 $finish;
-
-///////////////////////////////////////////////
-// Monitors
-
-reg [7:0] counter_interp;
-wire [7:0] interp_rate;
-assign interp_rate = 32;
-initial $monitor(dac1_data);
-
- always @(posedge clk_120mhz)
- begin
- if(reset | ~enable_tx)
- counter_interp <= #1 0;
- else if(counter_interp == 0)
- counter_interp <= #1 interp_rate - 8'b1;
- else
- counter_interp <= #1 counter_interp - 8'b1;
- end
-
-///////////////////////////////////////////////
-// Clock and reset
-
-initial clk_120mhz = 0;
-initial usbclk = 0;
-always #48 clk_120mhz = ~clk_120mhz;
-always #120 usbclk = ~usbclk;
-
-initial reset = 1'b1;
-initial #500 reset = 1'b0;
-
-
-initial enable_tx = 1'b1;
-
- wire [31:0] interp_out, q_interp_out;
- wire [31:0] decim_out;
- wire [31:0] phase;
-
- cic_interp #(.bitwidth(32),.stages(4))
- interp_i(.clock(clk_120mhz),.reset(reset),.enable(enable_tx),
- .strobe(counter_interp == 8'b0),.signal_in(32'h1),.signal_out(interp_out));
-
- cic_decim #(.bitwidth(32),.stages(4))
- decim(.clock(clk_120mhz),.reset(reset),.enable(enable_tx),
- .strobe(counter_interp == 8'b0),.signal_in(32'h1),.signal_out(decim_out));
-
-endmodule
diff --git a/usrp/fpga/tb/justinterp_tb.v b/usrp/fpga/tb/justinterp_tb.v
deleted file mode 100644
index f97696488..000000000
--- a/usrp/fpga/tb/justinterp_tb.v
+++ /dev/null
@@ -1,73 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-module cic_decim_tb;
-
-cic_decim #(.bitwidth(16),.stages(4))
- decim(clock,reset,enable,strobe_in,strobe_out,signal_in,signal_out);
-
- reg clock;
- reg reset;
- reg enable;
- wire strobe;
- reg [15:0] signal_in;
- wire [15:0] signal_out;
-
- assign strobe_in = 1'b1;
- reg strobe_out;
-
- always @(posedge clock)
- while(1)
- begin
- @(posedge clock);
- @(posedge clock);
- @(posedge clock);
- @(posedge clock);
- strobe_out <= 1'b1;
- @(posedge clock);
- @(posedge clock);
- @(posedge clock);
- @(posedge clock);
- strobe_out <= 1'b0;
- end
-
- initial clock = 0;
- always #50 clock = ~clock;
-
- initial reset = 1;
- initial #1000 reset = 0;
-
- initial enable = 0;
- initial #2000 enable = 1;
-
- initial signal_in = 16'h1;
- initial #500000 signal_in = 16'h7fff;
- initial #1000000 signal_in = 16'h8000;
- initial #1500000 signal_in = 16'hffff;
-
-
- initial $dumpfile("decim.vcd");
- initial $dumpvars(0,cic_decim_tb);
-
- initial #10000000 $finish;
-
-endmodule // cic_decim_tb
diff --git a/usrp/fpga/tb/makesine.pl b/usrp/fpga/tb/makesine.pl
deleted file mode 100755
index 9aebd6947..000000000
--- a/usrp/fpga/tb/makesine.pl
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/perl
-
-$angle = 0;
-$angle_inc = 2*3.14159/87.2;
-$amp = 1;
-$amp_rate = 1.0035;
-for($i=0;$i<3500;$i++)
- {
- printf("@(posedge clk);xi<= #1 16'h%x;yi<= #1 16'h%x;\n",65535&int($amp*cos($angle)),65535&int($amp*sin($angle)));
- $angle += $angle_inc;
- $amp *= $amp_rate;
- }
-
-printf("\$finish;\n");
diff --git a/usrp/fpga/tb/run_cordic b/usrp/fpga/tb/run_cordic
deleted file mode 100755
index 68144fc83..000000000
--- a/usrp/fpga/tb/run_cordic
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-iverilog -y ../sdr_lib -o cordic_tb cordic_tb.v
-
diff --git a/usrp/fpga/tb/run_fullchip b/usrp/fpga/tb/run_fullchip
deleted file mode 100755
index eb81d7ff7..000000000
--- a/usrp/fpga/tb/run_fullchip
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-iverilog -y ../toplevel/fullchip -y ../sdr_lib -y ../models -y . -o fullchip_tb fullchip_tb.v
-
diff --git a/usrp/fpga/tb/usrp_tasks.v b/usrp/fpga/tb/usrp_tasks.v
deleted file mode 100755
index 93395f96a..000000000
--- a/usrp/fpga/tb/usrp_tasks.v
+++ /dev/null
@@ -1,145 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Tasks
-
-/////////////////////////////////////////////////
-// USB interface
-
-task initialize_usb;
-begin
- OE = 0;WE = 0;RD = 0;
- usbdatareg <= 16'h0;
-end
-endtask
-
-task write_from_usb;
-begin
- tb_oe <= 1'b1;
- @(posedge usbclk);
- usbdatareg <= #1 $random % 65536;
- WE <= #1 1'b1;
- @(posedge usbclk)
- WE <= #1 1'b0;
- tb_oe <= #1 1'b0;
-end
-endtask
-
-task burst_usb_write;
- input [31:0] repeat_count;
-
- begin
- tb_oe <= 1'b1;
- repeat(repeat_count)
- begin
- @(posedge usbclk)
- usbdatareg <= #1 usbdatareg + 1; //$random % 65536;
- WE <= #1 1'b1;
- end
- @(posedge usbclk)
- WE <= #1 1'b0;
- tb_oe <= 1'b0;
- end
-endtask // burst_usb_write
-
-
-task read_from_usb;
-begin
- @(posedge usbclk);
- RD <= #1 1'b1;
- @(posedge usbclk);
- RD <= #1 1'b0;
- OE <= #1 1'b1;
- @(posedge usbclk);
- OE <= #1 1'b0;
-end
-endtask
-
-task burst_usb_read;
- input [31:0] repeat_count;
- begin
- while (~have_packet_rdy) begin
- @(posedge usbclk);
- end
-
- @(posedge usbclk)
- RD <= #1 1'b1;
- repeat(repeat_count)
- begin
- @(posedge usbclk)
- OE <= #1 1'b1;
- end
- RD <= #1 1'b0;
- @(posedge usbclk);
- OE <= #1 1'b0;
- end
-endtask // burst_usb_read
-
-/////////////////////////////////////////////////
-// TX and RX enable
-
-//////////////////////////////////////////////////
-// Set up control bus
-
-`define ch1in_freq 0
-`define ch2in_freq 1
-`define ch3in_freq 2
-`define ch4in_freq 3
-`define ch1out_freq 4
-`define ch2out_freq 5
-`define ch3out_freq 6
-`define ch4out_freq 7
-`define rates 8
-`define misc 9
-
- task send_config_word;
- input [7:0] addr;
- input [31:0] data;
- integer i;
-
- begin
- #10 serenable = 1;
- for(i=7;i>=0;i=i-1)
- begin
- #10 serdata = addr[i];
- #10 serclk = 0;
- #10 serclk = 1;
- #10 serclk = 0;
- end
- for(i=31;i>=0;i=i-1)
- begin
- #10 serdata = data[i];
- #10 serclk = 0;
- #10 serclk = 1;
- #10 serclk = 0;
- end
- #10 serenable = 0;
- // #10 serload = 0;
- // #10 serload = 1;
- #10 serclk = 1;
- #10 serclk = 0;
- //#10 serload = 0;
- end
- endtask // send_config_word
-
-
-/////////////////////////////////////////////////////////
-
diff --git a/usrp/fpga/toplevel/include/common_config_1rxhb_1tx.vh b/usrp/fpga/toplevel/include/common_config_1rxhb_1tx.vh
deleted file mode 100644
index fb2e915b1..000000000
--- a/usrp/fpga/toplevel/include/common_config_1rxhb_1tx.vh
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ------------------------------------------------------------
-// If TX_ON is not defined, there is *no* transmit circuitry built
- `define TX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
-// to respectively enable 1, 2 or 4 transmit channels.
-// [Please note that only TX_SINGLE and TX_DUAL are currently valid]
- `define TX_SINGLE
-//`define TX_DUAL
-//`define TX_QUAD
-
-// ------------------------------------------------------------
-// Define TX_HB_ON to enable the transmit halfband filter
-// [Not implemented]
-//`define TX_HB_ON
-
-// ------------------------------------------------------------
-// IF RX_ON is not defined, there is *no* receive circuitry built
- `define RX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
-// to respectively define 1, 2 or 4 receive channels.
-
- `define RX_SINGLE
-//`define RX_DUAL
-//`define RX_QUAD
-
-// ------------------------------------------------------------
-// Define RX_HB_ON to enable the receive halfband filter
- `define RX_HB_ON
-
-// ------------------------------------------------------------
-// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
- `define RX_NCO_ON
-
-// ------------------------------------------------------------
-// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
- `define RX_CIC_ON
diff --git a/usrp/fpga/toplevel/include/common_config_2rx_0tx.vh b/usrp/fpga/toplevel/include/common_config_2rx_0tx.vh
deleted file mode 100644
index c97c5a32b..000000000
--- a/usrp/fpga/toplevel/include/common_config_2rx_0tx.vh
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-// Copyright (C) 2006 Martin Dudok van Heel
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-// ------------------------------------------------------------
-// If TX_ON is not defined, there is *no* transmit circuitry built
-// `define TX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
-// to respectively enable 1, 2 or 4 transmit channels.
-// [Please note that only TX_SINGLE and TX_DUAL are currently valid]
-//`define TX_SINGLE
-//`define TX_DUAL
-//`define TX_QUAD
-
-// ------------------------------------------------------------
-// Define TX_HB_ON to enable the transmit halfband filter
-// [Not implemented]
-//`define TX_HB_ON
-
-// ------------------------------------------------------------
-// IF RX_ON is not defined, there is *no* receive circuitry built
- `define RX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
-// to respectively define 1, 2 or 4 receive channels.
-
-//`define RX_SINGLE
-`define RX_DUAL
-//`define RX_QUAD
-
-// ------------------------------------------------------------
-// Define RX_HB_ON to enable the receive halfband filter
-//`define RX_HB_ON
-
-// ------------------------------------------------------------
-// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
- `define RX_NCO_ON
-
-// ------------------------------------------------------------
-// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
- `define RX_CIC_ON
diff --git a/usrp/fpga/toplevel/include/common_config_2rxhb_0tx.vh b/usrp/fpga/toplevel/include/common_config_2rxhb_0tx.vh
deleted file mode 100644
index 459268b6a..000000000
--- a/usrp/fpga/toplevel/include/common_config_2rxhb_0tx.vh
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-// Copyright (C) 2006 Martin Dudok van Heel
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-// ------------------------------------------------------------
-// If TX_ON is not defined, there is *no* transmit circuitry built
-// `define TX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
-// to respectively enable 1, 2 or 4 transmit channels.
-// [Please note that only TX_SINGLE and TX_DUAL are currently valid]
-//`define TX_SINGLE
-//`define TX_DUAL
-//`define TX_QUAD
-
-// ------------------------------------------------------------
-// Define TX_HB_ON to enable the transmit halfband filter
-// [Not implemented]
-//`define TX_HB_ON
-
-// ------------------------------------------------------------
-// IF RX_ON is not defined, there is *no* transmit circuitry built
- `define RX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
-// to respectively define 1, 2 or 4 receive channels.
-
-//`define RX_SINGLE
- `define RX_DUAL
-//`define RX_QUAD
-
-// ------------------------------------------------------------
-// Define RX_HB_ON to enable the receive halfband filter
- `define RX_HB_ON
-
-// ------------------------------------------------------------
-// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
- `define RX_NCO_ON
-
-// ------------------------------------------------------------
-// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
- `define RX_CIC_ON
diff --git a/usrp/fpga/toplevel/include/common_config_2rxhb_2tx.vh b/usrp/fpga/toplevel/include/common_config_2rxhb_2tx.vh
deleted file mode 100644
index ecf0fa03e..000000000
--- a/usrp/fpga/toplevel/include/common_config_2rxhb_2tx.vh
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ------------------------------------------------------------
-// If TX_ON is not defined, there is *no* transmit circuitry built
- `define TX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
-// to respectively enable 1, 2 or 4 transmit channels.
-// [Please note that only TX_SINGLE and TX_DUAL are currently valid]
-//`define TX_SINGLE
- `define TX_DUAL
-//`define TX_QUAD
-
-// ------------------------------------------------------------
-// Define TX_HB_ON to enable the transmit halfband filter
-// [Not implemented]
-//`define TX_HB_ON
-
-// ------------------------------------------------------------
-// IF RX_ON is not defined, there is *no* receive circuitry built
- `define RX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
-// to respectively define 1, 2 or 4 receive channels.
-
-//`define RX_SINGLE
- `define RX_DUAL
-//`define RX_QUAD
-
-// ------------------------------------------------------------
-// Define RX_HB_ON to enable the receive halfband filter
- `define RX_HB_ON
-
-// ------------------------------------------------------------
-// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
- `define RX_NCO_ON
-
-// ------------------------------------------------------------
-// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
- `define RX_CIC_ON
diff --git a/usrp/fpga/toplevel/include/common_config_4rx_0tx.vh b/usrp/fpga/toplevel/include/common_config_4rx_0tx.vh
deleted file mode 100644
index 498419570..000000000
--- a/usrp/fpga/toplevel/include/common_config_4rx_0tx.vh
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ------------------------------------------------------------
-// If TX_ON is not defined, there is *no* transmit circuitry built
-// `define TX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
-// to respectively enable 1, 2 or 4 transmit channels.
-// [Please note that only TX_SINGLE and TX_DUAL are currently valid]
-//`define TX_SINGLE
-//`define TX_DUAL
-//`define TX_QUAD
-
-// ------------------------------------------------------------
-// Define TX_HB_ON to enable the transmit halfband filter
-// [Not implemented]
-//`define TX_HB_ON
-
-// ------------------------------------------------------------
-// IF RX_ON is not defined, there is *no* receive circuitry built
- `define RX_ON
-
-// ------------------------------------------------------------
-// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
-// to respectively define 1, 2 or 4 receive channels.
-
-//`define RX_SINGLE
-//`define RX_DUAL
- `define RX_QUAD
-
-// ------------------------------------------------------------
-// Define RX_HB_ON to enable the receive halfband filter
-//`define RX_HB_ON
-
-// ------------------------------------------------------------
-// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
- `define RX_NCO_ON
-
-// ------------------------------------------------------------
-// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
- `define RX_CIC_ON
diff --git a/usrp/fpga/toplevel/include/common_config_bottom.vh b/usrp/fpga/toplevel/include/common_config_bottom.vh
deleted file mode 100644
index 3129798a1..000000000
--- a/usrp/fpga/toplevel/include/common_config_bottom.vh
+++ /dev/null
@@ -1,104 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006,2007 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ====================================================================
-// This is the common tail for standard configuation
-// ====================================================================
-//
-// >>>> DO NOT EDIT BELOW HERE <<<<
-//
-// N.B., *all* the remainder of the code should be conditionalized
-// only in terms of:
-//
-// TX_ON, TX_EN_0, TX_EN_1, TX_EN_2, TX_EN_3, TX_CAP_NCHAN, TX_CAP_HB,
-// RX_ON, RX_EN_0, RX_EN_1, RX_EN_2, RX_EN_3, RX_CAP_NCHAN, RX_CAP_HB,
-// RX_NCO_ON, RX_CIC_ON
-// ====================================================================
-
-`ifdef TX_ON
-
- `ifdef TX_SINGLE
- `define TX_EN_0
- `define TX_CAP_NCHAN 3'd1
- `endif
-
- `ifdef TX_DUAL
- `define TX_EN_0
- `define TX_EN_1
- `define TX_CAP_NCHAN 3'd2
- `endif
-
- `ifdef TX_QUAD
- `define TX_EN_0
- `define TX_EN_1
- `define TX_EN_2
- `define TX_EN_3
- `define TX_CAP_NCHAN 3'd4
- `endif
-
- `ifdef TX_HB_ON
- `define TX_CAP_HB 1
- `else
- `define TX_CAP_HB 0
- `endif
-
-`else // !ifdef TX_ON
-
- `define TX_CAP_NCHAN 3'd0
- `define TX_CAP_HB 0
-
-`endif // !ifdef TX_ON
-
-// --------------------------------------------------------------------
-
-`ifdef RX_ON
-
- `ifdef RX_SINGLE
- `define RX_EN_0
- `define RX_CAP_NCHAN 3'd1
- `endif
-
- `ifdef RX_DUAL
- `define RX_EN_0
- `define RX_EN_1
- `define RX_CAP_NCHAN 3'd2
- `endif
-
- `ifdef RX_QUAD
- `define RX_EN_0
- `define RX_EN_1
- `define RX_EN_2
- `define RX_EN_3
- `define RX_CAP_NCHAN 3'd4
- `endif
-
- `ifdef RX_HB_ON
- `define RX_CAP_HB 1
- `else
- `define RX_CAP_HB 0
- `endif
-
-`else // !ifdef RX_ON
-
- `define RX_CAP_NCHAN 3'd0
- `define RX_CAP_HB 0
-
-`endif // !ifdef RX_ON
diff --git a/usrp/fpga/toplevel/mrfm/.gitignore b/usrp/fpga/toplevel/mrfm/.gitignore
deleted file mode 100644
index fe06aad0d..000000000
--- a/usrp/fpga/toplevel/mrfm/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/*.qws
-/*.eqn
-/*.done
-/*.htm
-/*.rpt
-/*.ini
-/*.fsf
-/*.jam
-/*.jbc
-/*.pin
-/*.pof
-/*.sof
-/*.rbf
-/*.ttf
-/*.summary
-/a.out
-/db
diff --git a/usrp/fpga/toplevel/mrfm/biquad_2stage.v b/usrp/fpga/toplevel/mrfm/biquad_2stage.v
deleted file mode 100644
index 9b769014d..000000000
--- a/usrp/fpga/toplevel/mrfm/biquad_2stage.v
+++ /dev/null
@@ -1,131 +0,0 @@
-`include "mrfm.vh"
-
-module biquad_2stage (input clock, input reset, input strobe_in,
- input serial_strobe, input [6:0] serial_addr, input [31:0] serial_data,
- input wire [15:0] sample_in, output reg [15:0] sample_out, output wire [63:0] debugbus);
-
- wire [3:0] coeff_addr, coeff_wr_addr;
- wire [3:0] data_addr, data_wr_addr;
- reg [3:0] cur_offset, data_addr_int, data_wr_addr_int;
-
- wire [15:0] coeff, coeff_wr_data, data, data_wr_data;
- wire coeff_wr;
- reg data_wr;
-
- wire [30:0] product;
- wire [33:0] accum;
- wire [15:0] scaled_accum;
-
- wire [7:0] shift;
- reg [3:0] phase;
- wire enable_mult, enable_acc, latch_out, select_input;
- reg done, clear_acc;
-
- setting_reg #(`FR_MRFM_IIR_COEFF) sr_coeff(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({coeff_wr_addr,coeff_wr_data}),.changed(coeff_wr));
-
- setting_reg #(`FR_MRFM_IIR_SHIFT) sr_shift(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(shift),.changed());
-
- ram16 coeff_ram(.clock(clock),.write(coeff_wr),.wr_addr(coeff_wr_addr),.wr_data(coeff_wr_data),
- .rd_addr(coeff_addr),.rd_data(coeff));
-
- ram16 data_ram(.clock(clock),.write(data_wr),.wr_addr(data_wr_addr),.wr_data(data_wr_data),
- .rd_addr(data_addr),.rd_data(data));
-
- mult mult (.clock(clock),.x(data),.y(coeff),.product(product),.enable_in(enable_mult),.enable_out() );
-
- acc acc (.clock(clock),.reset(reset),.clear(clear_acc),.enable_in(enable_acc),.enable_out(),
- .addend(product),.sum(accum) );
-
- shifter shifter (.in(accum),.out(scaled_accum),.shift(shift));
-
- assign data_wr_data = select_input ? sample_in : scaled_accum;
- assign enable_mult = 1'b1;
-
- always @(posedge clock)
- if(reset)
- cur_offset <= #1 4'd0;
- else if(latch_out)
- cur_offset <= #1 cur_offset + 4'd1;
-
- assign data_addr = data_addr_int + cur_offset;
- assign data_wr_addr = data_wr_addr_int + cur_offset;
-
- always @(posedge clock)
- if(reset)
- done <= #1 1'b0;
- else if(latch_out)
- done <= #1 1'b1;
- else if(strobe_in)
- done <= #1 1'b0;
-
- always @(posedge clock)
- if(reset)
- phase <= #1 4'd0;
- else if(strobe_in)
- phase <= #1 4'd0;
- else if(!done)
- phase <= #1 phase + 4'd1;
-
- assign coeff_addr = phase;
-
- always @(phase)
- case(phase)
- 4'd01 : data_addr_int = 4'd00; 4'd02 : data_addr_int = 4'd01; 4'd03 : data_addr_int = 4'd02;
- 4'd04 : data_addr_int = 4'd03; 4'd05 : data_addr_int = 4'd04;
-
- 4'd07 : data_addr_int = 4'd03; 4'd08 : data_addr_int = 4'd04; 4'd09 : data_addr_int = 4'd05;
- 4'd10 : data_addr_int = 4'd06; 4'd11 : data_addr_int = 4'd07;
- default : data_addr_int = 4'd00;
- endcase // case(phase)
-
- always @(phase)
- case(phase)
- 4'd0 : data_wr_addr_int = 4'd2;
- 4'd8 : data_wr_addr_int = 4'd5;
- 4'd14 : data_wr_addr_int = 4'd8;
- default : data_wr_addr_int = 4'd0;
- endcase // case(phase)
-
- always @(phase)
- case(phase)
- 4'd0, 4'd8, 4'd14 : data_wr = 1'b1;
- default : data_wr = 1'b0;
- endcase // case(phase)
-
- assign select_input = (phase == 4'd0);
-
- always @(phase)
- case(phase)
- 4'd0, 4'd1, 4'd2, 4'd3, 4'd9, 4'd15 : clear_acc = 1'd1;
- default : clear_acc = 1'b0;
- endcase // case(phase)
-
- assign enable_acc = ~clear_acc;
- assign latch_out = (phase == 4'd14);
-
- always @(posedge clock)
- if(reset)
- sample_out <= #1 16'd0;
- else if(latch_out)
- sample_out <= #1 scaled_accum;
-
- ////////////////////////////////////////////////////////
- // Debug
-
- wire [3:0] debugmux;
-
- setting_reg #(`FR_MRFM_DEBUG) sr_debugmux(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(debugmux),.changed());
-
- assign debugbus[15:0] = debugmux[0] ? {coeff_addr,data_addr,data_wr_addr,cur_offset} : {phase,data_addr_int,data_wr_addr_int,cur_offset};
- assign debugbus[31:16] = debugmux[1] ? scaled_accum : {clock, strobe_in, data_wr, enable_mult, enable_acc, clear_acc, latch_out,select_input,done, data_addr_int};
- assign debugbus[47:32] = debugmux[2] ? sample_out : coeff;
- assign debugbus[63:48] = debugmux[3] ? sample_in : data;
-
-endmodule // biquad_2stage
-
diff --git a/usrp/fpga/toplevel/mrfm/biquad_6stage.v b/usrp/fpga/toplevel/mrfm/biquad_6stage.v
deleted file mode 100644
index 2b0c511ce..000000000
--- a/usrp/fpga/toplevel/mrfm/biquad_6stage.v
+++ /dev/null
@@ -1,137 +0,0 @@
-`include "mrfm.vh"
-
-module mrfm_iir (input clock, input reset, input strobe_in,
- input serial_strobe, input [6:0] serial_addr, input [31:0] serial_data,
- input wire [15:0] sample_in, output reg [15:0] sample_out);
-
- wire [5:0] coeff_addr, coeff_wr_addr;
- wire [4:0] data_addr, data_wr_addr;
- reg [4:0] cur_offset, data_addr_int, data_wr_addr_int;
-
- wire [15:0] coeff, coeff_wr_data, data, data_wr_data;
- wire coeff_wr;
- reg data_wr;
-
- wire [30:0] product;
- wire [33:0] accum;
- wire [15:0] scaled_accum;
-
- wire [7:0] shift;
- reg [5:0] phase;
- wire enable_mult, enable_acc, latch_out, select_input;
- reg done, clear_acc;
-
- setting_reg #(`FR_MRFM_IIR_COEFF) sr_coeff(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({coeff_wr_addr,coeff_wr_data}),.changed(coeff_wr));
-
- setting_reg #(`FR_MRFM_IIR_SHIFT) sr_shift(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(shift),.changed());
-
- ram64 coeff_ram(.clock(clock),.write(coeff_wr),.wr_addr(coeff_wr_addr),.wr_data(coeff_wr_data),
- .rd_addr(coeff_addr),.rd_data(coeff));
-
- ram32 data_ram(.clock(clock),.write(data_wr),.wr_addr(data_wr_addr),.wr_data(data_wr_data),
- .rd_addr(data_addr),.rd_data(data));
-
- mult mult (.clock(clock),.x(data),.y(coeff),.product(product),.enable_in(enable_mult),.enable_out() );
-
- acc acc (.clock(clock),.reset(reset),.clear(clear_acc),.enable_in(enable_acc),.enable_out(),
- .addend(product),.sum(accum) );
-
- shifter shifter (.in(accum),.out(scaled_accum),.shift(shift));
-
- assign data_wr_data = select_input ? sample_in : scaled_accum;
- assign enable_mult = 1'b1;
-
- always @(posedge clock)
- if(reset)
- cur_offset <= #1 5'd0;
- else if(latch_out)
- cur_offset <= #1 cur_offset + 5'd1;
-
- assign data_addr = data_addr_int + cur_offset;
- assign data_wr_addr = data_wr_addr_int + cur_offset;
-
- always @(posedge clock)
- if(reset)
- done <= #1 1'b0;
- else if(latch_out)
- done <= #1 1'b1;
- else if(strobe_in)
- done <= #1 1'b0;
-
- always @(posedge clock)
- if(reset)
- phase <= #1 6'd0;
- else if(strobe_in)
- phase <= #1 6'd0;
- else if(!done)
- phase <= #1 phase + 6'd1;
-
- always @(phase)
- case(phase)
- 6'd0 : data_addr_int = 5'd0;
- default : data_addr_int = 5'd0;
- endcase // case(phase)
-
- assign coeff_addr = phase;
-
- always @(phase)
- case(phase)
- 6'd01 : data_addr_int = 5'd00; 6'd02 : data_addr_int = 5'd01; 6'd03 : data_addr_int = 5'd02;
- 6'd04 : data_addr_int = 5'd03; 6'd05 : data_addr_int = 5'd04;
-
- 6'd07 : data_addr_int = 5'd03; 6'd08 : data_addr_int = 5'd04; 6'd09 : data_addr_int = 5'd05;
- 6'd10 : data_addr_int = 5'd06; 6'd11 : data_addr_int = 5'd07;
-
- 6'd13 : data_addr_int = 5'd06; 6'd14 : data_addr_int = 5'd07; 6'd15 : data_addr_int = 5'd08;
- 6'd16 : data_addr_int = 5'd09; 6'd17 : data_addr_int = 5'd10;
-
- 6'd19 : data_addr_int = 5'd09; 6'd20 : data_addr_int = 5'd10; 6'd21 : data_addr_int = 5'd11;
- 6'd22 : data_addr_int = 5'd12; 6'd23 : data_addr_int = 5'd13;
-
- 6'd25 : data_addr_int = 5'd12; 6'd26 : data_addr_int = 5'd13; 6'd27 : data_addr_int = 5'd14;
- 6'd28 : data_addr_int = 5'd15; 6'd29 : data_addr_int = 5'd16;
-
- 6'd31 : data_addr_int = 5'd15; 6'd32 : data_addr_int = 5'd16; 6'd33 : data_addr_int = 5'd17;
- 6'd34 : data_addr_int = 5'd18; 6'd35 : data_addr_int = 5'd19;
-
- default : data_addr_int = 5'd00;
- endcase // case(phase)
-
- always @(phase)
- case(phase)
- 6'd0 : data_wr_addr_int = 5'd2;
- 6'd8 : data_wr_addr_int = 5'd5;
- 6'd14 : data_wr_addr_int = 5'd8;
- 6'd20 : data_wr_addr_int = 5'd11;
- 6'd26 : data_wr_addr_int = 5'd14;
- 6'd32 : data_wr_addr_int = 5'd17;
- 6'd38 : data_wr_addr_int = 5'd20;
- default : data_wr_addr_int = 5'd0;
- endcase // case(phase)
-
- always @(phase)
- case(phase)
- 6'd0, 6'd8, 6'd14, 6'd20, 6'd26, 6'd32, 6'd38: data_wr = 1'b1;
- default : data_wr = 1'b0;
- endcase // case(phase)
-
- always @(phase)
- case(phase)
- 6'd0, 6'd1, 6'd2, 6'd3, 6'd9, 6'd15, 6'd21, 6'd27, 6'd33 : clear_acc = 1'd1;
- default : clear_acc = 1'b0;
- endcase // case(phase)
-
- assign enable_acc = ~clear_acc;
- assign latch_out = (phase == 6'd38);
-
- always @(posedge clock)
- if(reset)
- sample_out <= #1 16'd0;
- else if(latch_out)
- sample_out <= #1 scaled_accum;
-
-endmodule // mrfm_iir
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.csf b/usrp/fpga/toplevel/mrfm/mrfm.csf
deleted file mode 100644
index 2c30b996b..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.csf
+++ /dev/null
@@ -1,444 +0,0 @@
-COMPILER_SETTINGS
-{
- IO_PLACEMENT_OPTIMIZATION = OFF;
- ENABLE_DRC_SETTINGS = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_RETIMING = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION = OFF;
- PHYSICAL_SYNTHESIS_COMBO_LOGIC = OFF;
- DRC_FANOUT_EXCEEDING = 30;
- DRC_REPORT_FANOUT_EXCEEDING = OFF;
- DRC_TOP_FANOUT = 50;
- DRC_REPORT_TOP_FANOUT = OFF;
- RUN_DRC_DURING_COMPILATION = OFF;
- ADV_NETLIST_OPT_RETIME_CORE_AND_IO = ON;
- ADV_NETLIST_OPT_SYNTH_USE_FITTER_INFO = OFF;
- ADV_NETLIST_OPT_SYNTH_GATE_RETIME = OFF;
- ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP = OFF;
- SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES = OFF;
- MERGE_HEX_FILE = OFF;
- TRUE_WYSIWYG_FLOW = OFF;
- SEED = 1;
- FINAL_PLACEMENT_OPTIMIZATION = AUTOMATICALLY;
- FAMILY = Cyclone;
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "LOWER TO 1ESB UPPER TO 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DEEP_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_SINGLE_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_WIDE_MODE_OUTPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4ESB";
- DPRAM_DEEP_MODE_OUTPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_INPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4";
- DPRAM_DEEP_MODE_INPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_OTHER_SIGNALS_EPXA4_10 = "DEFAULT OTHER ROUTING OPTIONS";
- DPRAM_OUTPUT_EPXA4_10 = "DEFAULT OUTPUT ROUTING OPTIONS";
- DPRAM_INPUT_EPXA4_10 = "DEFAULT INPUT ROUTING OPTIONS";
- STRIPE_TO_PLD_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PLD_TO_STRIPE_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PROCESSOR_DEBUG_EXTENSIONS_EPXA4_10 = "MEGALAB COLUMN 2";
- STRIPE_TO_PLD_BRIDGE_EPXA4_10 = "MEGALAB COLUMN 1";
- FAST_FIT_COMPILATION = OFF;
- SIGNALPROBE_DURING_NORMAL_COMPILATION = OFF;
- OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING = ON;
- OPTIMIZE_TIMING = "NORMAL COMPILATION";
- OPTIMIZE_HOLD_TIMING = OFF;
- COMPILATION_LEVEL = FULL;
- SAVE_DISK_SPACE = OFF;
- SPEED_DISK_USAGE_TRADEOFF = NORMAL;
- LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT = OFF;
- SIGNALPROBE_ALLOW_OVERUSE = OFF;
- FOCUS_ENTITY_NAME = |mrfm;
- ROUTING_BACK_ANNOTATION_MODE = OFF;
- INC_PLC_MODE = OFF;
- FIT_ONLY_ONE_ATTEMPT = OFF;
-}
-DEFAULT_DEVICE_OPTIONS
-{
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_SVF_FILE = OFF;
- RESERVE_PIN = "AS INPUT TRI-STATED";
- RESERVE_ALL_UNUSED_PINS = "AS OUTPUT DRIVING GROUND";
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- HEXOUT_FILE_START_ADDRESS = 0;
- GENERATE_HEX_FILE = OFF;
- GENERATE_RBF_FILE = OFF;
- GENERATE_TTF_FILE = OFF;
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- USE_CONFIGURATION_DEVICE = ON;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- AUTO_RESTART_CONFIGURATION = OFF;
- ENABLE_VREFB_PIN = OFF;
- ENABLE_VREFA_PIN = OFF;
- SECURITY_BIT = OFF;
- USER_START_UP_CLOCK = OFF;
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "ACTIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_UPDATE_MODE = STANDARD;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- CONFIGURATION_CLOCK_DIVISOR = 1;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CLOCK_SOURCE = INTERNAL;
- COMPRESSION_MODE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
-}
-AUTO_SLD_HUB_ENTITY
-{
- AUTO_INSERT_SLD_HUB_ENTITY = ENABLE;
- HUB_INSTANCE_NAME = SLD_HUB_INST;
- HUB_ENTITY_NAME = SLD_HUB;
-}
-SIGNALTAP_LOGIC_ANALYZER_SETTINGS
-{
- ENABLE_SIGNALTAP = Off;
- AUTO_ENABLE_SMART_COMPILE = On;
-}
-CHIP(mrfm)
-{
- DEVICE = EP1C12Q240C8;
- DEVICE_FILTER_PACKAGE = "ANY QFP";
- DEVICE_FILTER_PIN_COUNT = 240;
- DEVICE_FILTER_SPEED_GRADE = ANY;
- AUTO_RESTART_CONFIGURATION = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- USER_START_UP_CLOCK = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- USE_CONFIGURATION_DEVICE = OFF;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- STRATIX_UPDATE_MODE = STANDARD;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- COMPRESSION_MODE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- GENERATE_TTF_FILE = OFF;
- GENERATE_RBF_FILE = ON;
- GENERATE_HEX_FILE = OFF;
- SECURITY_BIT = OFF;
- ENABLE_VREFA_PIN = OFF;
- ENABLE_VREFB_PIN = OFF;
- GENERATE_SVF_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
- BASE_PIN_OUT_FILE_ON_SAMEFRAME_DEVICE = OFF;
- HEXOUT_FILE_START_ADDRESS = 0;
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- RESERVE_ALL_UNUSED_PINS = "AS INPUT TRI-STATED";
- STRATIX_DEVICE_IO_STANDARD = LVTTL;
- CLOCK_SOURCE = INTERNAL;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CONFIGURATION_CLOCK_DIVISOR = 1;
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- SCLK : LOCATION = Pin_101;
- SDI : LOCATION = Pin_100;
- SEN : LOCATION = Pin_98;
- SLD : LOCATION = Pin_95;
- adc1_data[0] : LOCATION = Pin_5;
- adc1_data[10] : LOCATION = Pin_235;
- adc1_data[11] : LOCATION = Pin_234;
- adc1_data[1] : LOCATION = Pin_4;
- adc1_data[2] : LOCATION = Pin_3;
- adc1_data[3] : LOCATION = Pin_2;
- adc1_data[4] : LOCATION = Pin_1;
- adc1_data[4] : IO_STANDARD = LVTTL;
- adc1_data[5] : LOCATION = Pin_240;
- adc1_data[6] : LOCATION = Pin_239;
- adc1_data[7] : LOCATION = Pin_238;
- adc1_data[8] : LOCATION = Pin_237;
- adc1_data[9] : LOCATION = Pin_236;
- adc2_data[0] : LOCATION = Pin_20;
- adc2_data[10] : LOCATION = Pin_8;
- adc2_data[11] : LOCATION = Pin_7;
- adc2_data[1] : LOCATION = Pin_19;
- adc2_data[2] : LOCATION = Pin_18;
- adc2_data[3] : LOCATION = Pin_17;
- adc2_data[4] : LOCATION = Pin_16;
- adc2_data[5] : LOCATION = Pin_15;
- adc2_data[6] : LOCATION = Pin_14;
- adc2_data[7] : LOCATION = Pin_13;
- adc2_data[8] : LOCATION = Pin_12;
- adc2_data[9] : LOCATION = Pin_11;
- adc3_data[0] : LOCATION = Pin_200;
- adc3_data[10] : LOCATION = Pin_184;
- adc3_data[11] : LOCATION = Pin_183;
- adc3_data[1] : LOCATION = Pin_197;
- adc3_data[2] : LOCATION = Pin_196;
- adc3_data[3] : LOCATION = Pin_195;
- adc3_data[4] : LOCATION = Pin_194;
- adc3_data[5] : LOCATION = Pin_193;
- adc3_data[6] : LOCATION = Pin_188;
- adc3_data[7] : LOCATION = Pin_187;
- adc3_data[8] : LOCATION = Pin_186;
- adc3_data[9] : LOCATION = Pin_185;
- adc4_data[0] : LOCATION = Pin_222;
- adc4_data[10] : LOCATION = Pin_203;
- adc4_data[11] : LOCATION = Pin_202;
- adc4_data[1] : LOCATION = Pin_219;
- adc4_data[2] : LOCATION = Pin_217;
- adc4_data[3] : LOCATION = Pin_216;
- adc4_data[4] : LOCATION = Pin_215;
- adc4_data[5] : LOCATION = Pin_214;
- adc4_data[6] : LOCATION = Pin_213;
- adc4_data[7] : LOCATION = Pin_208;
- adc4_data[8] : LOCATION = Pin_207;
- adc4_data[9] : LOCATION = Pin_206;
- adc_oeb[0] : LOCATION = Pin_228;
- adc_oeb[1] : LOCATION = Pin_21;
- adc_oeb[2] : LOCATION = Pin_181;
- adc_oeb[3] : LOCATION = Pin_218;
- adc_otr[0] : LOCATION = Pin_233;
- adc_otr[1] : LOCATION = Pin_6;
- adc_otr[2] : LOCATION = Pin_182;
- adc_otr[3] : LOCATION = Pin_201;
- adclk0 : LOCATION = Pin_224;
- adclk1 : LOCATION = Pin_226;
- clk0 : LOCATION = Pin_28;
- clk0 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk0 : IO_STANDARD = LVTTL;
- clk1 : LOCATION = Pin_29;
- clk1 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk1 : IO_STANDARD = LVTTL;
- clk3 : LOCATION = Pin_152;
- clk3 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk3 : IO_STANDARD = LVTTL;
- clk_120mhz : LOCATION = Pin_153;
- clk_120mhz : IO_STANDARD = LVTTL;
- clk_out : LOCATION = Pin_63;
- clk_out : IO_STANDARD = LVTTL;
- dac1_data[0] : LOCATION = Pin_165;
- dac1_data[10] : LOCATION = Pin_177;
- dac1_data[11] : LOCATION = Pin_178;
- dac1_data[12] : LOCATION = Pin_179;
- dac1_data[13] : LOCATION = Pin_180;
- dac1_data[1] : LOCATION = Pin_166;
- dac1_data[2] : LOCATION = Pin_167;
- dac1_data[3] : LOCATION = Pin_168;
- dac1_data[4] : LOCATION = Pin_169;
- dac1_data[5] : LOCATION = Pin_170;
- dac1_data[6] : LOCATION = Pin_173;
- dac1_data[7] : LOCATION = Pin_174;
- dac1_data[8] : LOCATION = Pin_175;
- dac1_data[9] : LOCATION = Pin_176;
- dac2_data[0] : LOCATION = Pin_159;
- dac2_data[10] : LOCATION = Pin_163;
- dac2_data[11] : LOCATION = Pin_139;
- dac2_data[12] : LOCATION = Pin_164;
- dac2_data[13] : LOCATION = Pin_138;
- dac2_data[1] : LOCATION = Pin_158;
- dac2_data[2] : LOCATION = Pin_160;
- dac2_data[3] : LOCATION = Pin_156;
- dac2_data[4] : LOCATION = Pin_161;
- dac2_data[5] : LOCATION = Pin_144;
- dac2_data[6] : LOCATION = Pin_162;
- dac2_data[7] : LOCATION = Pin_141;
- dac2_data[8] : LOCATION = Pin_143;
- dac2_data[9] : LOCATION = Pin_140;
- dac3_data[0] : LOCATION = Pin_122;
- dac3_data[10] : LOCATION = Pin_134;
- dac3_data[11] : LOCATION = Pin_135;
- dac3_data[12] : LOCATION = Pin_136;
- dac3_data[13] : LOCATION = Pin_137;
- dac3_data[1] : LOCATION = Pin_123;
- dac3_data[2] : LOCATION = Pin_124;
- dac3_data[3] : LOCATION = Pin_125;
- dac3_data[4] : LOCATION = Pin_126;
- dac3_data[5] : LOCATION = Pin_127;
- dac3_data[6] : LOCATION = Pin_128;
- dac3_data[7] : LOCATION = Pin_131;
- dac3_data[8] : LOCATION = Pin_132;
- dac3_data[9] : LOCATION = Pin_133;
- dac4_data[0] : LOCATION = Pin_104;
- dac4_data[10] : LOCATION = Pin_118;
- dac4_data[11] : LOCATION = Pin_119;
- dac4_data[12] : LOCATION = Pin_120;
- dac4_data[13] : LOCATION = Pin_121;
- dac4_data[1] : LOCATION = Pin_105;
- dac4_data[2] : LOCATION = Pin_106;
- dac4_data[3] : LOCATION = Pin_107;
- dac4_data[4] : LOCATION = Pin_108;
- dac4_data[5] : LOCATION = Pin_113;
- dac4_data[6] : LOCATION = Pin_114;
- dac4_data[7] : LOCATION = Pin_115;
- dac4_data[8] : LOCATION = Pin_116;
- dac4_data[9] : LOCATION = Pin_117;
- enable_rx : LOCATION = Pin_88;
- enable_tx : LOCATION = Pin_93;
- gndbus[0] : LOCATION = Pin_223;
- gndbus[0] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[0] : IO_STANDARD = LVTTL;
- gndbus[1] : LOCATION = Pin_225;
- gndbus[1] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[1] : IO_STANDARD = LVTTL;
- gndbus[2] : LOCATION = Pin_227;
- gndbus[2] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[2] : IO_STANDARD = LVTTL;
- gndbus[3] : LOCATION = Pin_62;
- gndbus[3] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[3] : IO_STANDARD = LVTTL;
- gndbus[4] : LOCATION = Pin_64;
- gndbus[4] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[4] : IO_STANDARD = LVTTL;
- misc_pins[0] : LOCATION = Pin_87;
- misc_pins[0] : IO_STANDARD = LVTTL;
- misc_pins[10] : LOCATION = Pin_76;
- misc_pins[10] : IO_STANDARD = LVTTL;
- misc_pins[11] : LOCATION = Pin_74;
- misc_pins[11] : IO_STANDARD = LVTTL;
- misc_pins[1] : LOCATION = Pin_86;
- misc_pins[1] : IO_STANDARD = LVTTL;
- misc_pins[2] : LOCATION = Pin_85;
- misc_pins[2] : IO_STANDARD = LVTTL;
- misc_pins[3] : LOCATION = Pin_84;
- misc_pins[3] : IO_STANDARD = LVTTL;
- misc_pins[4] : LOCATION = Pin_83;
- misc_pins[4] : IO_STANDARD = LVTTL;
- misc_pins[5] : LOCATION = Pin_82;
- misc_pins[5] : IO_STANDARD = LVTTL;
- misc_pins[6] : LOCATION = Pin_79;
- misc_pins[6] : IO_STANDARD = LVTTL;
- misc_pins[7] : LOCATION = Pin_78;
- misc_pins[7] : IO_STANDARD = LVTTL;
- misc_pins[8] : LOCATION = Pin_77;
- misc_pins[8] : IO_STANDARD = LVTTL;
- misc_pins[9] : LOCATION = Pin_75;
- misc_pins[9] : IO_STANDARD = LVTTL;
- reset : LOCATION = Pin_94;
- usbclk : LOCATION = Pin_55;
- usbctl[0] : LOCATION = Pin_56;
- usbctl[1] : LOCATION = Pin_54;
- usbctl[2] : LOCATION = Pin_53;
- usbctl[3] : LOCATION = Pin_58;
- usbctl[4] : LOCATION = Pin_57;
- usbctl[5] : LOCATION = Pin_44;
- usbdata[0] : LOCATION = Pin_73;
- usbdata[10] : LOCATION = Pin_41;
- usbdata[11] : LOCATION = Pin_39;
- usbdata[12] : LOCATION = Pin_38;
- usbdata[12] : IO_STANDARD = LVTTL;
- usbdata[13] : LOCATION = Pin_37;
- usbdata[14] : LOCATION = Pin_24;
- usbdata[15] : LOCATION = Pin_23;
- usbdata[1] : LOCATION = Pin_68;
- usbdata[2] : LOCATION = Pin_67;
- usbdata[3] : LOCATION = Pin_66;
- usbdata[4] : LOCATION = Pin_65;
- usbdata[5] : LOCATION = Pin_61;
- usbdata[6] : LOCATION = Pin_60;
- usbdata[7] : LOCATION = Pin_59;
- usbdata[8] : LOCATION = Pin_43;
- usbdata[9] : LOCATION = Pin_42;
- usbrdy[0] : LOCATION = Pin_45;
- usbrdy[1] : LOCATION = Pin_46;
- usbrdy[2] : LOCATION = Pin_47;
- usbrdy[3] : LOCATION = Pin_48;
- usbrdy[4] : LOCATION = Pin_49;
- usbrdy[5] : LOCATION = Pin_50;
- clear_status : LOCATION = Pin_99;
-}
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.esf b/usrp/fpga/toplevel/mrfm/mrfm.esf
deleted file mode 100644
index 72b84e39e..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.esf
+++ /dev/null
@@ -1,14 +0,0 @@
-SIMULATOR_SETTINGS
-{
- ESTIMATE_POWER_CONSUMPTION = OFF;
- GLITCH_INTERVAL = 1NS;
- GLITCH_DETECTION = OFF;
- SIMULATION_COVERAGE = ON;
- CHECK_OUTPUTS = OFF;
- SETUP_HOLD_DETECTION = OFF;
- POWER_ESTIMATION_START_TIME = "0 NS";
- ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS = ON;
- SIMULATION_MODE = TIMING;
- START_TIME = 0NS;
- USE_COMPILER_SETTINGS = mrfm;
-}
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.psf b/usrp/fpga/toplevel/mrfm/mrfm.psf
deleted file mode 100644
index 678a7faa2..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.psf
+++ /dev/null
@@ -1,312 +0,0 @@
-DEFAULT_DESIGN_ASSISTANT_SETTINGS
-{
- HCPY_ALOAD_SIGNALS = OFF;
- HCPY_VREF_PINS = OFF;
- HCPY_CAT = OFF;
- HCPY_ILLEGAL_HC_DEV_PKG = OFF;
- ACLK_RULE_IMSZER_ADOMAIN = OFF;
- ACLK_RULE_SZER_BTW_ACLK_DOMAIN = OFF;
- ACLK_RULE_NO_SZER_ACLK_DOMAIN = OFF;
- ACLK_CAT = OFF;
- SIGNALRACE_RULE_ASYNCHPIN_SYNCH_CLKPIN = OFF;
- SIGNALRACE_CAT = OFF;
- NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED = OFF;
- NONSYNCHSTRUCT_RULE_SRLATCH = OFF;
- NONSYNCHSTRUCT_RULE_DLATCH = OFF;
- NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR = OFF;
- NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN = OFF;
- NONSYNCHSTRUCT_RULE_RIPPLE_CLK = OFF;
- NONSYNCHSTRUCT_RULE_DELAY_CHAIN = OFF;
- NONSYNCHSTRUCT_RULE_REG_LOOP = OFF;
- NONSYNCHSTRUCT_RULE_COMBLOOP = OFF;
- NONSYNCHSTRUCT_CAT = OFF;
- NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE = OFF;
- TIMING_RULE_COIN_CLKEDGE = OFF;
- TIMING_RULE_SHIFT_REG = OFF;
- TIMING_RULE_HIGH_FANOUTS = OFF;
- TIMING_CAT = OFF;
- RESET_RULE_ALL = OFF;
- RESET_RULE_IMSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_UNSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_REG_ASNYCH = OFF;
- RESET_RULE_COMB_ASYNCH_RESET = OFF;
- RESET_RULE_IMSYNCH_EXRESET = OFF;
- RESET_RULE_UNSYNCH_EXRESET = OFF;
- RESET_RULE_INPINS_RESETNET = OFF;
- RESET_CAT = OFF;
- CLK_RULE_ALL = OFF;
- CLK_RULE_MIX_EDGES = OFF;
- CLK_RULE_CLKNET_CLKSPINES = OFF;
- CLK_RULE_INPINS_CLKNET = OFF;
- CLK_RULE_GATING_SCHEME = OFF;
- CLK_RULE_INV_CLOCK = OFF;
- CLK_RULE_COMB_CLOCK = OFF;
- CLK_CAT = OFF;
- HCPY_EXCEED_USER_IO_USAGE = OFF;
- HCPY_EXCEED_RAM_USAGE = OFF;
- NONSYNCHSTRUCT_RULE_ASYN_RAM = OFF;
- SIGNALRACE_RULE_TRISTATE = OFF;
- ASSG_RULE_MISSING_TIMING = OFF;
- ASSG_RULE_MISSING_FMAX = OFF;
- ASSG_CAT = OFF;
-}
-SYNTHESIS_FITTING_SETTINGS
-{
- AUTO_SHIFT_REGISTER_RECOGNITION = ON;
- AUTO_DSP_RECOGNITION = ON;
- AUTO_RAM_RECOGNITION = ON;
- REMOVE_DUPLICATE_LOGIC = ON;
- AUTO_TURBO_BIT = ON;
- AUTO_MERGE_PLLS = ON;
- AUTO_OPEN_DRAIN_PINS = ON;
- AUTO_PARALLEL_EXPANDERS = ON;
- AUTO_FAST_OUTPUT_ENABLE_REGISTERS = OFF;
- AUTO_FAST_OUTPUT_REGISTERS = OFF;
- AUTO_FAST_INPUT_REGISTERS = OFF;
- AUTO_CASCADE_CHAINS = ON;
- AUTO_CARRY_CHAINS = ON;
- AUTO_DELAY_CHAINS = ON;
- MAX7000_PARALLEL_EXPANDER_CHAIN_LENGTH = 4;
- PARALLEL_EXPANDER_CHAIN_LENGTH = 16;
- CASCADE_CHAIN_LENGTH = 2;
- STRATIX_CARRY_CHAIN_LENGTH = 70;
- MERCURY_CARRY_CHAIN_LENGTH = 48;
- FLEX10K_CARRY_CHAIN_LENGTH = 32;
- FLEX6K_CARRY_CHAIN_LENGTH = 32;
- CARRY_CHAIN_LENGTH = 48;
- CARRY_OUT_PINS_LCELL_INSERT = ON;
- NORMAL_LCELL_INSERT = ON;
- AUTO_LCELL_INSERTION = ON;
- ALLOW_XOR_GATE_USAGE = ON;
- AUTO_PACKED_REGISTERS_STRATIX = NORMAL;
- AUTO_PACKED_REGISTERS = OFF;
- AUTO_PACKED_REG_CYCLONE = NORMAL;
- FLEX10K_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX6K_OPTIMIZATION_TECHNIQUE = AREA;
- MERCURY_OPTIMIZATION_TECHNIQUE = AREA;
- APEX20K_OPTIMIZATION_TECHNIQUE = SPEED;
- MAX7000_OPTIMIZATION_TECHNIQUE = SPEED;
- STRATIX_OPTIMIZATION_TECHNIQUE = SPEED;
- CYCLONE_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX10K_TECHNOLOGY_MAPPER = LUT;
- FLEX6K_TECHNOLOGY_MAPPER = LUT;
- MERCURY_TECHNOLOGY_MAPPER = LUT;
- APEX20K_TECHNOLOGY_MAPPER = LUT;
- MAX7000_TECHNOLOGY_MAPPER = "PRODUCT TERM";
- STRATIX_TECHNOLOGY_MAPPER = LUT;
- AUTO_IMPLEMENT_IN_ROM = OFF;
- AUTO_GLOBAL_MEMORY_CONTROLS = OFF;
- AUTO_GLOBAL_REGISTER_CONTROLS = ON;
- AUTO_GLOBAL_OE = ON;
- AUTO_GLOBAL_CLOCK = ON;
- USE_LPM_FOR_AHDL_OPERATORS = ON;
- LIMIT_AHDL_INTEGERS_TO_32_BITS = OFF;
- ENABLE_BUS_HOLD_CIRCUITRY = OFF;
- WEAK_PULL_UP_RESISTOR = OFF;
- TURBO_BIT = ON;
- MAX7000_IGNORE_SOFT_BUFFERS = OFF;
- IGNORE_SOFT_BUFFERS = ON;
- MAX7000_IGNORE_LCELL_BUFFERS = AUTO;
- IGNORE_LCELL_BUFFERS = OFF;
- IGNORE_ROW_GLOBAL_BUFFERS = OFF;
- IGNORE_GLOBAL_BUFFERS = OFF;
- IGNORE_CASCADE_BUFFERS = OFF;
- IGNORE_CARRY_BUFFERS = OFF;
- REMOVE_DUPLICATE_REGISTERS = ON;
- REMOVE_REDUNDANT_LOGIC_CELLS = OFF;
- ALLOW_POWER_UP_DONT_CARE = ON;
- PCI_IO = OFF;
- NOT_GATE_PUSH_BACK = ON;
- SLOW_SLEW_RATE = OFF;
- DSP_BLOCK_BALANCING = AUTO;
- STATE_MACHINE_PROCESSING = AUTO;
-}
-DEFAULT_HARDCOPY_SETTINGS
-{
- HARDCOPY_EXTERNAL_CLOCK_JITTER = "0.0 NS";
-}
-DEFAULT_TIMING_REQUIREMENTS
-{
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- RUN_ALL_TIMING_ANALYSES = ON;
- IGNORE_CLOCK_SETTINGS = OFF;
- DEFAULT_HOLD_MULTICYCLE = "SAME AS MULTICYCLE";
- CUT_OFF_IO_PIN_FEEDBACK = ON;
- CUT_OFF_CLEAR_AND_PRESET_PATHS = ON;
- CUT_OFF_READ_DURING_WRITE_PATHS = ON;
- CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS = ON;
- DO_MIN_ANALYSIS = ON;
- DO_MIN_TIMING = OFF;
- NUMBER_OF_PATHS_TO_REPORT = 200;
- NUMBER_OF_DESTINATION_TO_REPORT = 10;
- NUMBER_OF_SOURCES_PER_DESTINATION_TO_REPORT = 10;
- MAX_SCC_SIZE = 50;
-}
-HDL_SETTINGS
-{
- VERILOG_INPUT_VERSION = VERILOG_2001;
- ENABLE_IP_DEBUG = OFF;
- VHDL_INPUT_VERSION = VHDL93;
- VHDL_SHOW_LMF_MAPPING_MESSAGES = OFF;
-}
-PROJECT_INFO(mrfm)
-{
- ORIGINAL_QUARTUS_VERSION = 3.0;
- PROJECT_CREATION_TIME_DATE = "00:14:04 JULY 13, 2003";
- LAST_QUARTUS_VERSION = 3.0;
- SHOW_REGISTRATION_MESSAGE = ON;
- USER_LIBRARIES = "e:\usrp\fpga\megacells";
-}
-THIRD_PARTY_EDA_TOOLS(mrfm)
-{
- EDA_DESIGN_ENTRY_SYNTHESIS_TOOL = "<NONE>";
- EDA_SIMULATION_TOOL = "<NONE>";
- EDA_TIMING_ANALYSIS_TOOL = "<NONE>";
- EDA_BOARD_DESIGN_TOOL = "<NONE>";
- EDA_FORMAL_VERIFICATION_TOOL = "<NONE>";
- EDA_RESYNTHESIS_TOOL = "<NONE>";
-}
-EDA_TOOL_SETTINGS(eda_design_synthesis)
-{
- EDA_INPUT_GND_NAME = GND;
- EDA_INPUT_VCC_NAME = VCC;
- EDA_SHOW_LMF_MAPPING_MESSAGES = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_INPUT_DATA_FORMAT = EDIF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_simulation)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_timing_analysis)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- EDA_LAUNCH_CMD_LINE_TOOL = OFF;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_board_design)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_formal_verification)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_palace)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- RESYNTHESIS_RETIMING = FULL;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
-}
-CLOCK(clk_120mhz)
-{
- FMAX_REQUIREMENT = "120.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(usbclk)
-{
- FMAX_REQUIREMENT = "48.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(SCLK)
-{
- FMAX_REQUIREMENT = "1.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk0)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk1)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.py b/usrp/fpga/toplevel/mrfm/mrfm.py
deleted file mode 100644
index 100db69eb..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-#
-# This is mrfm_fft_sos.py
-# Modification of Matt's mrfm_fft.py that reads filter coefs from file
-#
-# Copyright 2004,2005 Free Software Foundation, Inc.
-#
-# 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.
-#
-
-from gnuradio import gr, gru
-from gnuradio import usrp
-
-class source_c(usrp.source_c):
- def __init__(self,fpga_filename):
- usrp.source_c.__init__(self,which=0, decim_rate=64, nchan=2, mux=0x32103210, mode=0,
- fpga_filename=fpga_filename)
-
- self._write_9862(0,2,0x80) # Bypass ADC buffer, minimum gain
- self._write_9862(0,3,0x80) # Bypass ADC buffer, minimum gain
-
- self._write_9862(0,8,0) # TX PWR Down
- self._write_9862(0,10,0) # DAC offset
- self._write_9862(0,11,0) # DAC offset
- self._write_9862(0,14,0x80) # gain
- self._write_9862(0,16,0xff) # pga
- self._write_9862(0,18,0x0c) # TX IF
- self._write_9862(0,19,0x01) # TX Digital
- self._write_9862(0,20,0x00) # TX Mod
-
- # max/min values are +/-2, so scale is set to make 2 = 32767
-
- self._write_fpga_reg(69,0x0e) # debug mux
- self._write_fpga_reg(5,-1)
- self._write_fpga_reg(7,-1)
- self._write_oe(0,0xffff, 0xffff)
- self._write_oe(1,0xffff, 0xffff)
- self._write_fpga_reg(14,0xf)
-
- self.decim = None
-
- def set_coeffs(self,frac_bits,b20,b10,b00,a20,a10,b21,b11,b01,a21,a11):
- def make_val(address,value):
- return (address << 16) | (value & 0xffff)
-
- # gain, scale already included in a's and b's from file
-
- self._write_fpga_reg(67,make_val(1,b20))
- self._write_fpga_reg(67,make_val(2,b10))
- self._write_fpga_reg(67,make_val(3,b00))
- self._write_fpga_reg(67,make_val(4,a20))
- self._write_fpga_reg(67,make_val(5,a10))
-
- self._write_fpga_reg(67,make_val(7,b21))
- self._write_fpga_reg(67,make_val(8,b11))
- self._write_fpga_reg(67,make_val(9,b01))
- self._write_fpga_reg(67,make_val(10,a21))
- self._write_fpga_reg(67,make_val(11,a11))
-
- self._write_fpga_reg(68,frac_bits) # Shift
-
- print "Biquad 0 : b2=%d b1=%d b0=%d a2=%d a1=%d" % (b20,b10,b00,a20,a10)
- print "Biquad 1 : b2=%d b1=%d b0=%d a2=%d a1=%d" % (b21,b11,b01,a21,a11)
-
- def set_decim_rate(self,rate=None):
- i=2
- turn=1
- a=1
- b=1
- while (rate>1) and (i<257):
- if (rate/i) * i == rate:
- if turn == 1:
- if a*i<257:
- a = a * i
- turn = 0
- elif b*i<257:
- b = b * i
- turn = 0
- else:
- print "Failed to set DECIMATOR"
- return self.decim
- elif b*i<257:
- b = b * i
- turn = 1
- elif a*i<257:
- a = a * i
- turn = 1
- else:
- print "Failed to set DECIMATOR"
- return self.decim
- rate=rate/i
- continue
- i = i + 1
- if rate > 1:
- print "Failed to set DECIMATOR"
- return self.decim
- else:
- self.decim = a*b
- print "a = %d b = %d" % (a,b)
- self._write_fpga_reg(64,(a-1)*256+(b-1)) # Set actual decimation
-
- def decim_rate(self):
- return self.decim
-
- def set_center_freq(self,freq):
- self._write_fpga_reg(65,int(-freq/64e6*65536*65536)) # set center freq
-
- def set_compensator(self,a11,a12,a21,a22,shift):
- self._write_fpga_reg(70,a11)
- self._write_fpga_reg(71,a12)
- self._write_fpga_reg(72,a21)
- self._write_fpga_reg(73,a22)
- self._write_fpga_reg(74,shift) # comp shift
-
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.qpf b/usrp/fpga/toplevel/mrfm/mrfm.qpf
deleted file mode 100644
index 959140875..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.qpf
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 1991-2004 Altera Corporation
-# Any megafunction design, and related netlist (encrypted or decrypted),
-# support information, device programming or simulation file, and any other
-# associated documentation or information provided by Altera or a partner
-# under Altera's Megafunction Partnership Program may be used only
-# to program PLD devices (but not masked PLD devices) from Altera. Any
-# other use of such megafunction design, netlist, support information,
-# device programming or simulation file, or any other related documentation
-# or information is prohibited for any other purpose, including, but not
-# limited to modification, reverse engineering, de-compiling, or use with
-# any other silicon devices, unless such use is explicitly licensed under
-# a separate agreement with Altera or a megafunction partner. Title to the
-# intellectual property, including patents, copyrights, trademarks, trade
-# secrets, or maskworks, embodied in any such megafunction design, netlist,
-# support information, device programming or simulation file, or any other
-# related documentation or information provided by Altera or a megafunction
-# partner, remains with Altera, the megafunction partner, or their respective
-# licensors. No other licenses, including any licenses needed under any third
-# party's intellectual property, are provided herein.
-
-
-
-QUARTUS_VERSION = "4.0"
-DATE = "17:10:11 December 20, 2004"
-
-
-# Active Revisions
-
-PROJECT_REVISION = "mrfm"
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.qsf b/usrp/fpga/toplevel/mrfm/mrfm.qsf
deleted file mode 100644
index ba1ae0223..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.qsf
+++ /dev/null
@@ -1,411 +0,0 @@
-# Copyright (C) 1991-2005 Altera Corporation
-# Your use of Altera Corporation's design tools, logic functions
-# and other software and tools, and its AMPP partner logic
-# functions, and any output files any of the foregoing
-# (including device programming or simulation files), and any
-# associated documentation or information are expressly subject
-# to the terms and conditions of the Altera Program License
-# Subscription Agreement, Altera MegaCore Function License
-# Agreement, or other applicable license agreement, including,
-# without limitation, that your use is for the sole purpose of
-# programming logic devices manufactured by Altera and sold by
-# Altera or its authorized distributors. Please refer to the
-# applicable agreement for further details.
-
-
-# The default values for assignments are stored in the file
-# mrfm_assignment_defaults.qdf
-# If this file doesn't exist, and for assignments not listed, see file
-# assignment_defaults.qdf
-
-# Altera recommends that you do not modify this file. This
-# file is updated automatically by the Quartus II software
-# and any changes you make may be lost or overwritten.
-
-
-# Project-Wide Assignments
-# ========================
-set_global_assignment -name ORIGINAL_QUARTUS_VERSION 3.0
-set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:14:04 JULY 13, 2003"
-set_global_assignment -name LAST_QUARTUS_VERSION "5.1 SP2"
-
-# Pin & Location Assignments
-# ==========================
-set_global_assignment -name RESERVE_PIN "AS INPUT TRI-STATED"
-set_location_assignment PIN_29 -to SCLK
-set_location_assignment PIN_117 -to SDI
-set_location_assignment PIN_28 -to usbclk
-set_location_assignment PIN_107 -to usbctl[0]
-set_location_assignment PIN_106 -to usbctl[1]
-set_location_assignment PIN_105 -to usbctl[2]
-set_location_assignment PIN_100 -to usbdata[0]
-set_location_assignment PIN_84 -to usbdata[10]
-set_location_assignment PIN_83 -to usbdata[11]
-set_location_assignment PIN_82 -to usbdata[12]
-set_location_assignment PIN_79 -to usbdata[13]
-set_location_assignment PIN_78 -to usbdata[14]
-set_location_assignment PIN_77 -to usbdata[15]
-set_location_assignment PIN_99 -to usbdata[1]
-set_location_assignment PIN_98 -to usbdata[2]
-set_location_assignment PIN_95 -to usbdata[3]
-set_location_assignment PIN_94 -to usbdata[4]
-set_location_assignment PIN_93 -to usbdata[5]
-set_location_assignment PIN_88 -to usbdata[6]
-set_location_assignment PIN_87 -to usbdata[7]
-set_location_assignment PIN_86 -to usbdata[8]
-set_location_assignment PIN_85 -to usbdata[9]
-set_location_assignment PIN_104 -to usbrdy[0]
-set_location_assignment PIN_101 -to usbrdy[1]
-set_location_assignment PIN_76 -to FX2_1
-set_location_assignment PIN_75 -to FX2_2
-set_location_assignment PIN_74 -to FX2_3
-set_location_assignment PIN_116 -to io_rx_a[0]
-set_location_assignment PIN_115 -to io_rx_a[1]
-set_location_assignment PIN_114 -to io_rx_a[2]
-set_location_assignment PIN_113 -to io_rx_a[3]
-set_location_assignment PIN_108 -to io_rx_a[4]
-set_location_assignment PIN_195 -to io_rx_a[5]
-set_location_assignment PIN_196 -to io_rx_a[6]
-set_location_assignment PIN_197 -to io_rx_a[7]
-set_location_assignment PIN_200 -to io_rx_a[8]
-set_location_assignment PIN_201 -to io_rx_a[9]
-set_location_assignment PIN_202 -to io_rx_a[10]
-set_location_assignment PIN_203 -to io_rx_a[11]
-set_location_assignment PIN_206 -to io_rx_a[12]
-set_location_assignment PIN_207 -to io_rx_a[13]
-set_location_assignment PIN_208 -to io_rx_a[14]
-set_location_assignment PIN_214 -to io_rx_b[0]
-set_location_assignment PIN_215 -to io_rx_b[1]
-set_location_assignment PIN_216 -to io_rx_b[2]
-set_location_assignment PIN_217 -to io_rx_b[3]
-set_location_assignment PIN_218 -to io_rx_b[4]
-set_location_assignment PIN_219 -to io_rx_b[5]
-set_location_assignment PIN_222 -to io_rx_b[6]
-set_location_assignment PIN_223 -to io_rx_b[7]
-set_location_assignment PIN_224 -to io_rx_b[8]
-set_location_assignment PIN_225 -to io_rx_b[9]
-set_location_assignment PIN_226 -to io_rx_b[10]
-set_location_assignment PIN_227 -to io_rx_b[11]
-set_location_assignment PIN_228 -to io_rx_b[12]
-set_location_assignment PIN_233 -to io_rx_b[13]
-set_location_assignment PIN_234 -to io_rx_b[14]
-set_location_assignment PIN_175 -to io_tx_a[0]
-set_location_assignment PIN_176 -to io_tx_a[1]
-set_location_assignment PIN_177 -to io_tx_a[2]
-set_location_assignment PIN_178 -to io_tx_a[3]
-set_location_assignment PIN_179 -to io_tx_a[4]
-set_location_assignment PIN_180 -to io_tx_a[5]
-set_location_assignment PIN_181 -to io_tx_a[6]
-set_location_assignment PIN_182 -to io_tx_a[7]
-set_location_assignment PIN_183 -to io_tx_a[8]
-set_location_assignment PIN_184 -to io_tx_a[9]
-set_location_assignment PIN_185 -to io_tx_a[10]
-set_location_assignment PIN_186 -to io_tx_a[11]
-set_location_assignment PIN_187 -to io_tx_a[12]
-set_location_assignment PIN_188 -to io_tx_a[13]
-set_location_assignment PIN_193 -to io_tx_a[14]
-set_location_assignment PIN_73 -to io_tx_b[0]
-set_location_assignment PIN_68 -to io_tx_b[1]
-set_location_assignment PIN_67 -to io_tx_b[2]
-set_location_assignment PIN_66 -to io_tx_b[3]
-set_location_assignment PIN_65 -to io_tx_b[4]
-set_location_assignment PIN_64 -to io_tx_b[5]
-set_location_assignment PIN_63 -to io_tx_b[6]
-set_location_assignment PIN_62 -to io_tx_b[7]
-set_location_assignment PIN_61 -to io_tx_b[8]
-set_location_assignment PIN_60 -to io_tx_b[9]
-set_location_assignment PIN_59 -to io_tx_b[10]
-set_location_assignment PIN_58 -to io_tx_b[11]
-set_location_assignment PIN_57 -to io_tx_b[12]
-set_location_assignment PIN_56 -to io_tx_b[13]
-set_location_assignment PIN_55 -to io_tx_b[14]
-set_location_assignment PIN_152 -to master_clk
-set_location_assignment PIN_144 -to rx_a_a[0]
-set_location_assignment PIN_143 -to rx_a_a[1]
-set_location_assignment PIN_141 -to rx_a_a[2]
-set_location_assignment PIN_140 -to rx_a_a[3]
-set_location_assignment PIN_139 -to rx_a_a[4]
-set_location_assignment PIN_138 -to rx_a_a[5]
-set_location_assignment PIN_137 -to rx_a_a[6]
-set_location_assignment PIN_136 -to rx_a_a[7]
-set_location_assignment PIN_135 -to rx_a_a[8]
-set_location_assignment PIN_134 -to rx_a_a[9]
-set_location_assignment PIN_133 -to rx_a_a[10]
-set_location_assignment PIN_132 -to rx_a_a[11]
-set_location_assignment PIN_23 -to rx_a_b[0]
-set_location_assignment PIN_21 -to rx_a_b[1]
-set_location_assignment PIN_20 -to rx_a_b[2]
-set_location_assignment PIN_19 -to rx_a_b[3]
-set_location_assignment PIN_18 -to rx_a_b[4]
-set_location_assignment PIN_17 -to rx_a_b[5]
-set_location_assignment PIN_16 -to rx_a_b[6]
-set_location_assignment PIN_15 -to rx_a_b[7]
-set_location_assignment PIN_14 -to rx_a_b[8]
-set_location_assignment PIN_13 -to rx_a_b[9]
-set_location_assignment PIN_12 -to rx_a_b[10]
-set_location_assignment PIN_11 -to rx_a_b[11]
-set_location_assignment PIN_131 -to rx_b_a[0]
-set_location_assignment PIN_128 -to rx_b_a[1]
-set_location_assignment PIN_127 -to rx_b_a[2]
-set_location_assignment PIN_126 -to rx_b_a[3]
-set_location_assignment PIN_125 -to rx_b_a[4]
-set_location_assignment PIN_124 -to rx_b_a[5]
-set_location_assignment PIN_123 -to rx_b_a[6]
-set_location_assignment PIN_122 -to rx_b_a[7]
-set_location_assignment PIN_121 -to rx_b_a[8]
-set_location_assignment PIN_120 -to rx_b_a[9]
-set_location_assignment PIN_119 -to rx_b_a[10]
-set_location_assignment PIN_118 -to rx_b_a[11]
-set_location_assignment PIN_8 -to rx_b_b[0]
-set_location_assignment PIN_7 -to rx_b_b[1]
-set_location_assignment PIN_6 -to rx_b_b[2]
-set_location_assignment PIN_5 -to rx_b_b[3]
-set_location_assignment PIN_4 -to rx_b_b[4]
-set_location_assignment PIN_3 -to rx_b_b[5]
-set_location_assignment PIN_2 -to rx_b_b[6]
-set_location_assignment PIN_240 -to rx_b_b[7]
-set_location_assignment PIN_239 -to rx_b_b[8]
-set_location_assignment PIN_238 -to rx_b_b[9]
-set_location_assignment PIN_237 -to rx_b_b[10]
-set_location_assignment PIN_236 -to rx_b_b[11]
-set_location_assignment PIN_156 -to SDO
-set_location_assignment PIN_153 -to SEN_FPGA
-set_location_assignment PIN_159 -to tx_a[0]
-set_location_assignment PIN_160 -to tx_a[1]
-set_location_assignment PIN_161 -to tx_a[2]
-set_location_assignment PIN_162 -to tx_a[3]
-set_location_assignment PIN_163 -to tx_a[4]
-set_location_assignment PIN_164 -to tx_a[5]
-set_location_assignment PIN_165 -to tx_a[6]
-set_location_assignment PIN_166 -to tx_a[7]
-set_location_assignment PIN_167 -to tx_a[8]
-set_location_assignment PIN_168 -to tx_a[9]
-set_location_assignment PIN_169 -to tx_a[10]
-set_location_assignment PIN_170 -to tx_a[11]
-set_location_assignment PIN_173 -to tx_a[12]
-set_location_assignment PIN_174 -to tx_a[13]
-set_location_assignment PIN_38 -to tx_b[0]
-set_location_assignment PIN_39 -to tx_b[1]
-set_location_assignment PIN_41 -to tx_b[2]
-set_location_assignment PIN_42 -to tx_b[3]
-set_location_assignment PIN_43 -to tx_b[4]
-set_location_assignment PIN_44 -to tx_b[5]
-set_location_assignment PIN_45 -to tx_b[6]
-set_location_assignment PIN_46 -to tx_b[7]
-set_location_assignment PIN_47 -to tx_b[8]
-set_location_assignment PIN_48 -to tx_b[9]
-set_location_assignment PIN_49 -to tx_b[10]
-set_location_assignment PIN_50 -to tx_b[11]
-set_location_assignment PIN_53 -to tx_b[12]
-set_location_assignment PIN_54 -to tx_b[13]
-set_location_assignment PIN_158 -to TXSYNC_A
-set_location_assignment PIN_37 -to TXSYNC_B
-set_location_assignment PIN_235 -to io_rx_b[15]
-set_location_assignment PIN_24 -to io_tx_b[15]
-set_location_assignment PIN_213 -to io_rx_a[15]
-set_location_assignment PIN_194 -to io_tx_a[15]
-set_location_assignment PIN_1 -to MYSTERY_SIGNAL
-
-# Timing Assignments
-# ==================
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF
-
-# Analysis & Synthesis Assignments
-# ================================
-set_global_assignment -name SAVE_DISK_SPACE OFF
-set_global_assignment -name DEVICE_FILTER_PACKAGE "ANY QFP"
-set_global_assignment -name DEVICE_FILTER_PIN_COUNT 240
-set_global_assignment -name EDA_DESIGN_ENTRY_SYNTHESIS_TOOL "<None>"
-set_global_assignment -name FAMILY Cyclone
-set_global_assignment -name CYCLONE_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name STRATIX_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name APEX20K_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name TOP_LEVEL_ENTITY mrfm
-set_global_assignment -name VHDL_SHOW_LMF_MAPPING_MESSAGES OFF
-set_global_assignment -name USER_LIBRARIES "e:\\usrp\\fpga\\megacells"
-set_global_assignment -name AUTO_ENABLE_SMART_COMPILE ON
-
-# Fitter Assignments
-# ==================
-set_global_assignment -name DEVICE EP1C12Q240C8
-set_global_assignment -name CYCLONE_CONFIGURATION_SCHEME "PASSIVE SERIAL"
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED"
-set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF
-set_global_assignment -name OPTIMIZE_TIMING "NORMAL COMPILATION"
-set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC ON
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION ON
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING ON
-set_global_assignment -name IO_PLACEMENT_OPTIMIZATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT EXTRA
-set_global_assignment -name INC_PLC_MODE OFF
-set_global_assignment -name ROUTING_BACK_ANNOTATION_MODE OFF
-set_instance_assignment -name IO_STANDARD LVTTL -to usbdata[12]
-set_global_assignment -name STRATIX_DEVICE_IO_STANDARD LVTTL
-set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
-
-# Timing Analysis Assignments
-# ===========================
-set_global_assignment -name MAX_SCC_SIZE 50
-
-# EDA Netlist Writer Assignments
-# ==============================
-set_global_assignment -name EDA_SIMULATION_TOOL "<None>"
-set_global_assignment -name EDA_TIMING_ANALYSIS_TOOL "<NONE>"
-set_global_assignment -name EDA_BOARD_DESIGN_TOOL "<NONE>"
-set_global_assignment -name EDA_FORMAL_VERIFICATION_TOOL "<NONE>"
-set_global_assignment -name EDA_RESYNTHESIS_TOOL "<NONE>"
-
-# Assembler Assignments
-# =====================
-set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
-set_global_assignment -name GENERATE_RBF_FILE ON
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
-set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
-
-# Simulator Assignments
-# =====================
-set_global_assignment -name START_TIME "0 ns"
-set_global_assignment -name GLITCH_INTERVAL "1 ns"
-
-# Design Assistant Assignments
-# ============================
-set_global_assignment -name DRC_REPORT_TOP_FANOUT OFF
-set_global_assignment -name DRC_REPORT_FANOUT_EXCEEDING OFF
-set_global_assignment -name ASSG_CAT OFF
-set_global_assignment -name ASSG_RULE_MISSING_FMAX OFF
-set_global_assignment -name ASSG_RULE_MISSING_TIMING OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ASYN_RAM OFF
-set_global_assignment -name CLK_CAT OFF
-set_global_assignment -name CLK_RULE_COMB_CLOCK OFF
-set_global_assignment -name CLK_RULE_INV_CLOCK OFF
-set_global_assignment -name CLK_RULE_GATING_SCHEME OFF
-set_global_assignment -name CLK_RULE_INPINS_CLKNET OFF
-set_global_assignment -name CLK_RULE_CLKNET_CLKSPINES OFF
-set_global_assignment -name CLK_RULE_MIX_EDGES OFF
-set_global_assignment -name RESET_CAT OFF
-set_global_assignment -name RESET_RULE_INPINS_RESETNET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_COMB_ASYNCH_RESET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name TIMING_CAT OFF
-set_global_assignment -name TIMING_RULE_SHIFT_REG OFF
-set_global_assignment -name TIMING_RULE_COIN_CLKEDGE OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE OFF
-set_global_assignment -name NONSYNCHSTRUCT_CAT OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMBLOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_REG_LOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_DELAY_CHAIN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_RIPPLE_CLK OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_SRLATCH OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED OFF
-set_global_assignment -name SIGNALRACE_CAT OFF
-set_global_assignment -name ACLK_CAT OFF
-set_global_assignment -name ACLK_RULE_NO_SZER_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_SZER_BTW_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_IMSZER_ADOMAIN OFF
-set_global_assignment -name HCPY_CAT OFF
-set_global_assignment -name HCPY_VREF_PINS OFF
-
-# SignalTap II Assignments
-# ========================
-set_global_assignment -name HUB_ENTITY_NAME SLD_HUB
-set_global_assignment -name HUB_INSTANCE_NAME SLD_HUB_INST
-set_global_assignment -name ENABLE_SIGNALTAP OFF
-
-# LogicLock Region Assignments
-# ============================
-set_global_assignment -name LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT OFF
-
-# -----------------
-# start CLOCK(SCLK)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id SCLK
-set_global_assignment -name FMAX_REQUIREMENT "1 MHz" -section_id SCLK
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id SCLK
-
-# end CLOCK(SCLK)
-# ---------------
-
-# -----------------------
-# start CLOCK(master_clk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id master_clk
-set_global_assignment -name FMAX_REQUIREMENT "64 MHz" -section_id master_clk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id master_clk
-
-# end CLOCK(master_clk)
-# ---------------------
-
-# -------------------
-# start CLOCK(usbclk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id usbclk
-set_global_assignment -name FMAX_REQUIREMENT "48 MHz" -section_id usbclk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id usbclk
-
-# end CLOCK(usbclk)
-# -----------------
-
-# ----------------------
-# start ENTITY(mrfm)
-
- # Timing Assignments
- # ==================
-set_instance_assignment -name CLOCK_SETTINGS SCLK -to SCLK
-set_instance_assignment -name CLOCK_SETTINGS usbclk -to usbclk
-set_instance_assignment -name CLOCK_SETTINGS master_clk -to master_clk
-
-# end ENTITY(mrfm)
-# --------------------
-
-
-set_global_assignment -name PHYSICAL_SYNTHESIS_ASYNCHRONOUS_SIGNAL_PIPELINING ON
-set_global_assignment -name SMART_RECOMPILE ON
-set_global_assignment -name VERILOG_FILE mrfm.vh
-set_global_assignment -name VERILOG_FILE biquad_2stage.v
-set_global_assignment -name VERILOG_FILE mrfm_compensator.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/ram16.v
-set_global_assignment -name VERILOG_FILE mrfm_proc.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4k.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mult.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/ram16_2sum.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_rom.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/halfband_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mac.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_ram.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_dcoffset.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/adc_interface.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/io_pins.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/setting_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/bidir_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_int_shifter.v
-set_global_assignment -name VERILOG_FILE ../../megacells/clk_doubler.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/gen_sync.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/master_control.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_2k.v
-set_global_assignment -name VERILOG_FILE ../../megacells/bustri.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/phase_acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_interp.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic_stage.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic.v
-set_global_assignment -name VERILOG_FILE mrfm.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/clk_divider.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/serial_io.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/strobe_gen.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/sign_extend.v
-set_global_assignment -name FITTER_EFFORT "STANDARD FIT" \ No newline at end of file
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.v b/usrp/fpga/toplevel/mrfm/mrfm.v
deleted file mode 100644
index 7a0e38059..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.v
+++ /dev/null
@@ -1,199 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Top level module for a full setup with DUCs and DDCs
-
-// Uncomment the following to include optional circuitry
-
-`include "mrfm.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-
-module mrfm
-(output MYSTERY_SIGNAL,
- input master_clk,
- input SCLK,
- input SDI,
- inout SDO,
- input SEN_FPGA,
-
- input FX2_1,
- output FX2_2,
- output FX2_3,
-
- input wire [11:0] rx_a_a,
- input wire [11:0] rx_b_a,
- input wire [11:0] rx_a_b,
- input wire [11:0] rx_b_b,
-
- output wire [13:0] tx_a,
- output wire [13:0] tx_b,
-
- output wire TXSYNC_A,
- output wire TXSYNC_B,
-
- // USB interface
- input usbclk,
- input wire [2:0] usbctl,
- output wire [1:0] usbrdy,
- inout [15:0] usbdata, // NB Careful, inout
-
- // These are the general purpose i/o's that go to the daughterboard slots
- inout wire [15:0] io_tx_a,
- inout wire [15:0] io_tx_b,
- inout wire [15:0] io_rx_a,
- inout wire [15:0] io_rx_b
- );
- wire [15:0] debugdata,debugctrl;
- assign MYSTERY_SIGNAL = 1'b0;
-
- wire clk64;
-
- wire WR = usbctl[0];
- wire RD = usbctl[1];
- wire OE = usbctl[2];
-
- wire have_space, have_pkt_rdy;
- assign usbrdy[0] = have_space;
- assign usbrdy[1] = have_pkt_rdy;
-
- wire tx_underrun, rx_overrun;
- wire clear_status = FX2_1;
- assign FX2_2 = rx_overrun;
- assign FX2_3 = tx_underrun;
-
- wire [15:0] usbdata_out;
-
- wire [3:0] dac0mux,dac1mux,dac2mux,dac3mux;
-
- wire tx_realsignals;
- wire [3:0] rx_numchan;
-
- wire [15:0] tx_debugbus, rx_debugbus;
-
- wire enable_tx, enable_rx;
- wire tx_dsp_reset, rx_dsp_reset, tx_bus_reset, rx_bus_reset;
- wire [7:0] settings;
-
- // Tri-state bus macro
- bustri bustri( .data(usbdata_out),.enabledt(OE),.tridata(usbdata) );
-
- assign clk64 = master_clk;
-
- wire [15:0] ch0tx,ch1tx,ch2tx,ch3tx;
- wire [15:0] ch0rx,ch1rx,ch2rx,ch3rx,ch4rx,ch5rx,ch6rx,ch7rx;
-
- wire serial_strobe;
- wire [6:0] serial_addr;
- wire [31:0] serial_data;
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////
-
- setting_reg #(`FR_TX_MUX)
- sr_txmux(.clock(clk64),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({dac3mux,dac2mux,dac1mux,dac0mux,tx_realsignals,tx_numchan}));
-
- //////////////////////////////////////////////////////////////////////////////////////////////////////
- // Signal Processing Chain
-
- reg [15:0] adc0;
- wire [15:0] dac0;
- wire [15:0] i,q,ip,qp;
- wire strobe_out;
- wire sync_out;
-
- always @(posedge clk64)
- adc0 <= #1 {rx_a_a[11],rx_a_a[11:0],3'b0};
-
- wire [15:0] adc0_corr;
- rx_dcoffset #(0)rx_dcoffset0(.clock(clk64),.enable(1'b1),.reset(reset),.adc_in(adc0),.adc_out(adc0_corr),
- .serial_addr(7'd0),.serial_data(32'd0),.serial_strobe(1'b0));
-
- //wire [63:0] filt_debug = 64'd0;
-
- mrfm_proc mrfm_proc(.clock(clk64),.reset(rx_dsp_reset),.enable(enable_rx),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .signal_in(adc0_corr),.signal_out(dac0),.sync_out(sync_out),
- .i(i),.q(q),.ip(ip),.qp(qp),.strobe_out(strobe_out),
- .debugbus( /* filt_debug */ ));
-
- wire txsync = 1'b0;
- assign TXSYNC_A = txsync;
- assign TXSYNC_B = txsync;
-
- assign tx_a = dac0[15:2];
-
- //////////////////////////////////////////////////////////////////////////////////////////////////
- // Data Collection on RX Buffer
-
- assign rx_numchan[0] = 1'b0;
- setting_reg #(`FR_RX_MUX) sr_rxmux(.clock(clk64),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),
- .in(serial_data),.out(rx_numchan[3:1]));
-
- rx_buffer rx_buffer
- ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset),
- .usbdata(usbdata_out),.RD(RD),.have_pkt_rdy(have_pkt_rdy),.rx_overrun(rx_overrun),
- .channels(rx_numchan),
- .ch_0(i),.ch_1(q),
- .ch_2(ip),.ch_3(qp),
- .ch_4(16'd0),.ch_5(16'd0),
- .ch_6(16'd0),.ch_7(16'd0),
- .rxclk(clk64),.rxstrobe(strobe_out),
- .clear_status(clear_status),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .debugbus(rx_debugbus) );
-
- //////////////////////////////////////////////////////////////////////////////
- // Control Functions
-
- wire [31:0] capabilities = 32'd2;
-
- serial_io serial_io
- ( .master_clk(clk64),.serial_clock(SCLK),.serial_data_in(SDI),
- .enable(SEN_FPGA),.reset(1'b0),.serial_data_out(SDO),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .readback_0({io_rx_a,io_tx_a}),.readback_1({io_rx_b,io_tx_b}),.readback_2(capabilities),.readback_3(32'hf0f0931a) );
-
- wire [15:0] reg_0,reg_1,reg_2,reg_3;
- master_control master_control
- ( .master_clk(clk64),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- .debug_0({15'd0,sync_out}), //filt_debug[63:48]),
- .debug_1({15'd0,sync_out}), //filt_debug[47:32]),
- .debug_2({15'd0,sync_out}), //filt_debug[31:16]),
- .debug_3({15'd0,sync_out}), //filt_debug[15:0]),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3) );
-
- io_pins io_pins
- (.io_0(io_tx_a),.io_1(io_rx_a),.io_2(io_tx_b),.io_3(io_rx_b),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3),
- .clock(clk64),.rx_reset(rx_dsp_reset),.tx_reset(tx_dsp_reset),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
-
-endmodule // mrfm
-
diff --git a/usrp/fpga/toplevel/mrfm/mrfm.vh b/usrp/fpga/toplevel/mrfm/mrfm.vh
deleted file mode 100644
index 808342d8d..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm.vh
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-// MRFM Register defines
-
-`define FR_MRFM_DECIM 7'd64
-`define FR_MRFM_FREQ 7'd65
-`define FR_MRFM_PHASE 7'd66
-`define FR_MRFM_IIR_COEFF 7'd67
-`define FR_MRFM_IIR_SHIFT 7'd68
-`define FR_MRFM_DEBUG 7'd69
-`define FR_MRFM_COMP_A11 7'd70
-`define FR_MRFM_COMP_A12 7'd71
-`define FR_MRFM_COMP_A21 7'd72
-`define FR_MRFM_COMP_A22 7'd73
-`define FR_MRFM_COMP_SHIFT 7'd74
-`define FR_USER_11 7'd75
-`define FR_USER_12 7'd76
-`define FR_USER_13 7'd77
-`define FR_USER_14 7'd78
-`define FR_USER_15 7'd79
-
diff --git a/usrp/fpga/toplevel/mrfm/mrfm_compensator.v b/usrp/fpga/toplevel/mrfm/mrfm_compensator.v
deleted file mode 100644
index f44b73b2f..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm_compensator.v
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-module mrfm_compensator (input clock, input reset, input strobe_in,
- input serial_strobe, input [6:0] serial_addr, input [31:0] serial_data,
- input [15:0] i_in, input [15:0] q_in, output reg [15:0] i_out, output reg [15:0] q_out);
-
- wire [15:0] a11,a12,a21,a22;
- reg [15:0] i_in_reg, q_in_reg;
- wire [30:0] product;
- reg [3:0] phase;
- wire [15:0] data,coeff;
- wire [7:0] shift;
- wire [33:0] accum;
- wire [15:0] scaled_accum;
- wire enable_acc;
-
- setting_reg #(`FR_MRFM_COMP_A11) sr_a11(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(a11),.changed());
- setting_reg #(`FR_MRFM_COMP_A12) sr_a12(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(a12),.changed());
- setting_reg #(`FR_MRFM_COMP_A21) sr_a21(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(a21),.changed());
- setting_reg #(`FR_MRFM_COMP_A22) sr_a22(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(a22),.changed());
- setting_reg #(`FR_MRFM_COMP_SHIFT) sr_cshift(.clock(clock),.reset(reset),
- .strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out(shift),.changed());
-
- mult mult (.clock(clock),.x(data),.y(coeff),.product(product),.enable_in(1'b1),.enable_out() );
- acc acc (.clock(clock),.reset(reset),.clear(clear_acc),.enable_in(enable_acc),.enable_out(),
- .addend(product),.sum(accum) );
- shifter shifter (.in(accum),.out(scaled_accum),.shift(shift));
-
- always @(posedge clock)
- if(reset)
- begin
- i_in_reg <= #1 16'd0;
- q_in_reg <= #1 16'd0;
- end
- else if(strobe_in)
- begin
- i_in_reg <= #1 i_in;
- q_in_reg <= #1 q_in;
- end
-
- always @(posedge clock)
- if(reset)
- phase <= #1 4'd0;
- else if(strobe_in)
- phase <= #1 4'd1;
- else if(strobe_in != 4'd8)
- phase <= #1 phase + 4'd1;
-
- assign data = ((phase == 4'd1)||(phase === 4'd4)) ? i_in_reg :
- ((phase == 4'd2)||(phase == 4'd5)) ? q_in_reg : 16'd0;
-
- assign coeff = (phase == 4'd1) ? a11 : (phase == 4'd2) ? a12 :
- (phase == 4'd4) ? a21 : (phase == 4'd5) ? a22 : 16'd0;
-
- assign clear_acc = (phase == 4'd0) || (phase == 4'd1) || (phase == 4'd4) || (phase==4'd8);
- assign enable_acc = ~clear_acc;
-
- always @(posedge clock)
- if(reset)
- i_out <= #1 16'd0;
- else if(phase == 4'd4)
- i_out <= #1 scaled_accum;
-
- always @(posedge clock)
- if(reset)
- q_out <= #1 16'd0;
- else if(phase == 4'd7)
- q_out <= #1 scaled_accum;
-
-
-endmodule // mrfm_compensator
diff --git a/usrp/fpga/toplevel/mrfm/mrfm_fft.py b/usrp/fpga/toplevel/mrfm/mrfm_fft.py
deleted file mode 100755
index a4db0a53d..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm_fft.py
+++ /dev/null
@@ -1,319 +0,0 @@
-#!/usr/bin/env python
-#
-# This is mrfm_fft_sos.py
-# Modification of Matt's mrfm_fft.py that reads filter coefs from file
-#
-# Copyright 2004,2005 Free Software Foundation, Inc.
-#
-# 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.
-#
-
-from gnuradio import gr, gru
-from gnuradio import usrp
-from gnuradio import eng_notation
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider
-from optparse import OptionParser
-import wx
-import sys
-import mrfm
-
-
-def pick_subdevice(u):
- """
- The user didn't specify a subdevice on the command line.
- If there's a daughterboard on A, select A.
- If there's a daughterboard on B, select B.
- Otherwise, select A.
- """
- if u.db[0][0].dbid() >= 0: # dbid is < 0 if there's no d'board or a problem
- return (0, 0)
- if u.db[1][0].dbid() >= 0:
- return (1, 0)
- return (0, 0)
-
-def read_ints(filename):
- try:
- f = open(filename)
- ints = [ int(i) for i in f.read().split() ]
- f.close()
- return ints
- except:
- return []
-
-class app_flow_graph(stdgui.gui_flow_graph):
- def __init__(self, frame, panel, vbox, argv):
- stdgui.gui_flow_graph.__init__(self)
-
- self.frame = frame
- self.panel = panel
-
- parser = OptionParser(option_class=eng_option)
- parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None,
- help="select USRP Rx side A or B (default=first one with a daughterboard)")
- parser.add_option("-d", "--decim", type="int", default=16,
- help="set fgpa decimation rate to DECIM [default=%default]")
- parser.add_option("-f", "--freq", type="eng_float", default=None,
- help="set frequency to FREQ", metavar="FREQ")
- parser.add_option("-g", "--gain", type="eng_float", default=None,
- help="set gain in dB (default is midpoint)")
- parser.add_option("-W", "--waterfall", action="store_true", default=False,
- help="Enable waterfall display")
- parser.add_option("-8", "--width-8", action="store_true", default=False,
- help="Enable 8-bit samples across USB")
- parser.add_option("-S", "--oscilloscope", action="store_true", default=False,
- help="Enable oscilloscope display")
- parser.add_option("-F", "--filename", default=None,
- help="Name of file with filter coefficients")
- parser.add_option("-C", "--cfilename", default=None,
- help="Name of file with compensator coefficients")
- parser.add_option("-B", "--bitstream", default="mrfm.rbf",
- help="Name of FPGA Bitstream file (.rbf)")
- parser.add_option("-n", "--frame-decim", type="int", default=20,
- help="set oscope frame decimation factor to n [default=12]")
- (options, args) = parser.parse_args()
- if len(args) != 0:
- parser.print_help()
- sys.exit(1)
-
- self.show_debug_info = True
-
- # default filter coefs
- b00 = b01 = 16384
- b10 = b20 = a10 = a20 = b11 = b21 = a11 = a21 = 0
-
- ba = read_ints(options.filename)
- if len(ba) >= 6:
- b00 = ba[0]; b10 = ba[1]; b20 = ba[2]; a10 = ba[4]; a20 = ba[5]
- if len(ba) >= 12:
- b01 = ba[6]; b11 = ba[7]; b21 = ba[8]; a11 = ba[10]; a21=ba[11]
- print b00, b10, b20, a10, a20, b01, b11, b21, a11, a21
-
- # default compensator coefficients
- c11 = c22 = 1
- c12 = c21 = cscale = 0
-
- cs = read_ints(options.cfilename)
- if len(cs) >= 5:
- c11 = cs[0]; c12 = cs[1]; c21 = cs[2]; c22 = cs[3]; cscale = cs[4]
- print c11, c12, c21, c22, cscale
-
- # build the graph
- self.u = mrfm.source_c(options.bitstream)
-
- self.u.set_decim_rate(options.decim)
- self.u.set_center_freq(options.freq)
-
- frac_bits = 14
- self.u.set_coeffs(frac_bits,b20,b10,b00,a20,a10,b21,b11,b01,a21,a11)
-
- self.u.set_compensator(c11,c12,c21,c22,cscale)
-
- if options.rx_subdev_spec is None:
- options.rx_subdev_spec = pick_subdevice(self.u)
- self.u.set_mux(usrp.determine_rx_mux_value(self.u, options.rx_subdev_spec))
-
- if options.width_8:
- width = 8
- shift = 8
- format = self.u.make_format(width, shift)
- print "format =", hex(format)
- r = self.u.set_format(format)
- print "set_format =", r
-
- # determine the daughterboard subdevice we're using
- self.subdev = usrp.selected_subdev(self.u, options.rx_subdev_spec)
-
- #input_rate = self.u.adc_freq() / self.u.decim_rate()
- input_rate = self.u.adc_freq() / options.decim
-
- # fft_rate = 15
- fft_rate = 5
-
- self.deint = gr.deinterleave(gr.sizeof_gr_complex)
- self.connect(self.u,self.deint)
-
- if options.waterfall:
- self.scope1=waterfallsink.waterfall_sink_c (self, panel, fft_size=1024, sample_rate=input_rate,
- fft_rate=fft_rate)
- self.scope2=waterfallsink.waterfall_sink_c (self, panel, fft_size=1024, sample_rate=input_rate,
- fft_rate=fft_rate)
-
- elif options.oscilloscope:
- self.scope1 = scopesink.scope_sink_c(self, panel, sample_rate=input_rate,frame_decim=options.frame_decim) # added option JPJ 4/21/2006
- self.scope2 = scopesink.scope_sink_c(self, panel, sample_rate=input_rate,frame_decim=options.frame_decim)
-
- else:
- self.scope1 = fftsink.fft_sink_c (self, panel, fft_size=1024, sample_rate=input_rate,
- fft_rate=fft_rate)
- self.scope2 = fftsink.fft_sink_c (self, panel, fft_size=1024, sample_rate=input_rate,
- fft_rate=fft_rate)
-
- # Show I, I' on top scope panel, Q, Q' on bottom
- #self.fin = gr.complex_to_float()
- #self.fout = gr.complex_to_float()
-
- #self.connect((self.deint,0), self.fin)
- #self.connect((self.deint,1), self.fout)
-
- #self.ii = gr.float_to_complex()
- #self.qq = gr.float_to_complex()
-
- #self.connect((self.fin,0), (self.ii,0))
- #self.connect((self.fout,0), (self.ii,1))
- #self.connect((self.fin,1), (self.qq,0))
- #self.connect((self.fout,1), (self.qq,1))
-
- #self.connect(self.ii, self.scope1)
- #self.connect(self.qq, self.scope2)
-
- self.connect ((self.deint,0),self.scope1)
- self.connect ((self.deint,1),self.scope2)
-
- self._build_gui(vbox)
-
- # set initial values
-
- if options.gain is None:
- # if no gain was specified, use the mid-point in dB
- g = self.subdev.gain_range()
- options.gain = float(g[0]+g[1])/2
-
- if options.freq is None:
- # if no freq was specified, use the mid-point
- r = self.subdev.freq_range()
- options.freq = float(r[0]+r[1])/2
-
- self.set_gain(options.gain)
-
- if not(self.set_freq(options.freq)):
- self._set_status_msg("Failed to set initial frequency")
-
- if self.show_debug_info:
- self.myform['decim'].set_value(self.u.decim_rate())
- self.myform['fs@usb'].set_value(self.u.adc_freq() / self.u.decim_rate())
- self.myform['dbname'].set_value(self.subdev.name())
-
-
- def _set_status_msg(self, msg):
- self.frame.GetStatusBar().SetStatusText(msg, 0)
-
- def _build_gui(self, vbox):
-
- def _form_set_freq(kv):
- return self.set_freq(kv['freq'])
-
- vbox.Add(self.scope1.win, 10, wx.EXPAND)
- vbox.Add(self.scope2.win, 10, wx.EXPAND)
-
- # add control area at the bottom
- self.myform = myform = form.form()
- hbox = wx.BoxSizer(wx.HORIZONTAL)
- hbox.Add((5,0), 0, 0)
- myform['freq'] = form.float_field(
- parent=self.panel, sizer=hbox, label="Center freq", weight=1,
- callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
- hbox.Add((5,0), 0, 0)
- g = self.subdev.gain_range()
- myform['gain'] = form.slider_field(parent=self.panel, sizer=hbox, label="Gain",
- weight=3,
- min=int(g[0]), max=int(g[1]),
- callback=self.set_gain)
-
- hbox.Add((5,0), 0, 0)
- vbox.Add(hbox, 0, wx.EXPAND)
-
- self._build_subpanel(vbox)
-
- def _build_subpanel(self, vbox_arg):
- # build a secondary information panel (sometimes hidden)
-
- # FIXME figure out how to have this be a subpanel that is always
- # created, but has its visibility controlled by foo.Show(True/False)
-
- if not(self.show_debug_info):
- return
-
- panel = self.panel
- vbox = vbox_arg
- myform = self.myform
-
- #panel = wx.Panel(self.panel, -1)
- #vbox = wx.BoxSizer(wx.VERTICAL)
-
- hbox = wx.BoxSizer(wx.HORIZONTAL)
- hbox.Add((5,0), 0)
- myform['decim'] = form.static_float_field(
- parent=panel, sizer=hbox, label="Decim")
-
- hbox.Add((5,0), 1)
- myform['fs@usb'] = form.static_float_field(
- parent=panel, sizer=hbox, label="Fs@USB")
-
- hbox.Add((5,0), 1)
- myform['dbname'] = form.static_text_field(
- parent=panel, sizer=hbox)
-
- hbox.Add((5,0), 1)
- myform['baseband'] = form.static_float_field(
- parent=panel, sizer=hbox, label="Analog BB")
-
- hbox.Add((5,0), 1)
- myform['ddc'] = form.static_float_field(
- parent=panel, sizer=hbox, label="DDC")
-
- hbox.Add((5,0), 0)
- vbox.Add(hbox, 0, wx.EXPAND)
-
-
-
- def set_freq(self, target_freq):
- """
- Set the center frequency we're interested in.
-
- @param target_freq: frequency in Hz
- @rypte: bool
-
- Tuning is a two step process. First we ask the front-end to
- tune as close to the desired frequency as it can. Then we use
- the result of that operation and our target_frequency to
- determine the value for the digital down converter.
- """
- r = self.u.tune(0, self.subdev, target_freq)
-
- if r:
- self.myform['freq'].set_value(target_freq) # update displayed value
- if self.show_debug_info:
- self.myform['baseband'].set_value(r.baseband_freq)
- self.myform['ddc'].set_value(r.dxc_freq)
- return True
-
- return False
-
- def set_gain(self, gain):
- self.myform['gain'].set_value(gain) # update displayed value
- self.subdev.set_gain(gain)
-
-
-def main ():
- app = stdgui.stdapp(app_flow_graph, "USRP FFT", nstatus=1)
- app.MainLoop()
-
-if __name__ == '__main__':
- main ()
diff --git a/usrp/fpga/toplevel/mrfm/mrfm_proc.v b/usrp/fpga/toplevel/mrfm/mrfm_proc.v
deleted file mode 100644
index 80de9fc90..000000000
--- a/usrp/fpga/toplevel/mrfm/mrfm_proc.v
+++ /dev/null
@@ -1,96 +0,0 @@
-
-`include "mrfm.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-
-module mrfm_proc (input clock, input reset, input enable,
- input [6:0] serial_addr, input [31:0] serial_data, input serial_strobe,
- input [15:0] signal_in, output wire [15:0] signal_out, output wire sync_out,
- output wire [15:0] i, output wire [15:0] q,
- output wire [15:0] ip, output wire [15:0] qp,
- output wire strobe_out, output wire [63:0] debugbus);
-
- // Strobes
- wire sample_strobe, strobe_0, strobe_1, strobe_2;
- assign sample_strobe = 1'b1;
- wire [7:0] rate_0, rate_1, rate_2;
-
- setting_reg #(`FR_MRFM_DECIM) sr_decim(.clock(clock),.reset(reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out({rate_2,rate_1,rate_0}));
-
- strobe_gen strobe_gen_0
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(rate_0),.strobe_in(sample_strobe),.strobe(strobe_0) );
- strobe_gen strobe_gen_1
- ( .clock(clock),.reset(reset),.enable(enable),
- .rate(rate_1),.strobe_in(strobe_0),.strobe(strobe_1) );
-
- wire [31:0] phase;
-
- assign sync_out = phase[31];
- wire [15:0] i_decim_0, i_decim_1, i_decim_2;
- wire [15:0] q_decim_0, q_decim_1, q_decim_2;
-
- wire [15:0] i_interp_0, i_interp_1, i_interp_2;
- wire [15:0] q_interp_0, q_interp_1, q_interp_2;
-
- wire [15:0] i_filt, q_filt, i_comp, q_comp;
-
- assign ip=i_comp;
- assign qp=q_comp;
-
- phase_acc #(`FR_MRFM_FREQ,`FR_MRFM_PHASE,32) rx_phase_acc
- (.clk(clock),.reset(reset),.enable(enable),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .strobe(sample_strobe),.phase(phase) );
-
- cordic rx_cordic (.clock(clock),.reset(reset),.enable(enable),
- .xi(signal_in),.yi(16'd0),.zi(phase[31:16]),
- .xo(i_decim_0),.yo(q_decim_0),.zo() );
-
- cic_decim cic_decim_i_0 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_0),.strobe_in(sample_strobe),.strobe_out(strobe_0),
- .signal_in(i_decim_0),.signal_out(i_decim_1));
- cic_decim cic_decim_i_1 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_1),.strobe_in(strobe_0),.strobe_out(strobe_1),
- .signal_in(i_decim_1),.signal_out(i));
-
- cic_decim cic_decim_q_0 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_0),.strobe_in(sample_strobe),.strobe_out(strobe_0),
- .signal_in(q_decim_0),.signal_out(q_decim_1));
- cic_decim cic_decim_q_1 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_1),.strobe_in(strobe_0),.strobe_out(strobe_1),
- .signal_in(q_decim_1),.signal_out(q));
-
- assign strobe_out = strobe_1;
-
- biquad_2stage iir_i (.clock(clock),.reset(reset),.strobe_in(strobe_1),
- .serial_strobe(serial_strobe),.serial_addr(serial_addr),.serial_data(serial_data),
- .sample_in(i),.sample_out(i_filt),.debugbus(debugbus));
-
- biquad_2stage iir_q (.clock(clock),.reset(reset),.strobe_in(strobe_1),
- .serial_strobe(serial_strobe),.serial_addr(serial_addr),.serial_data(serial_data),
- .sample_in(q),.sample_out(q_filt),.debugbus());
-
- mrfm_compensator compensator (.clock(clock),.reset(reset),.strobe_in(strobe_1),
- .serial_strobe(serial_strobe),.serial_addr(serial_addr),.serial_data(serial_data),
- .i_in(i_filt),.q_in(q_filt),.i_out(i_comp),.q_out(q_comp));
-
- cic_interp cic_interp_i_0 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_1),.strobe_in(strobe_1),.strobe_out(strobe_0),
- .signal_in(i_comp),.signal_out(i_interp_0));
- cic_interp cic_interp_i_1 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_0),.strobe_in(strobe_0),.strobe_out(sample_strobe),
- .signal_in(i_interp_0),.signal_out(i_interp_1));
-
- cic_interp cic_interp_q_0 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_1),.strobe_in(strobe_1),.strobe_out(strobe_0),
- .signal_in(q_comp),.signal_out(q_interp_0));
- cic_interp cic_interp_q_1 (.clock(clock),.reset(reset),.enable(enable),
- .rate(rate_0),.strobe_in(strobe_0),.strobe_out(sample_strobe),
- .signal_in(q_interp_0),.signal_out(q_interp_1));
-
- cordic tx_cordic (.clock(clock),.reset(reset),.enable(enable),
- .xi(i_interp_1),.yi(q_interp_1),.zi(-phase[31:16]),
- .xo(signal_out),.yo(),.zo() );
-
-endmodule // mrfm_proc
diff --git a/usrp/fpga/toplevel/mrfm/shifter.v b/usrp/fpga/toplevel/mrfm/shifter.v
deleted file mode 100644
index dd4d4b527..000000000
--- a/usrp/fpga/toplevel/mrfm/shifter.v
+++ /dev/null
@@ -1,106 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2005,2006 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-module shifter(input wire [33:0] in, output wire [15:0] out, input wire [7:0] shift);
- // Wish we could do assign out = in[15+shift:shift];
-
- reg [15:0] quotient, remainder;
- wire [15:0] out_unclipped;
- reg [18:0] msbs;
- wire in_range;
-
- always @*
- case(shift)
- 0 : quotient = in[15:0];
- 1 : quotient = in[16:1];
- 2 : quotient = in[17:2];
- 3 : quotient = in[18:3];
- 4 : quotient = in[19:4];
- 5 : quotient = in[20:5];
- 6 : quotient = in[21:6];
- 7 : quotient = in[22:7];
- 8 : quotient = in[23:8];
- 9 : quotient = in[24:9];
- 10 : quotient = in[25:10];
- 11 : quotient = in[26:11];
- 12 : quotient = in[27:12];
- 13 : quotient = in[28:13];
- 14 : quotient = in[29:14];
- 15 : quotient = in[30:15];
- 16 : quotient = in[31:16];
- 17 : quotient = in[32:17];
- 18 : quotient = in[33:18];
- default : quotient = in[15:0];
- endcase // case(shift)
-
- always @*
- case(shift)
- 0 : remainder = 16'b0;
- 1 : remainder = {in[0],15'b0};
- 2 : remainder = {in[1:0],14'b0};
- 3 : remainder = {in[2:0],13'b0};
- 4 : remainder = {in[3:0],12'b0};
- 5 : remainder = {in[4:0],11'b0};
- 6 : remainder = {in[5:0],10'b0};
- 7 : remainder = {in[6:0],9'b0};
- 8 : remainder = {in[7:0],8'b0};
- 9 : remainder = {in[8:0],7'b0};
- 10 : remainder = {in[9:0],6'b0};
- 11 : remainder = {in[10:0],5'b0};
- 12 : remainder = {in[11:0],4'b0};
- 13 : remainder = {in[12:0],3'b0};
- 14 : remainder = {in[13:0],2'b0};
- 15 : remainder = {in[14:0],1'b0};
- 16 : remainder = in[15:0];
- 17 : remainder = in[16:1];
- 18 : remainder = in[17:2];
- default : remainder = 16'b0;
- endcase // case(shift)
-
- always @*
- case(shift)
- 0 : msbs = in[33:15];
- 1 : msbs = {in[33],in[33:16]};
- 2 : msbs = {{2{in[33]}},in[33:17]};
- 3 : msbs = {{3{in[33]}},in[33:18]};
- 4 : msbs = {{4{in[33]}},in[33:19]};
- 5 : msbs = {{5{in[33]}},in[33:20]};
- 6 : msbs = {{6{in[33]}},in[33:21]};
- 7 : msbs = {{7{in[33]}},in[33:22]};
- 8 : msbs = {{8{in[33]}},in[33:23]};
- 9 : msbs = {{9{in[33]}},in[33:24]};
- 10 : msbs = {{10{in[33]}},in[33:25]};
- 11 : msbs = {{11{in[33]}},in[33:26]};
- 12 : msbs = {{12{in[33]}},in[33:27]};
- 13 : msbs = {{13{in[33]}},in[33:28]};
- 14 : msbs = {{14{in[33]}},in[33:29]};
- 15 : msbs = {{15{in[33]}},in[33:30]};
- 16 : msbs = {{16{in[33]}},in[33:31]};
- 17 : msbs = {{17{in[33]}},in[33:32]};
- 18 : msbs = {{18{in[33]}},in[33]};
- default : msbs = in[33:15];
- endcase // case(shift)
-
- assign in_range = &msbs | ~(|msbs);
- assign out_unclipped = quotient + (in[33] & |remainder);
- assign out = in_range ? out_unclipped : {in[33],{15{~in[33]}}};
-
-endmodule // shifter
diff --git a/usrp/fpga/toplevel/sizetest/.gitignore b/usrp/fpga/toplevel/sizetest/.gitignore
deleted file mode 100644
index 201434ddc..000000000
--- a/usrp/fpga/toplevel/sizetest/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-/*.qws
-/*.eqn
-/*.done
-/*.htm
-/*.rpt
-/*.ini
-/*.fsf
-/*.jam
-/*.jbc
-/*.pin
-/*.pof
-/*.sof
-/*.rbf
-/*.ttf
-/db
diff --git a/usrp/fpga/toplevel/sizetest/sizetest.csf b/usrp/fpga/toplevel/sizetest/sizetest.csf
deleted file mode 100644
index 4b724e7f5..000000000
--- a/usrp/fpga/toplevel/sizetest/sizetest.csf
+++ /dev/null
@@ -1,160 +0,0 @@
-COMPILER_SETTINGS
-{
- IO_PLACEMENT_OPTIMIZATION = OFF;
- ENABLE_DRC_SETTINGS = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_RETIMING = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION = OFF;
- PHYSICAL_SYNTHESIS_COMBO_LOGIC = OFF;
- DRC_FANOUT_EXCEEDING = 30;
- DRC_REPORT_FANOUT_EXCEEDING = OFF;
- DRC_TOP_FANOUT = 50;
- DRC_REPORT_TOP_FANOUT = OFF;
- RUN_DRC_DURING_COMPILATION = OFF;
- ADV_NETLIST_OPT_RETIME_CORE_AND_IO = ON;
- ADV_NETLIST_OPT_SYNTH_USE_FITTER_INFO = OFF;
- ADV_NETLIST_OPT_SYNTH_GATE_RETIME = OFF;
- ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP = OFF;
- SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES = OFF;
- MERGE_HEX_FILE = OFF;
- TRUE_WYSIWYG_FLOW = OFF;
- SEED = 1;
- FINAL_PLACEMENT_OPTIMIZATION = AUTOMATICALLY;
- FAMILY = Cyclone;
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "LOWER TO 1ESB UPPER TO 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DEEP_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_SINGLE_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_WIDE_MODE_OUTPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4ESB";
- DPRAM_DEEP_MODE_OUTPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_INPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4";
- DPRAM_DEEP_MODE_INPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_OTHER_SIGNALS_EPXA4_10 = "DEFAULT OTHER ROUTING OPTIONS";
- DPRAM_OUTPUT_EPXA4_10 = "DEFAULT OUTPUT ROUTING OPTIONS";
- DPRAM_INPUT_EPXA4_10 = "DEFAULT INPUT ROUTING OPTIONS";
- STRIPE_TO_PLD_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PLD_TO_STRIPE_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PROCESSOR_DEBUG_EXTENSIONS_EPXA4_10 = "MEGALAB COLUMN 2";
- STRIPE_TO_PLD_BRIDGE_EPXA4_10 = "MEGALAB COLUMN 1";
- FAST_FIT_COMPILATION = OFF;
- SIGNALPROBE_DURING_NORMAL_COMPILATION = OFF;
- OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING = OFF;
- OPTIMIZE_TIMING = OFF;
- OPTIMIZE_HOLD_TIMING = OFF;
- COMPILATION_LEVEL = FULL;
- SAVE_DISK_SPACE = ON;
- SPEED_DISK_USAGE_TRADEOFF = NORMAL;
- LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT = OFF;
- SIGNALPROBE_ALLOW_OVERUSE = OFF;
- FOCUS_ENTITY_NAME = |sizetest;
- FIT_ONLY_ONE_ATTEMPT = OFF;
-}
-DEFAULT_DEVICE_OPTIONS
-{
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_SVF_FILE = OFF;
- RESERVE_PIN = "AS INPUT TRI-STATED";
- RESERVE_ALL_UNUSED_PINS = "AS OUTPUT DRIVING GROUND";
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- HEXOUT_FILE_START_ADDRESS = 0;
- GENERATE_HEX_FILE = OFF;
- GENERATE_RBF_FILE = OFF;
- GENERATE_TTF_FILE = OFF;
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- USE_CONFIGURATION_DEVICE = ON;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- AUTO_RESTART_CONFIGURATION = OFF;
- ENABLE_VREFB_PIN = OFF;
- ENABLE_VREFA_PIN = OFF;
- SECURITY_BIT = OFF;
- USER_START_UP_CLOCK = OFF;
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "ACTIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_UPDATE_MODE = STANDARD;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- CONFIGURATION_CLOCK_DIVISOR = 1;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CLOCK_SOURCE = INTERNAL;
- COMPRESSION_MODE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
-}
-AUTO_SLD_HUB_ENTITY
-{
- AUTO_INSERT_SLD_HUB_ENTITY = ENABLE;
- HUB_INSTANCE_NAME = SLD_HUB_INST;
- HUB_ENTITY_NAME = SLD_HUB;
-}
-CHIP(sizetest)
-{
- DEVICE = EP1C12Q240C8;
- DEVICE_FILTER_PACKAGE = "ANY QFP";
- DEVICE_FILTER_PIN_COUNT = 240;
- DEVICE_FILTER_SPEED_GRADE = ANY;
-}
-SIGNALTAP_LOGIC_ANALYZER_SETTINGS
-{
- ENABLE_SIGNALTAP = Off;
- AUTO_ENABLE_SMART_COMPILE = On;
-}
diff --git a/usrp/fpga/toplevel/sizetest/sizetest.psf b/usrp/fpga/toplevel/sizetest/sizetest.psf
deleted file mode 100644
index e4fc6aa27..000000000
--- a/usrp/fpga/toplevel/sizetest/sizetest.psf
+++ /dev/null
@@ -1,228 +0,0 @@
-DEFAULT_DESIGN_ASSISTANT_SETTINGS
-{
- HCPY_ALOAD_SIGNALS = OFF;
- HCPY_VREF_PINS = OFF;
- HCPY_CAT = OFF;
- HCPY_ILLEGAL_HC_DEV_PKG = OFF;
- ACLK_RULE_IMSZER_ADOMAIN = OFF;
- ACLK_RULE_SZER_BTW_ACLK_DOMAIN = OFF;
- ACLK_RULE_NO_SZER_ACLK_DOMAIN = OFF;
- ACLK_CAT = OFF;
- SIGNALRACE_RULE_ASYNCHPIN_SYNCH_CLKPIN = OFF;
- SIGNALRACE_CAT = OFF;
- NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED = OFF;
- NONSYNCHSTRUCT_RULE_SRLATCH = OFF;
- NONSYNCHSTRUCT_RULE_DLATCH = OFF;
- NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR = OFF;
- NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN = OFF;
- NONSYNCHSTRUCT_RULE_RIPPLE_CLK = OFF;
- NONSYNCHSTRUCT_RULE_DELAY_CHAIN = OFF;
- NONSYNCHSTRUCT_RULE_REG_LOOP = OFF;
- NONSYNCHSTRUCT_RULE_COMBLOOP = OFF;
- NONSYNCHSTRUCT_CAT = OFF;
- NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE = OFF;
- TIMING_RULE_COIN_CLKEDGE = OFF;
- TIMING_RULE_SHIFT_REG = OFF;
- TIMING_RULE_HIGH_FANOUTS = OFF;
- TIMING_CAT = OFF;
- RESET_RULE_ALL = OFF;
- RESET_RULE_IMSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_UNSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_REG_ASNYCH = OFF;
- RESET_RULE_COMB_ASYNCH_RESET = OFF;
- RESET_RULE_IMSYNCH_EXRESET = OFF;
- RESET_RULE_UNSYNCH_EXRESET = OFF;
- RESET_RULE_INPINS_RESETNET = OFF;
- RESET_CAT = OFF;
- CLK_RULE_ALL = OFF;
- CLK_RULE_MIX_EDGES = OFF;
- CLK_RULE_CLKNET_CLKSPINES = OFF;
- CLK_RULE_INPINS_CLKNET = OFF;
- CLK_RULE_GATING_SCHEME = OFF;
- CLK_RULE_INV_CLOCK = OFF;
- CLK_RULE_COMB_CLOCK = OFF;
- CLK_CAT = OFF;
- HCPY_EXCEED_USER_IO_USAGE = OFF;
- HCPY_EXCEED_RAM_USAGE = OFF;
- NONSYNCHSTRUCT_RULE_ASYN_RAM = OFF;
- SIGNALRACE_RULE_TRISTATE = OFF;
- ASSG_RULE_MISSING_TIMING = OFF;
- ASSG_RULE_MISSING_FMAX = OFF;
- ASSG_CAT = OFF;
-}
-SYNTHESIS_FITTING_SETTINGS
-{
- AUTO_SHIFT_REGISTER_RECOGNITION = ON;
- AUTO_RAM_RECOGNITION = ON;
- REMOVE_DUPLICATE_LOGIC = ON;
- AUTO_MERGE_PLLS = ON;
- AUTO_OPEN_DRAIN_PINS = ON;
- AUTO_CARRY_CHAINS = ON;
- AUTO_DELAY_CHAINS = ON;
- STRATIX_CARRY_CHAIN_LENGTH = 70;
- AUTO_PACKED_REG_CYCLONE = "MINIMIZE AREA WITH CHAINS";
- CYCLONE_OPTIMIZATION_TECHNIQUE = SPEED;
- AUTO_GLOBAL_MEMORY_CONTROLS = OFF;
- AUTO_GLOBAL_REGISTER_CONTROLS = ON;
- AUTO_GLOBAL_CLOCK = ON;
- LIMIT_AHDL_INTEGERS_TO_32_BITS = OFF;
- ENABLE_BUS_HOLD_CIRCUITRY = OFF;
- WEAK_PULL_UP_RESISTOR = OFF;
- IGNORE_SOFT_BUFFERS = ON;
- IGNORE_LCELL_BUFFERS = OFF;
- IGNORE_ROW_GLOBAL_BUFFERS = OFF;
- IGNORE_GLOBAL_BUFFERS = OFF;
- IGNORE_CASCADE_BUFFERS = OFF;
- IGNORE_CARRY_BUFFERS = OFF;
- REMOVE_DUPLICATE_REGISTERS = ON;
- REMOVE_REDUNDANT_LOGIC_CELLS = OFF;
- ALLOW_POWER_UP_DONT_CARE = ON;
- PCI_IO = OFF;
- NOT_GATE_PUSH_BACK = ON;
- SLOW_SLEW_RATE = OFF;
- STATE_MACHINE_PROCESSING = AUTO;
-}
-DEFAULT_HARDCOPY_SETTINGS
-{
- HARDCOPY_EXTERNAL_CLOCK_JITTER = "0.0 NS";
-}
-DEFAULT_TIMING_REQUIREMENTS
-{
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- RUN_ALL_TIMING_ANALYSES = ON;
- IGNORE_CLOCK_SETTINGS = OFF;
- DEFAULT_HOLD_MULTICYCLE = "SAME AS MULTICYCLE";
- CUT_OFF_IO_PIN_FEEDBACK = ON;
- CUT_OFF_CLEAR_AND_PRESET_PATHS = ON;
- CUT_OFF_READ_DURING_WRITE_PATHS = ON;
- CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS = ON;
- DO_MIN_ANALYSIS = ON;
- DO_MIN_TIMING = OFF;
- NUMBER_OF_PATHS_TO_REPORT = 200;
- NUMBER_OF_DESTINATION_TO_REPORT = 10;
- NUMBER_OF_SOURCES_PER_DESTINATION_TO_REPORT = 10;
- MAX_SCC_SIZE = 50;
-}
-HDL_SETTINGS
-{
- VERILOG_INPUT_VERSION = VERILOG_2001;
- ENABLE_IP_DEBUG = OFF;
- VHDL_INPUT_VERSION = VHDL93;
- VHDL_SHOW_LMF_MAPPING_MESSAGES = OFF;
-}
-PROJECT_INFO(sizetest)
-{
- USER_LIBRARIES = "e:\fpga\megacells\";
- ORIGINAL_QUARTUS_VERSION = 3.0;
- PROJECT_CREATION_TIME_DATE = "22:00:25 SEPTEMBER 28, 2003";
- LAST_QUARTUS_VERSION = 3.0;
- SHOW_REGISTRATION_MESSAGE = ON;
-}
-THIRD_PARTY_EDA_TOOLS(sizetest)
-{
- EDA_DESIGN_ENTRY_SYNTHESIS_TOOL = "<NONE>";
- EDA_SIMULATION_TOOL = "<NONE>";
- EDA_TIMING_ANALYSIS_TOOL = "<NONE>";
- EDA_BOARD_DESIGN_TOOL = "<NONE>";
- EDA_FORMAL_VERIFICATION_TOOL = "<NONE>";
- EDA_RESYNTHESIS_TOOL = "<NONE>";
-}
-EDA_TOOL_SETTINGS(eda_design_synthesis)
-{
- EDA_INPUT_GND_NAME = GND;
- EDA_INPUT_VCC_NAME = VCC;
- EDA_SHOW_LMF_MAPPING_MESSAGES = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_INPUT_DATA_FORMAT = EDIF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_simulation)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_timing_analysis)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- EDA_LAUNCH_CMD_LINE_TOOL = OFF;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_board_design)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_formal_verification)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_palace)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- RESYNTHESIS_RETIMING = FULL;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
-}
diff --git a/usrp/fpga/toplevel/sizetest/sizetest.quartus b/usrp/fpga/toplevel/sizetest/sizetest.quartus
deleted file mode 100644
index d1eaf227a..000000000
--- a/usrp/fpga/toplevel/sizetest/sizetest.quartus
+++ /dev/null
@@ -1,19 +0,0 @@
-COMPILER_SETTINGS_LIST
-{
- COMPILER_SETTINGS = sizetest;
-}
-SIMULATOR_SETTINGS_LIST
-{
- SIMULATOR_SETTINGS = sizetest;
-}
-SOFTWARE_SETTINGS_LIST
-{
- SOFTWARE_SETTINGS = Debug;
- SOFTWARE_SETTINGS = Release;
-}
-FILES
-{
- VERILOG_FILE = ..\..\sdr_lib\cordic_stage.v;
- VERILOG_FILE = ..\..\sdr_lib\cordic.v;
- VERILOG_FILE = sizetest.v;
-}
diff --git a/usrp/fpga/toplevel/sizetest/sizetest.ssf b/usrp/fpga/toplevel/sizetest/sizetest.ssf
deleted file mode 100644
index 1aceab1f1..000000000
--- a/usrp/fpga/toplevel/sizetest/sizetest.ssf
+++ /dev/null
@@ -1,14 +0,0 @@
-SIMULATOR_SETTINGS
-{
- ESTIMATE_POWER_CONSUMPTION = OFF;
- GLITCH_INTERVAL = 1NS;
- GLITCH_DETECTION = OFF;
- SIMULATION_COVERAGE = ON;
- CHECK_OUTPUTS = OFF;
- SETUP_HOLD_DETECTION = OFF;
- POWER_ESTIMATION_START_TIME = "0 NS";
- ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS = ON;
- SIMULATION_MODE = TIMING;
- START_TIME = 0NS;
- USE_COMPILER_SETTINGS = sizetest;
-}
diff --git a/usrp/fpga/toplevel/sizetest/sizetest.v b/usrp/fpga/toplevel/sizetest/sizetest.v
deleted file mode 100644
index 5a847b961..000000000
--- a/usrp/fpga/toplevel/sizetest/sizetest.v
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-
-module sizetest(input clock,
- input reset,
- input enable,
- input [15:0]xi,
- input [15:0] yi,
- input [15:0] zi,
- output [15:0] xo,
- output [15:0] yo,
- output [15:0] zo
-// input [15:0] constant
- );
-
-wire [16:0] zo;
-
-cordic_stage cordic_stage(clock, reset, enable, xi, yi, zi, 16'd16383, xo, yo, zo );
-
-endmodule
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/.gitignore b/usrp/fpga/toplevel/usrp_inband_usb/.gitignore
deleted file mode 100644
index 2cc25f0f2..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/*.qws
-/*.eqn
-/*.done
-/*.htm
-/*.rpt
-/*.ini
-/*.fsf
-/*.jam
-/*.jbc
-/*.pin
-/*.pof
-/*.sof
-/*.rbf
-/*.ttf
-/*.summary
-/db
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/config.vh b/usrp/fpga/toplevel/usrp_inband_usb/config.vh
deleted file mode 100644
index 007a529e3..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/config.vh
+++ /dev/null
@@ -1,53 +0,0 @@
- // -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006,2007 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ====================================================================
-// User control over what parts get included
-//
-// >>>> EDIT ONLY THIS SECTION <<<<
-// Uncomment only ONE configuration
-// ====================================================================
-
-// ====================================================================
-// FIXME drive configuration selection from the command line and/or gui
-// ====================================================================
-
-// Uncomment this for 1 rx channel (w/ halfband) & 1 transmit channel
- `include "../include/common_config_1rxhb_1tx.vh"
-
-// Uncomment this for 2 rx channels (w/ halfband) & 2 transmit channels
-// `include "../include/common_config_2rxhb_2tx.vh"
-
-// Uncomment this for 4 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_4rx_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/ halfband) & 0 transmit channels
-//`include "../include/common_config_2rxhb_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_2rx_0tx.vh"
-
-// Add other "known to fit" configurations here...
-
-// ====================================================================
-// Now include the common footer
-// ====================================================================
- `include "../include/common_config_bottom.vh"
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.csf b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.csf
deleted file mode 100644
index c10cff92c..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.csf
+++ /dev/null
@@ -1,444 +0,0 @@
-COMPILER_SETTINGS
-{
- IO_PLACEMENT_OPTIMIZATION = OFF;
- ENABLE_DRC_SETTINGS = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_RETIMING = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION = OFF;
- PHYSICAL_SYNTHESIS_COMBO_LOGIC = OFF;
- DRC_FANOUT_EXCEEDING = 30;
- DRC_REPORT_FANOUT_EXCEEDING = OFF;
- DRC_TOP_FANOUT = 50;
- DRC_REPORT_TOP_FANOUT = OFF;
- RUN_DRC_DURING_COMPILATION = OFF;
- ADV_NETLIST_OPT_RETIME_CORE_AND_IO = ON;
- ADV_NETLIST_OPT_SYNTH_USE_FITTER_INFO = OFF;
- ADV_NETLIST_OPT_SYNTH_GATE_RETIME = OFF;
- ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP = OFF;
- SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES = OFF;
- MERGE_HEX_FILE = OFF;
- TRUE_WYSIWYG_FLOW = OFF;
- SEED = 1;
- FINAL_PLACEMENT_OPTIMIZATION = AUTOMATICALLY;
- FAMILY = Cyclone;
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "LOWER TO 1ESB UPPER TO 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DEEP_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_SINGLE_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_WIDE_MODE_OUTPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4ESB";
- DPRAM_DEEP_MODE_OUTPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_INPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4";
- DPRAM_DEEP_MODE_INPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_OTHER_SIGNALS_EPXA4_10 = "DEFAULT OTHER ROUTING OPTIONS";
- DPRAM_OUTPUT_EPXA4_10 = "DEFAULT OUTPUT ROUTING OPTIONS";
- DPRAM_INPUT_EPXA4_10 = "DEFAULT INPUT ROUTING OPTIONS";
- STRIPE_TO_PLD_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PLD_TO_STRIPE_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PROCESSOR_DEBUG_EXTENSIONS_EPXA4_10 = "MEGALAB COLUMN 2";
- STRIPE_TO_PLD_BRIDGE_EPXA4_10 = "MEGALAB COLUMN 1";
- FAST_FIT_COMPILATION = OFF;
- SIGNALPROBE_DURING_NORMAL_COMPILATION = OFF;
- OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING = ON;
- OPTIMIZE_TIMING = "NORMAL COMPILATION";
- OPTIMIZE_HOLD_TIMING = OFF;
- COMPILATION_LEVEL = FULL;
- SAVE_DISK_SPACE = OFF;
- SPEED_DISK_USAGE_TRADEOFF = NORMAL;
- LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT = OFF;
- SIGNALPROBE_ALLOW_OVERUSE = OFF;
- FOCUS_ENTITY_NAME = |usrp_inband_usb;
- ROUTING_BACK_ANNOTATION_MODE = OFF;
- INC_PLC_MODE = OFF;
- FIT_ONLY_ONE_ATTEMPT = OFF;
-}
-DEFAULT_DEVICE_OPTIONS
-{
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_SVF_FILE = OFF;
- RESERVE_PIN = "AS INPUT TRI-STATED";
- RESERVE_ALL_UNUSED_PINS = "AS OUTPUT DRIVING GROUND";
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- HEXOUT_FILE_START_ADDRESS = 0;
- GENERATE_HEX_FILE = OFF;
- GENERATE_RBF_FILE = OFF;
- GENERATE_TTF_FILE = OFF;
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- USE_CONFIGURATION_DEVICE = ON;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- AUTO_RESTART_CONFIGURATION = OFF;
- ENABLE_VREFB_PIN = OFF;
- ENABLE_VREFA_PIN = OFF;
- SECURITY_BIT = OFF;
- USER_START_UP_CLOCK = OFF;
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "ACTIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_UPDATE_MODE = STANDARD;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- CONFIGURATION_CLOCK_DIVISOR = 1;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CLOCK_SOURCE = INTERNAL;
- COMPRESSION_MODE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
-}
-AUTO_SLD_HUB_ENTITY
-{
- AUTO_INSERT_SLD_HUB_ENTITY = ENABLE;
- HUB_INSTANCE_NAME = SLD_HUB_INST;
- HUB_ENTITY_NAME = SLD_HUB;
-}
-SIGNALTAP_LOGIC_ANALYZER_SETTINGS
-{
- ENABLE_SIGNALTAP = Off;
- AUTO_ENABLE_SMART_COMPILE = On;
-}
-CHIP(usrp_inband_usb)
-{
- DEVICE = EP1C12Q240C8;
- DEVICE_FILTER_PACKAGE = "ANY QFP";
- DEVICE_FILTER_PIN_COUNT = 240;
- DEVICE_FILTER_SPEED_GRADE = ANY;
- AUTO_RESTART_CONFIGURATION = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- USER_START_UP_CLOCK = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- USE_CONFIGURATION_DEVICE = OFF;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- STRATIX_UPDATE_MODE = STANDARD;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- COMPRESSION_MODE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- GENERATE_TTF_FILE = OFF;
- GENERATE_RBF_FILE = ON;
- GENERATE_HEX_FILE = OFF;
- SECURITY_BIT = OFF;
- ENABLE_VREFA_PIN = OFF;
- ENABLE_VREFB_PIN = OFF;
- GENERATE_SVF_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
- BASE_PIN_OUT_FILE_ON_SAMEFRAME_DEVICE = OFF;
- HEXOUT_FILE_START_ADDRESS = 0;
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- RESERVE_ALL_UNUSED_PINS = "AS INPUT TRI-STATED";
- STRATIX_DEVICE_IO_STANDARD = LVTTL;
- CLOCK_SOURCE = INTERNAL;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CONFIGURATION_CLOCK_DIVISOR = 1;
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- SCLK : LOCATION = Pin_101;
- SDI : LOCATION = Pin_100;
- SEN : LOCATION = Pin_98;
- SLD : LOCATION = Pin_95;
- adc1_data[0] : LOCATION = Pin_5;
- adc1_data[10] : LOCATION = Pin_235;
- adc1_data[11] : LOCATION = Pin_234;
- adc1_data[1] : LOCATION = Pin_4;
- adc1_data[2] : LOCATION = Pin_3;
- adc1_data[3] : LOCATION = Pin_2;
- adc1_data[4] : LOCATION = Pin_1;
- adc1_data[4] : IO_STANDARD = LVTTL;
- adc1_data[5] : LOCATION = Pin_240;
- adc1_data[6] : LOCATION = Pin_239;
- adc1_data[7] : LOCATION = Pin_238;
- adc1_data[8] : LOCATION = Pin_237;
- adc1_data[9] : LOCATION = Pin_236;
- adc2_data[0] : LOCATION = Pin_20;
- adc2_data[10] : LOCATION = Pin_8;
- adc2_data[11] : LOCATION = Pin_7;
- adc2_data[1] : LOCATION = Pin_19;
- adc2_data[2] : LOCATION = Pin_18;
- adc2_data[3] : LOCATION = Pin_17;
- adc2_data[4] : LOCATION = Pin_16;
- adc2_data[5] : LOCATION = Pin_15;
- adc2_data[6] : LOCATION = Pin_14;
- adc2_data[7] : LOCATION = Pin_13;
- adc2_data[8] : LOCATION = Pin_12;
- adc2_data[9] : LOCATION = Pin_11;
- adc3_data[0] : LOCATION = Pin_200;
- adc3_data[10] : LOCATION = Pin_184;
- adc3_data[11] : LOCATION = Pin_183;
- adc3_data[1] : LOCATION = Pin_197;
- adc3_data[2] : LOCATION = Pin_196;
- adc3_data[3] : LOCATION = Pin_195;
- adc3_data[4] : LOCATION = Pin_194;
- adc3_data[5] : LOCATION = Pin_193;
- adc3_data[6] : LOCATION = Pin_188;
- adc3_data[7] : LOCATION = Pin_187;
- adc3_data[8] : LOCATION = Pin_186;
- adc3_data[9] : LOCATION = Pin_185;
- adc4_data[0] : LOCATION = Pin_222;
- adc4_data[10] : LOCATION = Pin_203;
- adc4_data[11] : LOCATION = Pin_202;
- adc4_data[1] : LOCATION = Pin_219;
- adc4_data[2] : LOCATION = Pin_217;
- adc4_data[3] : LOCATION = Pin_216;
- adc4_data[4] : LOCATION = Pin_215;
- adc4_data[5] : LOCATION = Pin_214;
- adc4_data[6] : LOCATION = Pin_213;
- adc4_data[7] : LOCATION = Pin_208;
- adc4_data[8] : LOCATION = Pin_207;
- adc4_data[9] : LOCATION = Pin_206;
- adc_oeb[0] : LOCATION = Pin_228;
- adc_oeb[1] : LOCATION = Pin_21;
- adc_oeb[2] : LOCATION = Pin_181;
- adc_oeb[3] : LOCATION = Pin_218;
- adc_otr[0] : LOCATION = Pin_233;
- adc_otr[1] : LOCATION = Pin_6;
- adc_otr[2] : LOCATION = Pin_182;
- adc_otr[3] : LOCATION = Pin_201;
- adclk0 : LOCATION = Pin_224;
- adclk1 : LOCATION = Pin_226;
- clk0 : LOCATION = Pin_28;
- clk0 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk0 : IO_STANDARD = LVTTL;
- clk1 : LOCATION = Pin_29;
- clk1 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk1 : IO_STANDARD = LVTTL;
- clk3 : LOCATION = Pin_152;
- clk3 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk3 : IO_STANDARD = LVTTL;
- clk_120mhz : LOCATION = Pin_153;
- clk_120mhz : IO_STANDARD = LVTTL;
- clk_out : LOCATION = Pin_63;
- clk_out : IO_STANDARD = LVTTL;
- dac1_data[0] : LOCATION = Pin_165;
- dac1_data[10] : LOCATION = Pin_177;
- dac1_data[11] : LOCATION = Pin_178;
- dac1_data[12] : LOCATION = Pin_179;
- dac1_data[13] : LOCATION = Pin_180;
- dac1_data[1] : LOCATION = Pin_166;
- dac1_data[2] : LOCATION = Pin_167;
- dac1_data[3] : LOCATION = Pin_168;
- dac1_data[4] : LOCATION = Pin_169;
- dac1_data[5] : LOCATION = Pin_170;
- dac1_data[6] : LOCATION = Pin_173;
- dac1_data[7] : LOCATION = Pin_174;
- dac1_data[8] : LOCATION = Pin_175;
- dac1_data[9] : LOCATION = Pin_176;
- dac2_data[0] : LOCATION = Pin_159;
- dac2_data[10] : LOCATION = Pin_163;
- dac2_data[11] : LOCATION = Pin_139;
- dac2_data[12] : LOCATION = Pin_164;
- dac2_data[13] : LOCATION = Pin_138;
- dac2_data[1] : LOCATION = Pin_158;
- dac2_data[2] : LOCATION = Pin_160;
- dac2_data[3] : LOCATION = Pin_156;
- dac2_data[4] : LOCATION = Pin_161;
- dac2_data[5] : LOCATION = Pin_144;
- dac2_data[6] : LOCATION = Pin_162;
- dac2_data[7] : LOCATION = Pin_141;
- dac2_data[8] : LOCATION = Pin_143;
- dac2_data[9] : LOCATION = Pin_140;
- dac3_data[0] : LOCATION = Pin_122;
- dac3_data[10] : LOCATION = Pin_134;
- dac3_data[11] : LOCATION = Pin_135;
- dac3_data[12] : LOCATION = Pin_136;
- dac3_data[13] : LOCATION = Pin_137;
- dac3_data[1] : LOCATION = Pin_123;
- dac3_data[2] : LOCATION = Pin_124;
- dac3_data[3] : LOCATION = Pin_125;
- dac3_data[4] : LOCATION = Pin_126;
- dac3_data[5] : LOCATION = Pin_127;
- dac3_data[6] : LOCATION = Pin_128;
- dac3_data[7] : LOCATION = Pin_131;
- dac3_data[8] : LOCATION = Pin_132;
- dac3_data[9] : LOCATION = Pin_133;
- dac4_data[0] : LOCATION = Pin_104;
- dac4_data[10] : LOCATION = Pin_118;
- dac4_data[11] : LOCATION = Pin_119;
- dac4_data[12] : LOCATION = Pin_120;
- dac4_data[13] : LOCATION = Pin_121;
- dac4_data[1] : LOCATION = Pin_105;
- dac4_data[2] : LOCATION = Pin_106;
- dac4_data[3] : LOCATION = Pin_107;
- dac4_data[4] : LOCATION = Pin_108;
- dac4_data[5] : LOCATION = Pin_113;
- dac4_data[6] : LOCATION = Pin_114;
- dac4_data[7] : LOCATION = Pin_115;
- dac4_data[8] : LOCATION = Pin_116;
- dac4_data[9] : LOCATION = Pin_117;
- enable_rx : LOCATION = Pin_88;
- enable_tx : LOCATION = Pin_93;
- gndbus[0] : LOCATION = Pin_223;
- gndbus[0] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[0] : IO_STANDARD = LVTTL;
- gndbus[1] : LOCATION = Pin_225;
- gndbus[1] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[1] : IO_STANDARD = LVTTL;
- gndbus[2] : LOCATION = Pin_227;
- gndbus[2] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[2] : IO_STANDARD = LVTTL;
- gndbus[3] : LOCATION = Pin_62;
- gndbus[3] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[3] : IO_STANDARD = LVTTL;
- gndbus[4] : LOCATION = Pin_64;
- gndbus[4] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[4] : IO_STANDARD = LVTTL;
- misc_pins[0] : LOCATION = Pin_87;
- misc_pins[0] : IO_STANDARD = LVTTL;
- misc_pins[10] : LOCATION = Pin_76;
- misc_pins[10] : IO_STANDARD = LVTTL;
- misc_pins[11] : LOCATION = Pin_74;
- misc_pins[11] : IO_STANDARD = LVTTL;
- misc_pins[1] : LOCATION = Pin_86;
- misc_pins[1] : IO_STANDARD = LVTTL;
- misc_pins[2] : LOCATION = Pin_85;
- misc_pins[2] : IO_STANDARD = LVTTL;
- misc_pins[3] : LOCATION = Pin_84;
- misc_pins[3] : IO_STANDARD = LVTTL;
- misc_pins[4] : LOCATION = Pin_83;
- misc_pins[4] : IO_STANDARD = LVTTL;
- misc_pins[5] : LOCATION = Pin_82;
- misc_pins[5] : IO_STANDARD = LVTTL;
- misc_pins[6] : LOCATION = Pin_79;
- misc_pins[6] : IO_STANDARD = LVTTL;
- misc_pins[7] : LOCATION = Pin_78;
- misc_pins[7] : IO_STANDARD = LVTTL;
- misc_pins[8] : LOCATION = Pin_77;
- misc_pins[8] : IO_STANDARD = LVTTL;
- misc_pins[9] : LOCATION = Pin_75;
- misc_pins[9] : IO_STANDARD = LVTTL;
- reset : LOCATION = Pin_94;
- usbclk : LOCATION = Pin_55;
- usbctl[0] : LOCATION = Pin_56;
- usbctl[1] : LOCATION = Pin_54;
- usbctl[2] : LOCATION = Pin_53;
- usbctl[3] : LOCATION = Pin_58;
- usbctl[4] : LOCATION = Pin_57;
- usbctl[5] : LOCATION = Pin_44;
- usbdata[0] : LOCATION = Pin_73;
- usbdata[10] : LOCATION = Pin_41;
- usbdata[11] : LOCATION = Pin_39;
- usbdata[12] : LOCATION = Pin_38;
- usbdata[12] : IO_STANDARD = LVTTL;
- usbdata[13] : LOCATION = Pin_37;
- usbdata[14] : LOCATION = Pin_24;
- usbdata[15] : LOCATION = Pin_23;
- usbdata[1] : LOCATION = Pin_68;
- usbdata[2] : LOCATION = Pin_67;
- usbdata[3] : LOCATION = Pin_66;
- usbdata[4] : LOCATION = Pin_65;
- usbdata[5] : LOCATION = Pin_61;
- usbdata[6] : LOCATION = Pin_60;
- usbdata[7] : LOCATION = Pin_59;
- usbdata[8] : LOCATION = Pin_43;
- usbdata[9] : LOCATION = Pin_42;
- usbrdy[0] : LOCATION = Pin_45;
- usbrdy[1] : LOCATION = Pin_46;
- usbrdy[2] : LOCATION = Pin_47;
- usbrdy[3] : LOCATION = Pin_48;
- usbrdy[4] : LOCATION = Pin_49;
- usbrdy[5] : LOCATION = Pin_50;
- clear_status : LOCATION = Pin_99;
-}
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.esf b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.esf
deleted file mode 100644
index 6079e9795..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.esf
+++ /dev/null
@@ -1,14 +0,0 @@
-SIMULATOR_SETTINGS
-{
- ESTIMATE_POWER_CONSUMPTION = OFF;
- GLITCH_INTERVAL = 1NS;
- GLITCH_DETECTION = OFF;
- SIMULATION_COVERAGE = ON;
- CHECK_OUTPUTS = OFF;
- SETUP_HOLD_DETECTION = OFF;
- POWER_ESTIMATION_START_TIME = "0 NS";
- ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS = ON;
- SIMULATION_MODE = TIMING;
- START_TIME = 0NS;
- USE_COMPILER_SETTINGS = usrp_inband_usb;
-}
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.psf b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.psf
deleted file mode 100644
index 85276ecc4..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.psf
+++ /dev/null
@@ -1,312 +0,0 @@
-DEFAULT_DESIGN_ASSISTANT_SETTINGS
-{
- HCPY_ALOAD_SIGNALS = OFF;
- HCPY_VREF_PINS = OFF;
- HCPY_CAT = OFF;
- HCPY_ILLEGAL_HC_DEV_PKG = OFF;
- ACLK_RULE_IMSZER_ADOMAIN = OFF;
- ACLK_RULE_SZER_BTW_ACLK_DOMAIN = OFF;
- ACLK_RULE_NO_SZER_ACLK_DOMAIN = OFF;
- ACLK_CAT = OFF;
- SIGNALRACE_RULE_ASYNCHPIN_SYNCH_CLKPIN = OFF;
- SIGNALRACE_CAT = OFF;
- NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED = OFF;
- NONSYNCHSTRUCT_RULE_SRLATCH = OFF;
- NONSYNCHSTRUCT_RULE_DLATCH = OFF;
- NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR = OFF;
- NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN = OFF;
- NONSYNCHSTRUCT_RULE_RIPPLE_CLK = OFF;
- NONSYNCHSTRUCT_RULE_DELAY_CHAIN = OFF;
- NONSYNCHSTRUCT_RULE_REG_LOOP = OFF;
- NONSYNCHSTRUCT_RULE_COMBLOOP = OFF;
- NONSYNCHSTRUCT_CAT = OFF;
- NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE = OFF;
- TIMING_RULE_COIN_CLKEDGE = OFF;
- TIMING_RULE_SHIFT_REG = OFF;
- TIMING_RULE_HIGH_FANOUTS = OFF;
- TIMING_CAT = OFF;
- RESET_RULE_ALL = OFF;
- RESET_RULE_IMSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_UNSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_REG_ASNYCH = OFF;
- RESET_RULE_COMB_ASYNCH_RESET = OFF;
- RESET_RULE_IMSYNCH_EXRESET = OFF;
- RESET_RULE_UNSYNCH_EXRESET = OFF;
- RESET_RULE_INPINS_RESETNET = OFF;
- RESET_CAT = OFF;
- CLK_RULE_ALL = OFF;
- CLK_RULE_MIX_EDGES = OFF;
- CLK_RULE_CLKNET_CLKSPINES = OFF;
- CLK_RULE_INPINS_CLKNET = OFF;
- CLK_RULE_GATING_SCHEME = OFF;
- CLK_RULE_INV_CLOCK = OFF;
- CLK_RULE_COMB_CLOCK = OFF;
- CLK_CAT = OFF;
- HCPY_EXCEED_USER_IO_USAGE = OFF;
- HCPY_EXCEED_RAM_USAGE = OFF;
- NONSYNCHSTRUCT_RULE_ASYN_RAM = OFF;
- SIGNALRACE_RULE_TRISTATE = OFF;
- ASSG_RULE_MISSING_TIMING = OFF;
- ASSG_RULE_MISSING_FMAX = OFF;
- ASSG_CAT = OFF;
-}
-SYNTHESIS_FITTING_SETTINGS
-{
- AUTO_SHIFT_REGISTER_RECOGNITION = ON;
- AUTO_DSP_RECOGNITION = ON;
- AUTO_RAM_RECOGNITION = ON;
- REMOVE_DUPLICATE_LOGIC = ON;
- AUTO_TURBO_BIT = ON;
- AUTO_MERGE_PLLS = ON;
- AUTO_OPEN_DRAIN_PINS = ON;
- AUTO_PARALLEL_EXPANDERS = ON;
- AUTO_FAST_OUTPUT_ENABLE_REGISTERS = OFF;
- AUTO_FAST_OUTPUT_REGISTERS = OFF;
- AUTO_FAST_INPUT_REGISTERS = OFF;
- AUTO_CASCADE_CHAINS = ON;
- AUTO_CARRY_CHAINS = ON;
- AUTO_DELAY_CHAINS = ON;
- MAX7000_PARALLEL_EXPANDER_CHAIN_LENGTH = 4;
- PARALLEL_EXPANDER_CHAIN_LENGTH = 16;
- CASCADE_CHAIN_LENGTH = 2;
- STRATIX_CARRY_CHAIN_LENGTH = 70;
- MERCURY_CARRY_CHAIN_LENGTH = 48;
- FLEX10K_CARRY_CHAIN_LENGTH = 32;
- FLEX6K_CARRY_CHAIN_LENGTH = 32;
- CARRY_CHAIN_LENGTH = 48;
- CARRY_OUT_PINS_LCELL_INSERT = ON;
- NORMAL_LCELL_INSERT = ON;
- AUTO_LCELL_INSERTION = ON;
- ALLOW_XOR_GATE_USAGE = ON;
- AUTO_PACKED_REGISTERS_STRATIX = NORMAL;
- AUTO_PACKED_REGISTERS = OFF;
- AUTO_PACKED_REG_CYCLONE = NORMAL;
- FLEX10K_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX6K_OPTIMIZATION_TECHNIQUE = AREA;
- MERCURY_OPTIMIZATION_TECHNIQUE = AREA;
- APEX20K_OPTIMIZATION_TECHNIQUE = SPEED;
- MAX7000_OPTIMIZATION_TECHNIQUE = SPEED;
- STRATIX_OPTIMIZATION_TECHNIQUE = SPEED;
- CYCLONE_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX10K_TECHNOLOGY_MAPPER = LUT;
- FLEX6K_TECHNOLOGY_MAPPER = LUT;
- MERCURY_TECHNOLOGY_MAPPER = LUT;
- APEX20K_TECHNOLOGY_MAPPER = LUT;
- MAX7000_TECHNOLOGY_MAPPER = "PRODUCT TERM";
- STRATIX_TECHNOLOGY_MAPPER = LUT;
- AUTO_IMPLEMENT_IN_ROM = OFF;
- AUTO_GLOBAL_MEMORY_CONTROLS = OFF;
- AUTO_GLOBAL_REGISTER_CONTROLS = ON;
- AUTO_GLOBAL_OE = ON;
- AUTO_GLOBAL_CLOCK = ON;
- USE_LPM_FOR_AHDL_OPERATORS = ON;
- LIMIT_AHDL_INTEGERS_TO_32_BITS = OFF;
- ENABLE_BUS_HOLD_CIRCUITRY = OFF;
- WEAK_PULL_UP_RESISTOR = OFF;
- TURBO_BIT = ON;
- MAX7000_IGNORE_SOFT_BUFFERS = OFF;
- IGNORE_SOFT_BUFFERS = ON;
- MAX7000_IGNORE_LCELL_BUFFERS = AUTO;
- IGNORE_LCELL_BUFFERS = OFF;
- IGNORE_ROW_GLOBAL_BUFFERS = OFF;
- IGNORE_GLOBAL_BUFFERS = OFF;
- IGNORE_CASCADE_BUFFERS = OFF;
- IGNORE_CARRY_BUFFERS = OFF;
- REMOVE_DUPLICATE_REGISTERS = ON;
- REMOVE_REDUNDANT_LOGIC_CELLS = OFF;
- ALLOW_POWER_UP_DONT_CARE = ON;
- PCI_IO = OFF;
- NOT_GATE_PUSH_BACK = ON;
- SLOW_SLEW_RATE = OFF;
- DSP_BLOCK_BALANCING = AUTO;
- STATE_MACHINE_PROCESSING = AUTO;
-}
-DEFAULT_HARDCOPY_SETTINGS
-{
- HARDCOPY_EXTERNAL_CLOCK_JITTER = "0.0 NS";
-}
-DEFAULT_TIMING_REQUIREMENTS
-{
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- RUN_ALL_TIMING_ANALYSES = ON;
- IGNORE_CLOCK_SETTINGS = OFF;
- DEFAULT_HOLD_MULTICYCLE = "SAME AS MULTICYCLE";
- CUT_OFF_IO_PIN_FEEDBACK = ON;
- CUT_OFF_CLEAR_AND_PRESET_PATHS = ON;
- CUT_OFF_READ_DURING_WRITE_PATHS = ON;
- CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS = ON;
- DO_MIN_ANALYSIS = ON;
- DO_MIN_TIMING = OFF;
- NUMBER_OF_PATHS_TO_REPORT = 200;
- NUMBER_OF_DESTINATION_TO_REPORT = 10;
- NUMBER_OF_SOURCES_PER_DESTINATION_TO_REPORT = 10;
- MAX_SCC_SIZE = 50;
-}
-HDL_SETTINGS
-{
- VERILOG_INPUT_VERSION = VERILOG_2001;
- ENABLE_IP_DEBUG = OFF;
- VHDL_INPUT_VERSION = VHDL93;
- VHDL_SHOW_LMF_MAPPING_MESSAGES = OFF;
-}
-PROJECT_INFO(usrp_inband_usb)
-{
- ORIGINAL_QUARTUS_VERSION = 3.0;
- PROJECT_CREATION_TIME_DATE = "00:14:04 JULY 13, 2003";
- LAST_QUARTUS_VERSION = 3.0;
- SHOW_REGISTRATION_MESSAGE = ON;
- USER_LIBRARIES = "e:\usrp\fpga\megacells";
-}
-THIRD_PARTY_EDA_TOOLS(usrp_inband_usb)
-{
- EDA_DESIGN_ENTRY_SYNTHESIS_TOOL = "<NONE>";
- EDA_SIMULATION_TOOL = "<NONE>";
- EDA_TIMING_ANALYSIS_TOOL = "<NONE>";
- EDA_BOARD_DESIGN_TOOL = "<NONE>";
- EDA_FORMAL_VERIFICATION_TOOL = "<NONE>";
- EDA_RESYNTHESIS_TOOL = "<NONE>";
-}
-EDA_TOOL_SETTINGS(eda_design_synthesis)
-{
- EDA_INPUT_GND_NAME = GND;
- EDA_INPUT_VCC_NAME = VCC;
- EDA_SHOW_LMF_MAPPING_MESSAGES = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_INPUT_DATA_FORMAT = EDIF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_simulation)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_timing_analysis)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- EDA_LAUNCH_CMD_LINE_TOOL = OFF;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_board_design)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_formal_verification)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_palace)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- RESYNTHESIS_RETIMING = FULL;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
-}
-CLOCK(clk_120mhz)
-{
- FMAX_REQUIREMENT = "120.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(usbclk)
-{
- FMAX_REQUIREMENT = "48.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(SCLK)
-{
- FMAX_REQUIREMENT = "1.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk0)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk1)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qpf b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qpf
deleted file mode 100644
index f6220e320..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qpf
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 1991-2004 Altera Corporation
-# Any megafunction design, and related netlist (encrypted or decrypted),
-# support information, device programming or simulation file, and any other
-# associated documentation or information provided by Altera or a partner
-# under Altera's Megafunction Partnership Program may be used only
-# to program PLD devices (but not masked PLD devices) from Altera. Any
-# other use of such megafunction design, netlist, support information,
-# device programming or simulation file, or any other related documentation
-# or information is prohibited for any other purpose, including, but not
-# limited to modification, reverse engineering, de-compiling, or use with
-# any other silicon devices, unless such use is explicitly licensed under
-# a separate agreement with Altera or a megafunction partner. Title to the
-# intellectual property, including patents, copyrights, trademarks, trade
-# secrets, or maskworks, embodied in any such megafunction design, netlist,
-# support information, device programming or simulation file, or any other
-# related documentation or information provided by Altera or a megafunction
-# partner, remains with Altera, the megafunction partner, or their respective
-# licensors. No other licenses, including any licenses needed under any third
-# party's intellectual property, are provided herein.
-
-
-
-QUARTUS_VERSION = "4.0"
-DATE = "17:10:11 December 20, 2004"
-
-
-# Active Revisions
-
-PROJECT_REVISION = "usrp_inband_usb"
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qsf b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qsf
deleted file mode 100644
index ae0807f6f..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.qsf
+++ /dev/null
@@ -1,423 +0,0 @@
-# Copyright (C) 1991-2005 Altera Corporation
-# Your use of Altera Corporation's design tools, logic functions
-# and other software and tools, and its AMPP partner logic
-# functions, and any output files any of the foregoing
-# (including device programming or simulation files), and any
-# associated documentation or information are expressly subject
-# to the terms and conditions of the Altera Program License
-# Subscription Agreement, Altera MegaCore Function License
-# Agreement, or other applicable license agreement, including,
-# without limitation, that your use is for the sole purpose of
-# programming logic devices manufactured by Altera and sold by
-# Altera or its authorized distributors. Please refer to the
-# applicable agreement for further details.
-
-
-# The default values for assignments are stored in the file
-# usrp_inband_usb_assignment_defaults.qdf
-# If this file doesn't exist, and for assignments not listed, see file
-# assignment_defaults.qdf
-
-# Altera recommends that you do not modify this file. This
-# file is updated automatically by the Quartus II software
-# and any changes you make may be lost or overwritten.
-
-
-# Project-Wide Assignments
-# ========================
-set_global_assignment -name ORIGINAL_QUARTUS_VERSION 3.0
-set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:14:04 JULY 13, 2003"
-set_global_assignment -name LAST_QUARTUS_VERSION "7.2 SP2"
-
-# Pin & Location Assignments
-# ==========================
-set_global_assignment -name RESERVE_PIN "AS INPUT TRI-STATED"
-set_location_assignment PIN_29 -to SCLK
-set_location_assignment PIN_117 -to SDI
-set_location_assignment PIN_28 -to usbclk
-set_location_assignment PIN_107 -to usbctl[0]
-set_location_assignment PIN_106 -to usbctl[1]
-set_location_assignment PIN_105 -to usbctl[2]
-set_location_assignment PIN_100 -to usbdata[0]
-set_location_assignment PIN_84 -to usbdata[10]
-set_location_assignment PIN_83 -to usbdata[11]
-set_location_assignment PIN_82 -to usbdata[12]
-set_location_assignment PIN_79 -to usbdata[13]
-set_location_assignment PIN_78 -to usbdata[14]
-set_location_assignment PIN_77 -to usbdata[15]
-set_location_assignment PIN_99 -to usbdata[1]
-set_location_assignment PIN_98 -to usbdata[2]
-set_location_assignment PIN_95 -to usbdata[3]
-set_location_assignment PIN_94 -to usbdata[4]
-set_location_assignment PIN_93 -to usbdata[5]
-set_location_assignment PIN_88 -to usbdata[6]
-set_location_assignment PIN_87 -to usbdata[7]
-set_location_assignment PIN_86 -to usbdata[8]
-set_location_assignment PIN_85 -to usbdata[9]
-set_location_assignment PIN_104 -to usbrdy[0]
-set_location_assignment PIN_101 -to usbrdy[1]
-set_location_assignment PIN_76 -to FX2_1
-set_location_assignment PIN_75 -to FX2_2
-set_location_assignment PIN_74 -to FX2_3
-set_location_assignment PIN_116 -to io_rx_a[0]
-set_location_assignment PIN_115 -to io_rx_a[1]
-set_location_assignment PIN_114 -to io_rx_a[2]
-set_location_assignment PIN_113 -to io_rx_a[3]
-set_location_assignment PIN_108 -to io_rx_a[4]
-set_location_assignment PIN_195 -to io_rx_a[5]
-set_location_assignment PIN_196 -to io_rx_a[6]
-set_location_assignment PIN_197 -to io_rx_a[7]
-set_location_assignment PIN_200 -to io_rx_a[8]
-set_location_assignment PIN_201 -to io_rx_a[9]
-set_location_assignment PIN_202 -to io_rx_a[10]
-set_location_assignment PIN_203 -to io_rx_a[11]
-set_location_assignment PIN_206 -to io_rx_a[12]
-set_location_assignment PIN_207 -to io_rx_a[13]
-set_location_assignment PIN_208 -to io_rx_a[14]
-set_location_assignment PIN_214 -to io_rx_b[0]
-set_location_assignment PIN_215 -to io_rx_b[1]
-set_location_assignment PIN_216 -to io_rx_b[2]
-set_location_assignment PIN_217 -to io_rx_b[3]
-set_location_assignment PIN_218 -to io_rx_b[4]
-set_location_assignment PIN_219 -to io_rx_b[5]
-set_location_assignment PIN_222 -to io_rx_b[6]
-set_location_assignment PIN_223 -to io_rx_b[7]
-set_location_assignment PIN_224 -to io_rx_b[8]
-set_location_assignment PIN_225 -to io_rx_b[9]
-set_location_assignment PIN_226 -to io_rx_b[10]
-set_location_assignment PIN_227 -to io_rx_b[11]
-set_location_assignment PIN_228 -to io_rx_b[12]
-set_location_assignment PIN_233 -to io_rx_b[13]
-set_location_assignment PIN_234 -to io_rx_b[14]
-set_location_assignment PIN_175 -to io_tx_a[0]
-set_location_assignment PIN_176 -to io_tx_a[1]
-set_location_assignment PIN_177 -to io_tx_a[2]
-set_location_assignment PIN_178 -to io_tx_a[3]
-set_location_assignment PIN_179 -to io_tx_a[4]
-set_location_assignment PIN_180 -to io_tx_a[5]
-set_location_assignment PIN_181 -to io_tx_a[6]
-set_location_assignment PIN_182 -to io_tx_a[7]
-set_location_assignment PIN_183 -to io_tx_a[8]
-set_location_assignment PIN_184 -to io_tx_a[9]
-set_location_assignment PIN_185 -to io_tx_a[10]
-set_location_assignment PIN_186 -to io_tx_a[11]
-set_location_assignment PIN_187 -to io_tx_a[12]
-set_location_assignment PIN_188 -to io_tx_a[13]
-set_location_assignment PIN_193 -to io_tx_a[14]
-set_location_assignment PIN_73 -to io_tx_b[0]
-set_location_assignment PIN_68 -to io_tx_b[1]
-set_location_assignment PIN_67 -to io_tx_b[2]
-set_location_assignment PIN_66 -to io_tx_b[3]
-set_location_assignment PIN_65 -to io_tx_b[4]
-set_location_assignment PIN_64 -to io_tx_b[5]
-set_location_assignment PIN_63 -to io_tx_b[6]
-set_location_assignment PIN_62 -to io_tx_b[7]
-set_location_assignment PIN_61 -to io_tx_b[8]
-set_location_assignment PIN_60 -to io_tx_b[9]
-set_location_assignment PIN_59 -to io_tx_b[10]
-set_location_assignment PIN_58 -to io_tx_b[11]
-set_location_assignment PIN_57 -to io_tx_b[12]
-set_location_assignment PIN_56 -to io_tx_b[13]
-set_location_assignment PIN_55 -to io_tx_b[14]
-set_location_assignment PIN_152 -to master_clk
-set_location_assignment PIN_144 -to rx_a_a[0]
-set_location_assignment PIN_143 -to rx_a_a[1]
-set_location_assignment PIN_141 -to rx_a_a[2]
-set_location_assignment PIN_140 -to rx_a_a[3]
-set_location_assignment PIN_139 -to rx_a_a[4]
-set_location_assignment PIN_138 -to rx_a_a[5]
-set_location_assignment PIN_137 -to rx_a_a[6]
-set_location_assignment PIN_136 -to rx_a_a[7]
-set_location_assignment PIN_135 -to rx_a_a[8]
-set_location_assignment PIN_134 -to rx_a_a[9]
-set_location_assignment PIN_133 -to rx_a_a[10]
-set_location_assignment PIN_132 -to rx_a_a[11]
-set_location_assignment PIN_23 -to rx_a_b[0]
-set_location_assignment PIN_21 -to rx_a_b[1]
-set_location_assignment PIN_20 -to rx_a_b[2]
-set_location_assignment PIN_19 -to rx_a_b[3]
-set_location_assignment PIN_18 -to rx_a_b[4]
-set_location_assignment PIN_17 -to rx_a_b[5]
-set_location_assignment PIN_16 -to rx_a_b[6]
-set_location_assignment PIN_15 -to rx_a_b[7]
-set_location_assignment PIN_14 -to rx_a_b[8]
-set_location_assignment PIN_13 -to rx_a_b[9]
-set_location_assignment PIN_12 -to rx_a_b[10]
-set_location_assignment PIN_11 -to rx_a_b[11]
-set_location_assignment PIN_131 -to rx_b_a[0]
-set_location_assignment PIN_128 -to rx_b_a[1]
-set_location_assignment PIN_127 -to rx_b_a[2]
-set_location_assignment PIN_126 -to rx_b_a[3]
-set_location_assignment PIN_125 -to rx_b_a[4]
-set_location_assignment PIN_124 -to rx_b_a[5]
-set_location_assignment PIN_123 -to rx_b_a[6]
-set_location_assignment PIN_122 -to rx_b_a[7]
-set_location_assignment PIN_121 -to rx_b_a[8]
-set_location_assignment PIN_120 -to rx_b_a[9]
-set_location_assignment PIN_119 -to rx_b_a[10]
-set_location_assignment PIN_118 -to rx_b_a[11]
-set_location_assignment PIN_8 -to rx_b_b[0]
-set_location_assignment PIN_7 -to rx_b_b[1]
-set_location_assignment PIN_6 -to rx_b_b[2]
-set_location_assignment PIN_5 -to rx_b_b[3]
-set_location_assignment PIN_4 -to rx_b_b[4]
-set_location_assignment PIN_3 -to rx_b_b[5]
-set_location_assignment PIN_2 -to rx_b_b[6]
-set_location_assignment PIN_240 -to rx_b_b[7]
-set_location_assignment PIN_239 -to rx_b_b[8]
-set_location_assignment PIN_238 -to rx_b_b[9]
-set_location_assignment PIN_237 -to rx_b_b[10]
-set_location_assignment PIN_236 -to rx_b_b[11]
-set_location_assignment PIN_156 -to SDO
-set_location_assignment PIN_153 -to SEN_FPGA
-set_location_assignment PIN_159 -to tx_a[0]
-set_location_assignment PIN_160 -to tx_a[1]
-set_location_assignment PIN_161 -to tx_a[2]
-set_location_assignment PIN_162 -to tx_a[3]
-set_location_assignment PIN_163 -to tx_a[4]
-set_location_assignment PIN_164 -to tx_a[5]
-set_location_assignment PIN_165 -to tx_a[6]
-set_location_assignment PIN_166 -to tx_a[7]
-set_location_assignment PIN_167 -to tx_a[8]
-set_location_assignment PIN_168 -to tx_a[9]
-set_location_assignment PIN_169 -to tx_a[10]
-set_location_assignment PIN_170 -to tx_a[11]
-set_location_assignment PIN_173 -to tx_a[12]
-set_location_assignment PIN_174 -to tx_a[13]
-set_location_assignment PIN_38 -to tx_b[0]
-set_location_assignment PIN_39 -to tx_b[1]
-set_location_assignment PIN_41 -to tx_b[2]
-set_location_assignment PIN_42 -to tx_b[3]
-set_location_assignment PIN_43 -to tx_b[4]
-set_location_assignment PIN_44 -to tx_b[5]
-set_location_assignment PIN_45 -to tx_b[6]
-set_location_assignment PIN_46 -to tx_b[7]
-set_location_assignment PIN_47 -to tx_b[8]
-set_location_assignment PIN_48 -to tx_b[9]
-set_location_assignment PIN_49 -to tx_b[10]
-set_location_assignment PIN_50 -to tx_b[11]
-set_location_assignment PIN_53 -to tx_b[12]
-set_location_assignment PIN_54 -to tx_b[13]
-set_location_assignment PIN_158 -to TXSYNC_A
-set_location_assignment PIN_37 -to TXSYNC_B
-set_location_assignment PIN_235 -to io_rx_b[15]
-set_location_assignment PIN_24 -to io_tx_b[15]
-set_location_assignment PIN_213 -to io_rx_a[15]
-set_location_assignment PIN_194 -to io_tx_a[15]
-set_location_assignment PIN_1 -to MYSTERY_SIGNAL
-
-# Timing Assignments
-# ==================
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF
-
-# Analysis & Synthesis Assignments
-# ================================
-set_global_assignment -name SAVE_DISK_SPACE OFF
-set_global_assignment -name DEVICE_FILTER_PACKAGE "ANY QFP"
-set_global_assignment -name DEVICE_FILTER_PIN_COUNT 240
-set_global_assignment -name EDA_DESIGN_ENTRY_SYNTHESIS_TOOL "<None>"
-set_global_assignment -name FAMILY Cyclone
-set_global_assignment -name CYCLONE_OPTIMIZATION_TECHNIQUE BALANCED
-set_global_assignment -name STRATIX_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name APEX20K_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name TOP_LEVEL_ENTITY usrp_inband_usb
-set_global_assignment -name VHDL_SHOW_LMF_MAPPING_MESSAGES OFF
-set_global_assignment -name USER_LIBRARIES "e:\\usrp\\fpga\\megacells"
-set_global_assignment -name AUTO_ENABLE_SMART_COMPILE ON
-
-# Fitter Assignments
-# ==================
-set_global_assignment -name DEVICE EP1C12Q240C8
-set_global_assignment -name CYCLONE_CONFIGURATION_SCHEME "PASSIVE SERIAL"
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED"
-set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF
-set_global_assignment -name OPTIMIZE_TIMING "NORMAL COMPILATION"
-set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING OFF
-set_global_assignment -name IO_PLACEMENT_OPTIMIZATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT NORMAL
-set_global_assignment -name INC_PLC_MODE OFF
-set_global_assignment -name ROUTING_BACK_ANNOTATION_MODE OFF
-set_instance_assignment -name IO_STANDARD LVTTL -to usbdata[12]
-set_global_assignment -name STRATIX_DEVICE_IO_STANDARD LVTTL
-set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
-
-# Timing Analysis Assignments
-# ===========================
-set_global_assignment -name MAX_SCC_SIZE 50
-
-# EDA Netlist Writer Assignments
-# ==============================
-set_global_assignment -name EDA_SIMULATION_TOOL "<None>"
-set_global_assignment -name EDA_TIMING_ANALYSIS_TOOL "<NONE>"
-set_global_assignment -name EDA_BOARD_DESIGN_TOOL "<NONE>"
-set_global_assignment -name EDA_FORMAL_VERIFICATION_TOOL "<NONE>"
-set_global_assignment -name EDA_RESYNTHESIS_TOOL "<NONE>"
-
-# Assembler Assignments
-# =====================
-set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
-set_global_assignment -name GENERATE_RBF_FILE ON
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
-set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
-
-# Simulator Assignments
-# =====================
-set_global_assignment -name START_TIME "0 ns"
-set_global_assignment -name GLITCH_INTERVAL "1 ns"
-
-# Design Assistant Assignments
-# ============================
-set_global_assignment -name DRC_REPORT_TOP_FANOUT OFF
-set_global_assignment -name DRC_REPORT_FANOUT_EXCEEDING OFF
-set_global_assignment -name ASSG_CAT OFF
-set_global_assignment -name ASSG_RULE_MISSING_FMAX OFF
-set_global_assignment -name ASSG_RULE_MISSING_TIMING OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ASYN_RAM OFF
-set_global_assignment -name CLK_CAT OFF
-set_global_assignment -name CLK_RULE_COMB_CLOCK OFF
-set_global_assignment -name CLK_RULE_INV_CLOCK OFF
-set_global_assignment -name CLK_RULE_GATING_SCHEME OFF
-set_global_assignment -name CLK_RULE_INPINS_CLKNET OFF
-set_global_assignment -name CLK_RULE_CLKNET_CLKSPINES OFF
-set_global_assignment -name CLK_RULE_MIX_EDGES OFF
-set_global_assignment -name RESET_CAT OFF
-set_global_assignment -name RESET_RULE_INPINS_RESETNET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_COMB_ASYNCH_RESET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name TIMING_CAT OFF
-set_global_assignment -name TIMING_RULE_SHIFT_REG OFF
-set_global_assignment -name TIMING_RULE_COIN_CLKEDGE OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE OFF
-set_global_assignment -name NONSYNCHSTRUCT_CAT OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMBLOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_REG_LOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_DELAY_CHAIN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_RIPPLE_CLK OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_SRLATCH OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED OFF
-set_global_assignment -name SIGNALRACE_CAT OFF
-set_global_assignment -name ACLK_CAT OFF
-set_global_assignment -name ACLK_RULE_NO_SZER_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_SZER_BTW_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_IMSZER_ADOMAIN OFF
-set_global_assignment -name HCPY_CAT OFF
-set_global_assignment -name HCPY_VREF_PINS OFF
-
-# SignalTap II Assignments
-# ========================
-set_global_assignment -name HUB_ENTITY_NAME SLD_HUB
-set_global_assignment -name HUB_INSTANCE_NAME SLD_HUB_INST
-set_global_assignment -name ENABLE_SIGNALTAP OFF
-
-# LogicLock Region Assignments
-# ============================
-set_global_assignment -name LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT OFF
-
-# -----------------
-# start CLOCK(SCLK)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id SCLK
-set_global_assignment -name FMAX_REQUIREMENT "1 MHz" -section_id SCLK
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id SCLK
-
-# end CLOCK(SCLK)
-# ---------------
-
-# -----------------------
-# start CLOCK(master_clk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id master_clk
-set_global_assignment -name FMAX_REQUIREMENT "64 MHz" -section_id master_clk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id master_clk
-
-# end CLOCK(master_clk)
-# ---------------------
-
-# -------------------
-# start CLOCK(usbclk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id usbclk
-set_global_assignment -name FMAX_REQUIREMENT "48 MHz" -section_id usbclk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id usbclk
-
-# end CLOCK(usbclk)
-# -----------------
-
-# ----------------------
-# start ENTITY(usrp_inband_usb)
-
- # Timing Assignments
- # ==================
-set_instance_assignment -name CLOCK_SETTINGS SCLK -to SCLK
-set_instance_assignment -name CLOCK_SETTINGS usbclk -to usbclk
-set_instance_assignment -name CLOCK_SETTINGS master_clk -to master_clk
-
-# end ENTITY(usrp_inband_usb)
-# --------------------
-
-
-set_instance_assignment -name PARTITION_HIERARCHY no_file_for_top_partition -to | -section_id Top
-set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
-set_global_assignment -name FITTER_AUTO_EFFORT_DESIRED_SLACK_MARGIN "100 ps"
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4kx16_dc.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_1kx16.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/channel_demux.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/tx_packer.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/cmd_reader.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/packet_builder.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/rx_buffer_inband.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/atr_delay.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/tx_buffer_inband.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/chan_fifo_reader.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_dec_shifter.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rssi.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/ram16.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4k.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mult.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/ram16_2sum.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_rom.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/halfband_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mac.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_dcoffset.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/adc_interface.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/io_pins.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/setting_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/bidir_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_int_shifter.v
-set_global_assignment -name VERILOG_FILE ../../megacells/clk_doubler.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/gen_sync.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/master_control.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_2k.v
-set_global_assignment -name VERILOG_FILE ../../megacells/bustri.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/phase_acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_interp.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic_stage.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic.v
-set_global_assignment -name VERILOG_FILE usrp_inband_usb.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/clk_divider.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/serial_io.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/strobe_gen.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/sign_extend.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/channel_ram.v
-set_global_assignment -name VERILOG_FILE ../../inband_lib/register_io.v
-set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
-set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region" \ No newline at end of file
diff --git a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.v b/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.v
deleted file mode 100644
index 79f0dfa4a..000000000
--- a/usrp/fpga/toplevel/usrp_inband_usb/usrp_inband_usb.v
+++ /dev/null
@@ -1,428 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003,2004 Matt Ettus
-// Copyright 2007 Free Software Foundation, Inc.
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-`define TX_IN_BAND
-`define RX_IN_BAND
-
-`include "config.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-
-module usrp_inband_usb
-(output MYSTERY_SIGNAL,
- input master_clk,
- input SCLK,
- input SDI,
- inout SDO,
- input SEN_FPGA,
-
- input FX2_1,
- output FX2_2,
- output FX2_3,
-
- input wire [11:0] rx_a_a,
- input wire [11:0] rx_b_a,
- input wire [11:0] rx_a_b,
- input wire [11:0] rx_b_b,
-
- output wire [13:0] tx_a,
- output wire [13:0] tx_b,
-
- output wire TXSYNC_A,
- output wire TXSYNC_B,
-
- // USB interface
- input usbclk,
- input wire [2:0] usbctl,
- output wire [1:0] usbrdy,
- inout [15:0] usbdata, // NB Careful, inout
-
- // These are the general purpose i/o's that go to the daughterboard slots
- inout wire [15:0] io_tx_a,
- inout wire [15:0] io_tx_b,
- inout wire [15:0] io_rx_a,
- inout wire [15:0] io_rx_b
- );
- wire [15:0] debugdata,debugctrl;
- assign MYSTERY_SIGNAL = 1'b0;
-
- wire clk64,clk128;
-
- wire WR = usbctl[0];
- wire RD = usbctl[1];
- wire OE = usbctl[2];
-
- wire have_space, have_pkt_rdy;
- assign usbrdy[0] = have_space;
- assign usbrdy[1] = have_pkt_rdy;
-
- wire rx_overrun;
- wire clear_status = FX2_1;
- assign FX2_2 = rx_overrun;
- assign FX2_3 = (tx_underrun == 0);
-
- wire [15:0] usbdata_out;
-
- wire [3:0] dac0mux,dac1mux,dac2mux,dac3mux;
-
- wire tx_realsignals;
- wire [3:0] rx_numchan;
- wire [2:0] tx_numchan;
-
- wire [7:0] interp_rate, decim_rate;
- wire [15:0] tx_debugbus, rx_debugbus;
-
- wire enable_tx, enable_rx;
- wire tx_dsp_reset, rx_dsp_reset, tx_bus_reset, rx_bus_reset;
- wire [7:0] settings;
-
- // Tri-state bus macro
- bustri bustri( .data(usbdata_out),.enabledt(OE),.tridata(usbdata) );
-
- wire [15:0] ch0tx,ch1tx,ch2tx,ch3tx; //,ch4tx,ch5tx,ch6tx,ch7tx;
- wire [15:0] ch0rx,ch1rx,ch2rx,ch3rx,ch4rx,ch5rx,ch6rx,ch7rx;
-
- // TX
- wire [15:0] i_out_0,i_out_1,q_out_0,q_out_1;
- wire [15:0] bb_tx_i0,bb_tx_q0,bb_tx_i1,bb_tx_q1; // bb_tx_i2,bb_tx_q2,bb_tx_i3,bb_tx_q3;
-
- wire strobe_interp, tx_sample_strobe;
- wire tx_empty;
-
- wire serial_strobe;
- wire [6:0] serial_addr;
- wire [31:0] serial_data;
-
- reg [15:0] debug_counter;
- reg [15:0] loopback_i_0,loopback_q_0;
-
-
- //Connection RX inband <-> TX inband
- wire rx_WR;
- wire [15:0] rx_databus;
- wire rx_WR_done;
- wire rx_WR_enabled;
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Transmit Side
-`ifdef TX_ON
- assign bb_tx_i0 = ch0tx;
- assign bb_tx_q0 = ch1tx;
- assign bb_tx_i1 = ch2tx;
- assign bb_tx_q1 = ch3tx;
-
-wire [1:0] tx_underrun;
-
-`ifdef TX_IN_BAND
- tx_buffer_inband tx_buffer
- ( .usbclk(usbclk),.bus_reset(tx_bus_reset),.reset(tx_dsp_reset),
- .usbdata(usbdata),.WR(WR),.have_space(have_space),
- .tx_underrun(tx_underrun),.channels({tx_numchan,1'b0}),
- .tx_i_0(ch0tx),.tx_q_0(ch1tx),
- .tx_i_1(ch2tx),.tx_q_1(ch3tx),
- .tx_i_2(),.tx_q_2(),
- .tx_i_3(),.tx_q_3(),
- .txclk(clk64),.txstrobe(strobe_interp),
- .clear_status(clear_status),
- .tx_empty(tx_empty),
- .rx_WR(rx_WR),
- .rx_databus(rx_databus),
- .rx_WR_done(rx_WR_done),
- .rx_WR_enabled(rx_WR_enabled),
- .reg_addr(reg_addr),
- .reg_data_out(reg_data_out),
- .reg_data_in(reg_data_in),
- .reg_io_enable(reg_io_enable),
- .debugbus(rx_debugbus),
- .rssi_0(rssi_0), .rssi_1(rssi_1), .rssi_2(rssi_2),
- .rssi_3(rssi_3), .threshhold(rssi_threshhold), .rssi_wait(rssi_wait),
- .stop(stop), .stop_time(stop_time));
-
- `ifdef TX_DUAL
- defparam tx_buffer.NUM_CHAN=2;
- `endif
-
-`else
- tx_buffer tx_buffer
- ( .usbclk(usbclk),.bus_reset(tx_bus_reset),.reset(tx_dsp_reset),
- .usbdata(usbdata),.WR(WR),.have_space(have_space),.tx_underrun(tx_underrun),
- .channels({tx_numchan,1'b0}),
- .tx_i_0(ch0tx),.tx_q_0(ch1tx),
- .tx_i_1(ch2tx),.tx_q_1(ch3tx),
- .tx_i_2(),.tx_q_2(),
- .tx_i_3(),.tx_q_3(),
- .txclk(clk64),.txstrobe(strobe_interp),
- .clear_status(clear_status),
- .tx_empty(tx_empty));
-`endif
-
- `ifdef TX_EN_0
- tx_chain tx_chain_0
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i0),.q_in(bb_tx_q0),.i_out(i_out_0),.q_out(q_out_0) );
- `else
- assign i_out_0=16'd0;
- assign q_out_0=16'd0;
- `endif
-
- `ifdef TX_EN_1
- tx_chain tx_chain_1
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i1),.q_in(bb_tx_q1),.i_out(i_out_1),.q_out(q_out_1) );
- `else
- assign i_out_1=16'd0;
- assign q_out_1=16'd0;
- `endif
-
- setting_reg #(`FR_TX_MUX)
- sr_txmux(.clock(clk64),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({dac3mux,dac2mux,dac1mux,dac0mux,tx_realsignals,tx_numchan}));
-
- wire [15:0] tx_a_a = dac0mux[3] ? (dac0mux[1] ? (dac0mux[0] ? q_out_1 : i_out_1) : (dac0mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_a = dac1mux[3] ? (dac1mux[1] ? (dac1mux[0] ? q_out_1 : i_out_1) : (dac1mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_a_b = dac2mux[3] ? (dac2mux[1] ? (dac2mux[0] ? q_out_1 : i_out_1) : (dac2mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_b = dac3mux[3] ? (dac3mux[1] ? (dac3mux[0] ? q_out_1 : i_out_1) : (dac3mux[0] ? q_out_0 : i_out_0)) : 16'b0;
-
- wire txsync = tx_sample_strobe;
- assign TXSYNC_A = txsync;
- assign TXSYNC_B = txsync;
-
- assign tx_a = txsync ? tx_b_a[15:2] : tx_a_a[15:2];
- assign tx_b = txsync ? tx_b_b[15:2] : tx_a_b[15:2];
-`endif // `ifdef TX_ON
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Receive Side
-`ifdef RX_ON
- wire rx_sample_strobe,strobe_decim,hb_strobe;
- wire [15:0] bb_rx_i0,bb_rx_q0,bb_rx_i1,bb_rx_q1,
- bb_rx_i2,bb_rx_q2,bb_rx_i3,bb_rx_q3;
-
- wire loopback = settings[0];
- wire counter = settings[1];
-
- always @(posedge clk64)
- if(rx_dsp_reset)
- debug_counter <= #1 16'd0;
- else if(~enable_rx)
- debug_counter <= #1 16'd0;
- else if(hb_strobe)
- debug_counter <=#1 debug_counter + 16'd2;
-
- always @(posedge clk64)
- if(strobe_interp)
- begin
- loopback_i_0 <= #1 ch0tx;
- loopback_q_0 <= #1 ch1tx;
- end
-
- assign ch0rx = counter ? debug_counter : loopback ? loopback_i_0 : bb_rx_i0;
- assign ch1rx = counter ? debug_counter + 16'd1 : loopback ? loopback_q_0 : bb_rx_q0;
- assign ch2rx = bb_rx_i1;
- assign ch3rx = bb_rx_q1;
- assign ch4rx = bb_rx_i2;
- assign ch5rx = bb_rx_q2;
- assign ch6rx = bb_rx_i3;
- assign ch7rx = bb_rx_q3;
-
- wire [15:0] ddc0_in_i,ddc0_in_q,ddc1_in_i,ddc1_in_q,ddc2_in_i,ddc2_in_q,ddc3_in_i,ddc3_in_q;
- wire [31:0] rssi_0,rssi_1,rssi_2,rssi_3;
- adc_interface adc_interface(.clock(clk64),.reset(rx_dsp_reset),.enable(1'b1),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .rx_a_a(rx_a_a),.rx_b_a(rx_b_a),.rx_a_b(rx_a_b),.rx_b_b(rx_b_b),
- .rssi_0(rssi_0),.rssi_1(rssi_1),.rssi_2(rssi_2),.rssi_3(rssi_3),
- .ddc0_in_i(ddc0_in_i),.ddc0_in_q(ddc0_in_q),
- .ddc1_in_i(ddc1_in_i),.ddc1_in_q(ddc1_in_q),
- .ddc2_in_i(ddc2_in_i),.ddc2_in_q(ddc2_in_q),
- .ddc3_in_i(ddc3_in_i),.ddc3_in_q(ddc3_in_q),.rx_numchan(rx_numchan));
- `ifdef RX_IN_BAND
- rx_buffer_inband rx_buffer
- ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset),
- .reset_regs(rx_dsp_reset),
- .usbdata(usbdata_out),.RD(RD),.have_pkt_rdy(have_pkt_rdy),.rx_overrun(rx_overrun),
- .channels(rx_numchan),
- .ch_0(ch0rx),.ch_1(ch1rx),
- .ch_2(ch2rx),.ch_3(ch3rx),
- .ch_4(ch4rx),.ch_5(ch5rx),
- .ch_6(ch6rx),.ch_7(ch7rx),
- .rxclk(clk64),.rxstrobe(hb_strobe),
- .clear_status(clear_status),
- .rx_WR(rx_WR),
- .rx_databus(rx_databus),
- .rx_WR_done(rx_WR_done),
- .rx_WR_enabled(rx_WR_enabled),
- .debugbus(tx_debugbus),
- .rssi_0(rssi_0), .rssi_1(rssi_1), .rssi_2(rssi_2), .rssi_3(rssi_3),
- .tx_underrun(tx_underrun));
-
- `ifdef RX_DUAL
- defparam rx_buffer.NUM_CHAN=2;
- `endif
-
- `else
- rx_buffer rx_buffer
- ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset),
- .reset_regs(rx_dsp_reset),
- .usbdata(usbdata_out),.RD(RD),.have_pkt_rdy(have_pkt_rdy),.rx_overrun(rx_overrun),
- .channels(rx_numchan),
- .ch_0(ch0rx),.ch_1(ch1rx),
- .ch_2(ch2rx),.ch_3(ch3rx),
- .ch_4(ch4rx),.ch_5(ch5rx),
- .ch_6(ch6rx),.ch_7(ch7rx),
- .rxclk(clk64),.rxstrobe(hb_strobe),
- .clear_status(clear_status),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
- `endif
-
- `ifdef RX_EN_0
- rx_chain #(`FR_RX_FREQ_0,`FR_RX_PHASE_0) rx_chain_0
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(hb_strobe),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc0_in_i),.q_in(ddc0_in_q),.i_out(bb_rx_i0),.q_out(bb_rx_q0),.debugdata(debugdata),.debugctrl(debugctrl));
- `else
- assign bb_rx_i0=16'd0;
- assign bb_rx_q0=16'd0;
- `endif
-
- `ifdef RX_EN_1
- rx_chain #(`FR_RX_FREQ_1,`FR_RX_PHASE_1) rx_chain_1
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc1_in_i),.q_in(ddc1_in_q),.i_out(bb_rx_i1),.q_out(bb_rx_q1));
- `else
- assign bb_rx_i1=16'd0;
- assign bb_rx_q1=16'd0;
- `endif
-
- `ifdef RX_EN_2
- rx_chain #(`FR_RX_FREQ_2,`FR_RX_PHASE_2) rx_chain_2
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc2_in_i),.q_in(ddc2_in_q),.i_out(bb_rx_i2),.q_out(bb_rx_q2));
- `else
- assign bb_rx_i2=16'd0;
- assign bb_rx_q2=16'd0;
- `endif
-
- `ifdef RX_EN_3
- rx_chain #(`FR_RX_FREQ_3,`FR_RX_PHASE_3) rx_chain_3
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc3_in_i),.q_in(ddc3_in_q),.i_out(bb_rx_i3),.q_out(bb_rx_q3));
- `else
- assign bb_rx_i3=16'd0;
- assign bb_rx_q3=16'd0;
- `endif
-
-`endif // `ifdef RX_ON
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Control Functions
-
- wire [31:0] capabilities;
- assign capabilities[7] = `TX_CAP_HB;
- assign capabilities[6:4] = `TX_CAP_NCHAN;
- assign capabilities[3] = `RX_CAP_HB;
- assign capabilities[2:0] = `RX_CAP_NCHAN;
-
- serial_io serial_io
- ( .master_clk(clk64),.serial_clock(SCLK),.serial_data_in(SDI),
- .enable(SEN_FPGA),.reset(1'b0),.serial_data_out(SDO),
- .serial_addr(addr_db),.serial_data(data_db),.serial_strobe(strobe_db),
- .readback_0({io_rx_a,io_tx_a}),.readback_1({io_rx_b,io_tx_b}),.readback_2(capabilities),.readback_3(32'hf0f0931a),
- .readback_4(rssi_0),.readback_5(rssi_1),.readback_6(rssi_2),.readback_7(rssi_3)
- );
-
- wire [6:0] reg_addr;
- wire [31:0] reg_data_out;
- wire [31:0] reg_data_in;
- wire [1:0] reg_io_enable;
- wire [31:0] rssi_threshhold;
- wire [31:0] rssi_wait;
- wire [6:0] addr_wr;
- wire [31:0] data_wr;
- wire strobe_wr;
- wire [6:0] addr_db;
- wire [31:0] data_db;
- wire strobe_db;
- assign serial_strobe = strobe_db | strobe_wr;
- assign serial_addr = (strobe_db)? (addr_db) : (addr_wr);
- assign serial_data = (strobe_db)? (data_db) : (data_wr);
- //assign serial_strobe = strobe_wr;
- //assign serial_data = data_wr;
- //assign serial_addr = addr_wr;
-
- register_io register_control
- (.clk(clk64),.reset(1'b0),.enable(reg_io_enable),.addr(reg_addr),.datain(reg_data_in),
- .dataout(reg_data_out), .addr_wr(addr_wr), .data_wr(data_wr), .strobe_wr(strobe_wr),
- .rssi_0(rssi_0), .rssi_1(rssi_1), .rssi_2(rssi_2),
- .rssi_3(rssi_3), .threshhold(rssi_threshhold), .rssi_wait(rssi_wait),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3),
- .debug_en(debug_en), .misc(settings),
- .txmux({dac3mux,dac2mux,dac1mux,dac0mux,tx_realsignals,tx_numchan}));
-
-
- //implementing freeze mode
- reg [15:0] timestop;
- wire stop;
- wire [15:0] stop_time;
- assign clk64 = (timestop == 0) ? master_clk : 0;
- always @(posedge master_clk)
- if (timestop[15:0] != 0)
- timestop <= timestop - 16'd1;
- else if (stop)
- timestop <= stop_time;
-
-
- wire [15:0] reg_0,reg_1,reg_2,reg_3;
- master_control master_control
- ( .master_clk(clk64),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- //.debug_0(rx_a_a),.debug_1(ddc0_in_i),
- .debug_0(rx_debugbus),.debug_1(ddc0_in_i),
- .debug_2({rx_sample_strobe,strobe_decim,serial_strobe,serial_addr}),.debug_3({rx_dsp_reset,tx_dsp_reset,rx_bus_reset,tx_bus_reset,enable_rx,tx_underrun,rx_overrun,decim_rate}),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3) );
-
- io_pins io_pins
- (.io_0(io_tx_a),.io_1(io_rx_a),.io_2(io_tx_b),.io_3(io_rx_b),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3),
- .clock(clk64),.rx_reset(rx_dsp_reset),.tx_reset(tx_dsp_reset),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Misc Settings
- setting_reg #(`FR_MODE) sr_misc(.clock(clk64),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(settings));
-
-endmodule // usrp_inband_usb
diff --git a/usrp/fpga/toplevel/usrp_multi/.gitignore b/usrp/fpga/toplevel/usrp_multi/.gitignore
deleted file mode 100644
index 2cc25f0f2..000000000
--- a/usrp/fpga/toplevel/usrp_multi/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/*.qws
-/*.eqn
-/*.done
-/*.htm
-/*.rpt
-/*.ini
-/*.fsf
-/*.jam
-/*.jbc
-/*.pin
-/*.pof
-/*.sof
-/*.rbf
-/*.ttf
-/*.summary
-/db
diff --git a/usrp/fpga/toplevel/usrp_multi/config.vh b/usrp/fpga/toplevel/usrp_multi/config.vh
deleted file mode 100644
index 07011bd48..000000000
--- a/usrp/fpga/toplevel/usrp_multi/config.vh
+++ /dev/null
@@ -1,62 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006,2007 Matt Ettus
-// Copyright (C) 2006 Martin Dudok van Heel
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ====================================================================
-// User control over what parts get included
-//
-// >>>> EDIT ONLY THIS SECTION <<<<
-// Uncomment only ONE configuration
-// ====================================================================
-
-// ====================================================================
-// FIXME drive configuration selection from the command line and/or gui
-// ====================================================================
-
-`define MULTI_ON // enable multi usrp configuration
-
-// Uncomment this for 1 rx channel (w/ halfband) & 1 transmit channel
-//`include "../include/common_config_1rxhb_1tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/ halfband) & 2 transmit channels
-`include "../include/common_config_2rxhb_2tx.vh"
-
-// Uncomment this for multi with 4 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_4rx_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/ halfband) & 0 transmit channels
-//`include "../include/common_config_2rxhb_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_2rx_0tx.vh"
-
-
-// Add other "known to fit" configurations here...
-
-// ====================================================================
-// Now include the common footer
-// ====================================================================
-
-`ifdef MULTI_ON
- `define COUNTER_32BIT_ON
-`endif
-
-`include "../include/common_config_bottom.vh"
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.csf b/usrp/fpga/toplevel/usrp_multi/usrp_multi.csf
deleted file mode 100644
index 2f5df2bca..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.csf
+++ /dev/null
@@ -1,444 +0,0 @@
-COMPILER_SETTINGS
-{
- IO_PLACEMENT_OPTIMIZATION = OFF;
- ENABLE_DRC_SETTINGS = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_RETIMING = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION = OFF;
- PHYSICAL_SYNTHESIS_COMBO_LOGIC = OFF;
- DRC_FANOUT_EXCEEDING = 30;
- DRC_REPORT_FANOUT_EXCEEDING = OFF;
- DRC_TOP_FANOUT = 50;
- DRC_REPORT_TOP_FANOUT = OFF;
- RUN_DRC_DURING_COMPILATION = OFF;
- ADV_NETLIST_OPT_RETIME_CORE_AND_IO = ON;
- ADV_NETLIST_OPT_SYNTH_USE_FITTER_INFO = OFF;
- ADV_NETLIST_OPT_SYNTH_GATE_RETIME = OFF;
- ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP = OFF;
- SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES = OFF;
- MERGE_HEX_FILE = OFF;
- TRUE_WYSIWYG_FLOW = OFF;
- SEED = 1;
- FINAL_PLACEMENT_OPTIMIZATION = AUTOMATICALLY;
- FAMILY = Cyclone;
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "LOWER TO 1ESB UPPER TO 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DEEP_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_SINGLE_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_WIDE_MODE_OUTPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4ESB";
- DPRAM_DEEP_MODE_OUTPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_INPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4";
- DPRAM_DEEP_MODE_INPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_OTHER_SIGNALS_EPXA4_10 = "DEFAULT OTHER ROUTING OPTIONS";
- DPRAM_OUTPUT_EPXA4_10 = "DEFAULT OUTPUT ROUTING OPTIONS";
- DPRAM_INPUT_EPXA4_10 = "DEFAULT INPUT ROUTING OPTIONS";
- STRIPE_TO_PLD_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PLD_TO_STRIPE_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PROCESSOR_DEBUG_EXTENSIONS_EPXA4_10 = "MEGALAB COLUMN 2";
- STRIPE_TO_PLD_BRIDGE_EPXA4_10 = "MEGALAB COLUMN 1";
- FAST_FIT_COMPILATION = OFF;
- SIGNALPROBE_DURING_NORMAL_COMPILATION = OFF;
- OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING = ON;
- OPTIMIZE_TIMING = "NORMAL COMPILATION";
- OPTIMIZE_HOLD_TIMING = OFF;
- COMPILATION_LEVEL = FULL;
- SAVE_DISK_SPACE = OFF;
- SPEED_DISK_USAGE_TRADEOFF = NORMAL;
- LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT = OFF;
- SIGNALPROBE_ALLOW_OVERUSE = OFF;
- FOCUS_ENTITY_NAME = |usrp_multi;
- ROUTING_BACK_ANNOTATION_MODE = OFF;
- INC_PLC_MODE = OFF;
- FIT_ONLY_ONE_ATTEMPT = OFF;
-}
-DEFAULT_DEVICE_OPTIONS
-{
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_SVF_FILE = OFF;
- RESERVE_PIN = "AS INPUT TRI-STATED";
- RESERVE_ALL_UNUSED_PINS = "AS OUTPUT DRIVING GROUND";
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- HEXOUT_FILE_START_ADDRESS = 0;
- GENERATE_HEX_FILE = OFF;
- GENERATE_RBF_FILE = OFF;
- GENERATE_TTF_FILE = OFF;
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- USE_CONFIGURATION_DEVICE = ON;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- AUTO_RESTART_CONFIGURATION = OFF;
- ENABLE_VREFB_PIN = OFF;
- ENABLE_VREFA_PIN = OFF;
- SECURITY_BIT = OFF;
- USER_START_UP_CLOCK = OFF;
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "ACTIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_UPDATE_MODE = STANDARD;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- CONFIGURATION_CLOCK_DIVISOR = 1;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CLOCK_SOURCE = INTERNAL;
- COMPRESSION_MODE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
-}
-AUTO_SLD_HUB_ENTITY
-{
- AUTO_INSERT_SLD_HUB_ENTITY = ENABLE;
- HUB_INSTANCE_NAME = SLD_HUB_INST;
- HUB_ENTITY_NAME = SLD_HUB;
-}
-SIGNALTAP_LOGIC_ANALYZER_SETTINGS
-{
- ENABLE_SIGNALTAP = Off;
- AUTO_ENABLE_SMART_COMPILE = On;
-}
-CHIP(usrp_multi)
-{
- DEVICE = EP1C12Q240C8;
- DEVICE_FILTER_PACKAGE = "ANY QFP";
- DEVICE_FILTER_PIN_COUNT = 240;
- DEVICE_FILTER_SPEED_GRADE = ANY;
- AUTO_RESTART_CONFIGURATION = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- USER_START_UP_CLOCK = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- USE_CONFIGURATION_DEVICE = OFF;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- STRATIX_UPDATE_MODE = STANDARD;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- COMPRESSION_MODE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- GENERATE_TTF_FILE = OFF;
- GENERATE_RBF_FILE = ON;
- GENERATE_HEX_FILE = OFF;
- SECURITY_BIT = OFF;
- ENABLE_VREFA_PIN = OFF;
- ENABLE_VREFB_PIN = OFF;
- GENERATE_SVF_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
- BASE_PIN_OUT_FILE_ON_SAMEFRAME_DEVICE = OFF;
- HEXOUT_FILE_START_ADDRESS = 0;
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- RESERVE_ALL_UNUSED_PINS = "AS INPUT TRI-STATED";
- STRATIX_DEVICE_IO_STANDARD = LVTTL;
- CLOCK_SOURCE = INTERNAL;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CONFIGURATION_CLOCK_DIVISOR = 1;
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- SCLK : LOCATION = Pin_101;
- SDI : LOCATION = Pin_100;
- SEN : LOCATION = Pin_98;
- SLD : LOCATION = Pin_95;
- adc1_data[0] : LOCATION = Pin_5;
- adc1_data[10] : LOCATION = Pin_235;
- adc1_data[11] : LOCATION = Pin_234;
- adc1_data[1] : LOCATION = Pin_4;
- adc1_data[2] : LOCATION = Pin_3;
- adc1_data[3] : LOCATION = Pin_2;
- adc1_data[4] : LOCATION = Pin_1;
- adc1_data[4] : IO_STANDARD = LVTTL;
- adc1_data[5] : LOCATION = Pin_240;
- adc1_data[6] : LOCATION = Pin_239;
- adc1_data[7] : LOCATION = Pin_238;
- adc1_data[8] : LOCATION = Pin_237;
- adc1_data[9] : LOCATION = Pin_236;
- adc2_data[0] : LOCATION = Pin_20;
- adc2_data[10] : LOCATION = Pin_8;
- adc2_data[11] : LOCATION = Pin_7;
- adc2_data[1] : LOCATION = Pin_19;
- adc2_data[2] : LOCATION = Pin_18;
- adc2_data[3] : LOCATION = Pin_17;
- adc2_data[4] : LOCATION = Pin_16;
- adc2_data[5] : LOCATION = Pin_15;
- adc2_data[6] : LOCATION = Pin_14;
- adc2_data[7] : LOCATION = Pin_13;
- adc2_data[8] : LOCATION = Pin_12;
- adc2_data[9] : LOCATION = Pin_11;
- adc3_data[0] : LOCATION = Pin_200;
- adc3_data[10] : LOCATION = Pin_184;
- adc3_data[11] : LOCATION = Pin_183;
- adc3_data[1] : LOCATION = Pin_197;
- adc3_data[2] : LOCATION = Pin_196;
- adc3_data[3] : LOCATION = Pin_195;
- adc3_data[4] : LOCATION = Pin_194;
- adc3_data[5] : LOCATION = Pin_193;
- adc3_data[6] : LOCATION = Pin_188;
- adc3_data[7] : LOCATION = Pin_187;
- adc3_data[8] : LOCATION = Pin_186;
- adc3_data[9] : LOCATION = Pin_185;
- adc4_data[0] : LOCATION = Pin_222;
- adc4_data[10] : LOCATION = Pin_203;
- adc4_data[11] : LOCATION = Pin_202;
- adc4_data[1] : LOCATION = Pin_219;
- adc4_data[2] : LOCATION = Pin_217;
- adc4_data[3] : LOCATION = Pin_216;
- adc4_data[4] : LOCATION = Pin_215;
- adc4_data[5] : LOCATION = Pin_214;
- adc4_data[6] : LOCATION = Pin_213;
- adc4_data[7] : LOCATION = Pin_208;
- adc4_data[8] : LOCATION = Pin_207;
- adc4_data[9] : LOCATION = Pin_206;
- adc_oeb[0] : LOCATION = Pin_228;
- adc_oeb[1] : LOCATION = Pin_21;
- adc_oeb[2] : LOCATION = Pin_181;
- adc_oeb[3] : LOCATION = Pin_218;
- adc_otr[0] : LOCATION = Pin_233;
- adc_otr[1] : LOCATION = Pin_6;
- adc_otr[2] : LOCATION = Pin_182;
- adc_otr[3] : LOCATION = Pin_201;
- adclk0 : LOCATION = Pin_224;
- adclk1 : LOCATION = Pin_226;
- clk0 : LOCATION = Pin_28;
- clk0 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk0 : IO_STANDARD = LVTTL;
- clk1 : LOCATION = Pin_29;
- clk1 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk1 : IO_STANDARD = LVTTL;
- clk3 : LOCATION = Pin_152;
- clk3 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk3 : IO_STANDARD = LVTTL;
- clk_120mhz : LOCATION = Pin_153;
- clk_120mhz : IO_STANDARD = LVTTL;
- clk_out : LOCATION = Pin_63;
- clk_out : IO_STANDARD = LVTTL;
- dac1_data[0] : LOCATION = Pin_165;
- dac1_data[10] : LOCATION = Pin_177;
- dac1_data[11] : LOCATION = Pin_178;
- dac1_data[12] : LOCATION = Pin_179;
- dac1_data[13] : LOCATION = Pin_180;
- dac1_data[1] : LOCATION = Pin_166;
- dac1_data[2] : LOCATION = Pin_167;
- dac1_data[3] : LOCATION = Pin_168;
- dac1_data[4] : LOCATION = Pin_169;
- dac1_data[5] : LOCATION = Pin_170;
- dac1_data[6] : LOCATION = Pin_173;
- dac1_data[7] : LOCATION = Pin_174;
- dac1_data[8] : LOCATION = Pin_175;
- dac1_data[9] : LOCATION = Pin_176;
- dac2_data[0] : LOCATION = Pin_159;
- dac2_data[10] : LOCATION = Pin_163;
- dac2_data[11] : LOCATION = Pin_139;
- dac2_data[12] : LOCATION = Pin_164;
- dac2_data[13] : LOCATION = Pin_138;
- dac2_data[1] : LOCATION = Pin_158;
- dac2_data[2] : LOCATION = Pin_160;
- dac2_data[3] : LOCATION = Pin_156;
- dac2_data[4] : LOCATION = Pin_161;
- dac2_data[5] : LOCATION = Pin_144;
- dac2_data[6] : LOCATION = Pin_162;
- dac2_data[7] : LOCATION = Pin_141;
- dac2_data[8] : LOCATION = Pin_143;
- dac2_data[9] : LOCATION = Pin_140;
- dac3_data[0] : LOCATION = Pin_122;
- dac3_data[10] : LOCATION = Pin_134;
- dac3_data[11] : LOCATION = Pin_135;
- dac3_data[12] : LOCATION = Pin_136;
- dac3_data[13] : LOCATION = Pin_137;
- dac3_data[1] : LOCATION = Pin_123;
- dac3_data[2] : LOCATION = Pin_124;
- dac3_data[3] : LOCATION = Pin_125;
- dac3_data[4] : LOCATION = Pin_126;
- dac3_data[5] : LOCATION = Pin_127;
- dac3_data[6] : LOCATION = Pin_128;
- dac3_data[7] : LOCATION = Pin_131;
- dac3_data[8] : LOCATION = Pin_132;
- dac3_data[9] : LOCATION = Pin_133;
- dac4_data[0] : LOCATION = Pin_104;
- dac4_data[10] : LOCATION = Pin_118;
- dac4_data[11] : LOCATION = Pin_119;
- dac4_data[12] : LOCATION = Pin_120;
- dac4_data[13] : LOCATION = Pin_121;
- dac4_data[1] : LOCATION = Pin_105;
- dac4_data[2] : LOCATION = Pin_106;
- dac4_data[3] : LOCATION = Pin_107;
- dac4_data[4] : LOCATION = Pin_108;
- dac4_data[5] : LOCATION = Pin_113;
- dac4_data[6] : LOCATION = Pin_114;
- dac4_data[7] : LOCATION = Pin_115;
- dac4_data[8] : LOCATION = Pin_116;
- dac4_data[9] : LOCATION = Pin_117;
- enable_rx : LOCATION = Pin_88;
- enable_tx : LOCATION = Pin_93;
- gndbus[0] : LOCATION = Pin_223;
- gndbus[0] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[0] : IO_STANDARD = LVTTL;
- gndbus[1] : LOCATION = Pin_225;
- gndbus[1] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[1] : IO_STANDARD = LVTTL;
- gndbus[2] : LOCATION = Pin_227;
- gndbus[2] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[2] : IO_STANDARD = LVTTL;
- gndbus[3] : LOCATION = Pin_62;
- gndbus[3] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[3] : IO_STANDARD = LVTTL;
- gndbus[4] : LOCATION = Pin_64;
- gndbus[4] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[4] : IO_STANDARD = LVTTL;
- misc_pins[0] : LOCATION = Pin_87;
- misc_pins[0] : IO_STANDARD = LVTTL;
- misc_pins[10] : LOCATION = Pin_76;
- misc_pins[10] : IO_STANDARD = LVTTL;
- misc_pins[11] : LOCATION = Pin_74;
- misc_pins[11] : IO_STANDARD = LVTTL;
- misc_pins[1] : LOCATION = Pin_86;
- misc_pins[1] : IO_STANDARD = LVTTL;
- misc_pins[2] : LOCATION = Pin_85;
- misc_pins[2] : IO_STANDARD = LVTTL;
- misc_pins[3] : LOCATION = Pin_84;
- misc_pins[3] : IO_STANDARD = LVTTL;
- misc_pins[4] : LOCATION = Pin_83;
- misc_pins[4] : IO_STANDARD = LVTTL;
- misc_pins[5] : LOCATION = Pin_82;
- misc_pins[5] : IO_STANDARD = LVTTL;
- misc_pins[6] : LOCATION = Pin_79;
- misc_pins[6] : IO_STANDARD = LVTTL;
- misc_pins[7] : LOCATION = Pin_78;
- misc_pins[7] : IO_STANDARD = LVTTL;
- misc_pins[8] : LOCATION = Pin_77;
- misc_pins[8] : IO_STANDARD = LVTTL;
- misc_pins[9] : LOCATION = Pin_75;
- misc_pins[9] : IO_STANDARD = LVTTL;
- reset : LOCATION = Pin_94;
- usbclk : LOCATION = Pin_55;
- usbctl[0] : LOCATION = Pin_56;
- usbctl[1] : LOCATION = Pin_54;
- usbctl[2] : LOCATION = Pin_53;
- usbctl[3] : LOCATION = Pin_58;
- usbctl[4] : LOCATION = Pin_57;
- usbctl[5] : LOCATION = Pin_44;
- usbdata[0] : LOCATION = Pin_73;
- usbdata[10] : LOCATION = Pin_41;
- usbdata[11] : LOCATION = Pin_39;
- usbdata[12] : LOCATION = Pin_38;
- usbdata[12] : IO_STANDARD = LVTTL;
- usbdata[13] : LOCATION = Pin_37;
- usbdata[14] : LOCATION = Pin_24;
- usbdata[15] : LOCATION = Pin_23;
- usbdata[1] : LOCATION = Pin_68;
- usbdata[2] : LOCATION = Pin_67;
- usbdata[3] : LOCATION = Pin_66;
- usbdata[4] : LOCATION = Pin_65;
- usbdata[5] : LOCATION = Pin_61;
- usbdata[6] : LOCATION = Pin_60;
- usbdata[7] : LOCATION = Pin_59;
- usbdata[8] : LOCATION = Pin_43;
- usbdata[9] : LOCATION = Pin_42;
- usbrdy[0] : LOCATION = Pin_45;
- usbrdy[1] : LOCATION = Pin_46;
- usbrdy[2] : LOCATION = Pin_47;
- usbrdy[3] : LOCATION = Pin_48;
- usbrdy[4] : LOCATION = Pin_49;
- usbrdy[5] : LOCATION = Pin_50;
- clear_status : LOCATION = Pin_99;
-}
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.esf b/usrp/fpga/toplevel/usrp_multi/usrp_multi.esf
deleted file mode 100644
index df45f676b..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.esf
+++ /dev/null
@@ -1,14 +0,0 @@
-SIMULATOR_SETTINGS
-{
- ESTIMATE_POWER_CONSUMPTION = OFF;
- GLITCH_INTERVAL = 1NS;
- GLITCH_DETECTION = OFF;
- SIMULATION_COVERAGE = ON;
- CHECK_OUTPUTS = OFF;
- SETUP_HOLD_DETECTION = OFF;
- POWER_ESTIMATION_START_TIME = "0 NS";
- ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS = ON;
- SIMULATION_MODE = TIMING;
- START_TIME = 0NS;
- USE_COMPILER_SETTINGS = usrp_multi;
-}
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.psf b/usrp/fpga/toplevel/usrp_multi/usrp_multi.psf
deleted file mode 100644
index 68c2d12f9..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.psf
+++ /dev/null
@@ -1,312 +0,0 @@
-DEFAULT_DESIGN_ASSISTANT_SETTINGS
-{
- HCPY_ALOAD_SIGNALS = OFF;
- HCPY_VREF_PINS = OFF;
- HCPY_CAT = OFF;
- HCPY_ILLEGAL_HC_DEV_PKG = OFF;
- ACLK_RULE_IMSZER_ADOMAIN = OFF;
- ACLK_RULE_SZER_BTW_ACLK_DOMAIN = OFF;
- ACLK_RULE_NO_SZER_ACLK_DOMAIN = OFF;
- ACLK_CAT = OFF;
- SIGNALRACE_RULE_ASYNCHPIN_SYNCH_CLKPIN = OFF;
- SIGNALRACE_CAT = OFF;
- NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED = OFF;
- NONSYNCHSTRUCT_RULE_SRLATCH = OFF;
- NONSYNCHSTRUCT_RULE_DLATCH = OFF;
- NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR = OFF;
- NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN = OFF;
- NONSYNCHSTRUCT_RULE_RIPPLE_CLK = OFF;
- NONSYNCHSTRUCT_RULE_DELAY_CHAIN = OFF;
- NONSYNCHSTRUCT_RULE_REG_LOOP = OFF;
- NONSYNCHSTRUCT_RULE_COMBLOOP = OFF;
- NONSYNCHSTRUCT_CAT = OFF;
- NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE = OFF;
- TIMING_RULE_COIN_CLKEDGE = OFF;
- TIMING_RULE_SHIFT_REG = OFF;
- TIMING_RULE_HIGH_FANOUTS = OFF;
- TIMING_CAT = OFF;
- RESET_RULE_ALL = OFF;
- RESET_RULE_IMSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_UNSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_REG_ASNYCH = OFF;
- RESET_RULE_COMB_ASYNCH_RESET = OFF;
- RESET_RULE_IMSYNCH_EXRESET = OFF;
- RESET_RULE_UNSYNCH_EXRESET = OFF;
- RESET_RULE_INPINS_RESETNET = OFF;
- RESET_CAT = OFF;
- CLK_RULE_ALL = OFF;
- CLK_RULE_MIX_EDGES = OFF;
- CLK_RULE_CLKNET_CLKSPINES = OFF;
- CLK_RULE_INPINS_CLKNET = OFF;
- CLK_RULE_GATING_SCHEME = OFF;
- CLK_RULE_INV_CLOCK = OFF;
- CLK_RULE_COMB_CLOCK = OFF;
- CLK_CAT = OFF;
- HCPY_EXCEED_USER_IO_USAGE = OFF;
- HCPY_EXCEED_RAM_USAGE = OFF;
- NONSYNCHSTRUCT_RULE_ASYN_RAM = OFF;
- SIGNALRACE_RULE_TRISTATE = OFF;
- ASSG_RULE_MISSING_TIMING = OFF;
- ASSG_RULE_MISSING_FMAX = OFF;
- ASSG_CAT = OFF;
-}
-SYNTHESIS_FITTING_SETTINGS
-{
- AUTO_SHIFT_REGISTER_RECOGNITION = ON;
- AUTO_DSP_RECOGNITION = ON;
- AUTO_RAM_RECOGNITION = ON;
- REMOVE_DUPLICATE_LOGIC = ON;
- AUTO_TURBO_BIT = ON;
- AUTO_MERGE_PLLS = ON;
- AUTO_OPEN_DRAIN_PINS = ON;
- AUTO_PARALLEL_EXPANDERS = ON;
- AUTO_FAST_OUTPUT_ENABLE_REGISTERS = OFF;
- AUTO_FAST_OUTPUT_REGISTERS = OFF;
- AUTO_FAST_INPUT_REGISTERS = OFF;
- AUTO_CASCADE_CHAINS = ON;
- AUTO_CARRY_CHAINS = ON;
- AUTO_DELAY_CHAINS = ON;
- MAX7000_PARALLEL_EXPANDER_CHAIN_LENGTH = 4;
- PARALLEL_EXPANDER_CHAIN_LENGTH = 16;
- CASCADE_CHAIN_LENGTH = 2;
- STRATIX_CARRY_CHAIN_LENGTH = 70;
- MERCURY_CARRY_CHAIN_LENGTH = 48;
- FLEX10K_CARRY_CHAIN_LENGTH = 32;
- FLEX6K_CARRY_CHAIN_LENGTH = 32;
- CARRY_CHAIN_LENGTH = 48;
- CARRY_OUT_PINS_LCELL_INSERT = ON;
- NORMAL_LCELL_INSERT = ON;
- AUTO_LCELL_INSERTION = ON;
- ALLOW_XOR_GATE_USAGE = ON;
- AUTO_PACKED_REGISTERS_STRATIX = NORMAL;
- AUTO_PACKED_REGISTERS = OFF;
- AUTO_PACKED_REG_CYCLONE = NORMAL;
- FLEX10K_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX6K_OPTIMIZATION_TECHNIQUE = AREA;
- MERCURY_OPTIMIZATION_TECHNIQUE = AREA;
- APEX20K_OPTIMIZATION_TECHNIQUE = SPEED;
- MAX7000_OPTIMIZATION_TECHNIQUE = SPEED;
- STRATIX_OPTIMIZATION_TECHNIQUE = SPEED;
- CYCLONE_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX10K_TECHNOLOGY_MAPPER = LUT;
- FLEX6K_TECHNOLOGY_MAPPER = LUT;
- MERCURY_TECHNOLOGY_MAPPER = LUT;
- APEX20K_TECHNOLOGY_MAPPER = LUT;
- MAX7000_TECHNOLOGY_MAPPER = "PRODUCT TERM";
- STRATIX_TECHNOLOGY_MAPPER = LUT;
- AUTO_IMPLEMENT_IN_ROM = OFF;
- AUTO_GLOBAL_MEMORY_CONTROLS = OFF;
- AUTO_GLOBAL_REGISTER_CONTROLS = ON;
- AUTO_GLOBAL_OE = ON;
- AUTO_GLOBAL_CLOCK = ON;
- USE_LPM_FOR_AHDL_OPERATORS = ON;
- LIMIT_AHDL_INTEGERS_TO_32_BITS = OFF;
- ENABLE_BUS_HOLD_CIRCUITRY = OFF;
- WEAK_PULL_UP_RESISTOR = OFF;
- TURBO_BIT = ON;
- MAX7000_IGNORE_SOFT_BUFFERS = OFF;
- IGNORE_SOFT_BUFFERS = ON;
- MAX7000_IGNORE_LCELL_BUFFERS = AUTO;
- IGNORE_LCELL_BUFFERS = OFF;
- IGNORE_ROW_GLOBAL_BUFFERS = OFF;
- IGNORE_GLOBAL_BUFFERS = OFF;
- IGNORE_CASCADE_BUFFERS = OFF;
- IGNORE_CARRY_BUFFERS = OFF;
- REMOVE_DUPLICATE_REGISTERS = ON;
- REMOVE_REDUNDANT_LOGIC_CELLS = OFF;
- ALLOW_POWER_UP_DONT_CARE = ON;
- PCI_IO = OFF;
- NOT_GATE_PUSH_BACK = ON;
- SLOW_SLEW_RATE = OFF;
- DSP_BLOCK_BALANCING = AUTO;
- STATE_MACHINE_PROCESSING = AUTO;
-}
-DEFAULT_HARDCOPY_SETTINGS
-{
- HARDCOPY_EXTERNAL_CLOCK_JITTER = "0.0 NS";
-}
-DEFAULT_TIMING_REQUIREMENTS
-{
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- RUN_ALL_TIMING_ANALYSES = ON;
- IGNORE_CLOCK_SETTINGS = OFF;
- DEFAULT_HOLD_MULTICYCLE = "SAME AS MULTICYCLE";
- CUT_OFF_IO_PIN_FEEDBACK = ON;
- CUT_OFF_CLEAR_AND_PRESET_PATHS = ON;
- CUT_OFF_READ_DURING_WRITE_PATHS = ON;
- CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS = ON;
- DO_MIN_ANALYSIS = ON;
- DO_MIN_TIMING = OFF;
- NUMBER_OF_PATHS_TO_REPORT = 200;
- NUMBER_OF_DESTINATION_TO_REPORT = 10;
- NUMBER_OF_SOURCES_PER_DESTINATION_TO_REPORT = 10;
- MAX_SCC_SIZE = 50;
-}
-HDL_SETTINGS
-{
- VERILOG_INPUT_VERSION = VERILOG_2001;
- ENABLE_IP_DEBUG = OFF;
- VHDL_INPUT_VERSION = VHDL93;
- VHDL_SHOW_LMF_MAPPING_MESSAGES = OFF;
-}
-PROJECT_INFO(usrp_multi)
-{
- ORIGINAL_QUARTUS_VERSION = 3.0;
- PROJECT_CREATION_TIME_DATE = "00:14:04 JULY 13, 2003";
- LAST_QUARTUS_VERSION = 3.0;
- SHOW_REGISTRATION_MESSAGE = ON;
- USER_LIBRARIES = "e:\usrp\fpga\megacells";
-}
-THIRD_PARTY_EDA_TOOLS(usrp_multi)
-{
- EDA_DESIGN_ENTRY_SYNTHESIS_TOOL = "<NONE>";
- EDA_SIMULATION_TOOL = "<NONE>";
- EDA_TIMING_ANALYSIS_TOOL = "<NONE>";
- EDA_BOARD_DESIGN_TOOL = "<NONE>";
- EDA_FORMAL_VERIFICATION_TOOL = "<NONE>";
- EDA_RESYNTHESIS_TOOL = "<NONE>";
-}
-EDA_TOOL_SETTINGS(eda_design_synthesis)
-{
- EDA_INPUT_GND_NAME = GND;
- EDA_INPUT_VCC_NAME = VCC;
- EDA_SHOW_LMF_MAPPING_MESSAGES = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_INPUT_DATA_FORMAT = EDIF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_simulation)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_timing_analysis)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- EDA_LAUNCH_CMD_LINE_TOOL = OFF;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_board_design)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_formal_verification)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_palace)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- RESYNTHESIS_RETIMING = FULL;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
-}
-CLOCK(clk_120mhz)
-{
- FMAX_REQUIREMENT = "120.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(usbclk)
-{
- FMAX_REQUIREMENT = "48.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(SCLK)
-{
- FMAX_REQUIREMENT = "1.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk0)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk1)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.qpf b/usrp/fpga/toplevel/usrp_multi/usrp_multi.qpf
deleted file mode 100644
index 1524de1bb..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.qpf
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 1991-2004 Altera Corporation
-# Any megafunction design, and related netlist (encrypted or decrypted),
-# support information, device programming or simulation file, and any other
-# associated documentation or information provided by Altera or a partner
-# under Altera's Megafunction Partnership Program may be used only
-# to program PLD devices (but not masked PLD devices) from Altera. Any
-# other use of such megafunction design, netlist, support information,
-# device programming or simulation file, or any other related documentation
-# or information is prohibited for any other purpose, including, but not
-# limited to modification, reverse engineering, de-compiling, or use with
-# any other silicon devices, unless such use is explicitly licensed under
-# a separate agreement with Altera or a megafunction partner. Title to the
-# intellectual property, including patents, copyrights, trademarks, trade
-# secrets, or maskworks, embodied in any such megafunction design, netlist,
-# support information, device programming or simulation file, or any other
-# related documentation or information provided by Altera or a megafunction
-# partner, remains with Altera, the megafunction partner, or their respective
-# licensors. No other licenses, including any licenses needed under any third
-# party's intellectual property, are provided herein.
-
-
-
-QUARTUS_VERSION = "4.0"
-DATE = "17:10:11 December 20, 2004"
-
-
-# Active Revisions
-
-PROJECT_REVISION = "usrp_multi"
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.qsf b/usrp/fpga/toplevel/usrp_multi/usrp_multi.qsf
deleted file mode 100644
index 9f0efbd83..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.qsf
+++ /dev/null
@@ -1,408 +0,0 @@
-# Copyright (C) 1991-2005 Altera Corporation
-# Your use of Altera Corporation's design tools, logic functions
-# and other software and tools, and its AMPP partner logic
-# functions, and any output files any of the foregoing
-# (including device programming or simulation files), and any
-# associated documentation or information are expressly subject
-# to the terms and conditions of the Altera Program License
-# Subscription Agreement, Altera MegaCore Function License
-# Agreement, or other applicable license agreement, including,
-# without limitation, that your use is for the sole purpose of
-# programming logic devices manufactured by Altera and sold by
-# Altera or its authorized distributors. Please refer to the
-# applicable agreement for further details.
-
-
-# The default values for assignments are stored in the file
-# usrp_multi_assignment_defaults.qdf
-# If this file doesn't exist, and for assignments not listed, see file
-# assignment_defaults.qdf
-
-# Altera recommends that you do not modify this file. This
-# file is updated automatically by the Quartus II software
-# and any changes you make may be lost or overwritten.
-
-
-# Project-Wide Assignments
-# ========================
-set_global_assignment -name ORIGINAL_QUARTUS_VERSION 3.0
-set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:14:04 JULY 13, 2003"
-set_global_assignment -name LAST_QUARTUS_VERSION 6.1
-
-# Pin & Location Assignments
-# ==========================
-set_global_assignment -name RESERVE_PIN "AS INPUT TRI-STATED"
-set_location_assignment PIN_29 -to SCLK
-set_location_assignment PIN_117 -to SDI
-set_location_assignment PIN_28 -to usbclk
-set_location_assignment PIN_107 -to usbctl[0]
-set_location_assignment PIN_106 -to usbctl[1]
-set_location_assignment PIN_105 -to usbctl[2]
-set_location_assignment PIN_100 -to usbdata[0]
-set_location_assignment PIN_84 -to usbdata[10]
-set_location_assignment PIN_83 -to usbdata[11]
-set_location_assignment PIN_82 -to usbdata[12]
-set_location_assignment PIN_79 -to usbdata[13]
-set_location_assignment PIN_78 -to usbdata[14]
-set_location_assignment PIN_77 -to usbdata[15]
-set_location_assignment PIN_99 -to usbdata[1]
-set_location_assignment PIN_98 -to usbdata[2]
-set_location_assignment PIN_95 -to usbdata[3]
-set_location_assignment PIN_94 -to usbdata[4]
-set_location_assignment PIN_93 -to usbdata[5]
-set_location_assignment PIN_88 -to usbdata[6]
-set_location_assignment PIN_87 -to usbdata[7]
-set_location_assignment PIN_86 -to usbdata[8]
-set_location_assignment PIN_85 -to usbdata[9]
-set_location_assignment PIN_104 -to usbrdy[0]
-set_location_assignment PIN_101 -to usbrdy[1]
-set_location_assignment PIN_76 -to FX2_1
-set_location_assignment PIN_75 -to FX2_2
-set_location_assignment PIN_74 -to FX2_3
-set_location_assignment PIN_116 -to io_rx_a[0]
-set_location_assignment PIN_115 -to io_rx_a[1]
-set_location_assignment PIN_114 -to io_rx_a[2]
-set_location_assignment PIN_113 -to io_rx_a[3]
-set_location_assignment PIN_108 -to io_rx_a[4]
-set_location_assignment PIN_195 -to io_rx_a[5]
-set_location_assignment PIN_196 -to io_rx_a[6]
-set_location_assignment PIN_197 -to io_rx_a[7]
-set_location_assignment PIN_200 -to io_rx_a[8]
-set_location_assignment PIN_201 -to io_rx_a[9]
-set_location_assignment PIN_202 -to io_rx_a[10]
-set_location_assignment PIN_203 -to io_rx_a[11]
-set_location_assignment PIN_206 -to io_rx_a[12]
-set_location_assignment PIN_207 -to io_rx_a[13]
-set_location_assignment PIN_208 -to io_rx_a[14]
-set_location_assignment PIN_214 -to io_rx_b[0]
-set_location_assignment PIN_215 -to io_rx_b[1]
-set_location_assignment PIN_216 -to io_rx_b[2]
-set_location_assignment PIN_217 -to io_rx_b[3]
-set_location_assignment PIN_218 -to io_rx_b[4]
-set_location_assignment PIN_219 -to io_rx_b[5]
-set_location_assignment PIN_222 -to io_rx_b[6]
-set_location_assignment PIN_223 -to io_rx_b[7]
-set_location_assignment PIN_224 -to io_rx_b[8]
-set_location_assignment PIN_225 -to io_rx_b[9]
-set_location_assignment PIN_226 -to io_rx_b[10]
-set_location_assignment PIN_227 -to io_rx_b[11]
-set_location_assignment PIN_228 -to io_rx_b[12]
-set_location_assignment PIN_233 -to io_rx_b[13]
-set_location_assignment PIN_234 -to io_rx_b[14]
-set_location_assignment PIN_175 -to io_tx_a[0]
-set_location_assignment PIN_176 -to io_tx_a[1]
-set_location_assignment PIN_177 -to io_tx_a[2]
-set_location_assignment PIN_178 -to io_tx_a[3]
-set_location_assignment PIN_179 -to io_tx_a[4]
-set_location_assignment PIN_180 -to io_tx_a[5]
-set_location_assignment PIN_181 -to io_tx_a[6]
-set_location_assignment PIN_182 -to io_tx_a[7]
-set_location_assignment PIN_183 -to io_tx_a[8]
-set_location_assignment PIN_184 -to io_tx_a[9]
-set_location_assignment PIN_185 -to io_tx_a[10]
-set_location_assignment PIN_186 -to io_tx_a[11]
-set_location_assignment PIN_187 -to io_tx_a[12]
-set_location_assignment PIN_188 -to io_tx_a[13]
-set_location_assignment PIN_193 -to io_tx_a[14]
-set_location_assignment PIN_73 -to io_tx_b[0]
-set_location_assignment PIN_68 -to io_tx_b[1]
-set_location_assignment PIN_67 -to io_tx_b[2]
-set_location_assignment PIN_66 -to io_tx_b[3]
-set_location_assignment PIN_65 -to io_tx_b[4]
-set_location_assignment PIN_64 -to io_tx_b[5]
-set_location_assignment PIN_63 -to io_tx_b[6]
-set_location_assignment PIN_62 -to io_tx_b[7]
-set_location_assignment PIN_61 -to io_tx_b[8]
-set_location_assignment PIN_60 -to io_tx_b[9]
-set_location_assignment PIN_59 -to io_tx_b[10]
-set_location_assignment PIN_58 -to io_tx_b[11]
-set_location_assignment PIN_57 -to io_tx_b[12]
-set_location_assignment PIN_56 -to io_tx_b[13]
-set_location_assignment PIN_55 -to io_tx_b[14]
-set_location_assignment PIN_152 -to master_clk
-set_location_assignment PIN_144 -to rx_a_a[0]
-set_location_assignment PIN_143 -to rx_a_a[1]
-set_location_assignment PIN_141 -to rx_a_a[2]
-set_location_assignment PIN_140 -to rx_a_a[3]
-set_location_assignment PIN_139 -to rx_a_a[4]
-set_location_assignment PIN_138 -to rx_a_a[5]
-set_location_assignment PIN_137 -to rx_a_a[6]
-set_location_assignment PIN_136 -to rx_a_a[7]
-set_location_assignment PIN_135 -to rx_a_a[8]
-set_location_assignment PIN_134 -to rx_a_a[9]
-set_location_assignment PIN_133 -to rx_a_a[10]
-set_location_assignment PIN_132 -to rx_a_a[11]
-set_location_assignment PIN_23 -to rx_a_b[0]
-set_location_assignment PIN_21 -to rx_a_b[1]
-set_location_assignment PIN_20 -to rx_a_b[2]
-set_location_assignment PIN_19 -to rx_a_b[3]
-set_location_assignment PIN_18 -to rx_a_b[4]
-set_location_assignment PIN_17 -to rx_a_b[5]
-set_location_assignment PIN_16 -to rx_a_b[6]
-set_location_assignment PIN_15 -to rx_a_b[7]
-set_location_assignment PIN_14 -to rx_a_b[8]
-set_location_assignment PIN_13 -to rx_a_b[9]
-set_location_assignment PIN_12 -to rx_a_b[10]
-set_location_assignment PIN_11 -to rx_a_b[11]
-set_location_assignment PIN_131 -to rx_b_a[0]
-set_location_assignment PIN_128 -to rx_b_a[1]
-set_location_assignment PIN_127 -to rx_b_a[2]
-set_location_assignment PIN_126 -to rx_b_a[3]
-set_location_assignment PIN_125 -to rx_b_a[4]
-set_location_assignment PIN_124 -to rx_b_a[5]
-set_location_assignment PIN_123 -to rx_b_a[6]
-set_location_assignment PIN_122 -to rx_b_a[7]
-set_location_assignment PIN_121 -to rx_b_a[8]
-set_location_assignment PIN_120 -to rx_b_a[9]
-set_location_assignment PIN_119 -to rx_b_a[10]
-set_location_assignment PIN_118 -to rx_b_a[11]
-set_location_assignment PIN_8 -to rx_b_b[0]
-set_location_assignment PIN_7 -to rx_b_b[1]
-set_location_assignment PIN_6 -to rx_b_b[2]
-set_location_assignment PIN_5 -to rx_b_b[3]
-set_location_assignment PIN_4 -to rx_b_b[4]
-set_location_assignment PIN_3 -to rx_b_b[5]
-set_location_assignment PIN_2 -to rx_b_b[6]
-set_location_assignment PIN_240 -to rx_b_b[7]
-set_location_assignment PIN_239 -to rx_b_b[8]
-set_location_assignment PIN_238 -to rx_b_b[9]
-set_location_assignment PIN_237 -to rx_b_b[10]
-set_location_assignment PIN_236 -to rx_b_b[11]
-set_location_assignment PIN_156 -to SDO
-set_location_assignment PIN_153 -to SEN_FPGA
-set_location_assignment PIN_159 -to tx_a[0]
-set_location_assignment PIN_160 -to tx_a[1]
-set_location_assignment PIN_161 -to tx_a[2]
-set_location_assignment PIN_162 -to tx_a[3]
-set_location_assignment PIN_163 -to tx_a[4]
-set_location_assignment PIN_164 -to tx_a[5]
-set_location_assignment PIN_165 -to tx_a[6]
-set_location_assignment PIN_166 -to tx_a[7]
-set_location_assignment PIN_167 -to tx_a[8]
-set_location_assignment PIN_168 -to tx_a[9]
-set_location_assignment PIN_169 -to tx_a[10]
-set_location_assignment PIN_170 -to tx_a[11]
-set_location_assignment PIN_173 -to tx_a[12]
-set_location_assignment PIN_174 -to tx_a[13]
-set_location_assignment PIN_38 -to tx_b[0]
-set_location_assignment PIN_39 -to tx_b[1]
-set_location_assignment PIN_41 -to tx_b[2]
-set_location_assignment PIN_42 -to tx_b[3]
-set_location_assignment PIN_43 -to tx_b[4]
-set_location_assignment PIN_44 -to tx_b[5]
-set_location_assignment PIN_45 -to tx_b[6]
-set_location_assignment PIN_46 -to tx_b[7]
-set_location_assignment PIN_47 -to tx_b[8]
-set_location_assignment PIN_48 -to tx_b[9]
-set_location_assignment PIN_49 -to tx_b[10]
-set_location_assignment PIN_50 -to tx_b[11]
-set_location_assignment PIN_53 -to tx_b[12]
-set_location_assignment PIN_54 -to tx_b[13]
-set_location_assignment PIN_158 -to TXSYNC_A
-set_location_assignment PIN_37 -to TXSYNC_B
-set_location_assignment PIN_235 -to io_rx_b[15]
-set_location_assignment PIN_24 -to io_tx_b[15]
-set_location_assignment PIN_213 -to io_rx_a[15]
-set_location_assignment PIN_194 -to io_tx_a[15]
-set_location_assignment PIN_1 -to MYSTERY_SIGNAL
-
-# Timing Assignments
-# ==================
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF
-
-# Analysis & Synthesis Assignments
-# ================================
-set_global_assignment -name SAVE_DISK_SPACE OFF
-set_global_assignment -name DEVICE_FILTER_PACKAGE "ANY QFP"
-set_global_assignment -name DEVICE_FILTER_PIN_COUNT 240
-set_global_assignment -name EDA_DESIGN_ENTRY_SYNTHESIS_TOOL "<None>"
-set_global_assignment -name FAMILY Cyclone
-set_global_assignment -name CYCLONE_OPTIMIZATION_TECHNIQUE BALANCED
-set_global_assignment -name STRATIX_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name APEX20K_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name TOP_LEVEL_ENTITY usrp_multi
-set_global_assignment -name VHDL_SHOW_LMF_MAPPING_MESSAGES OFF
-set_global_assignment -name USER_LIBRARIES "H:\\usrp-for2.7\\fpga\\megacells"
-set_global_assignment -name AUTO_ENABLE_SMART_COMPILE ON
-
-# Fitter Assignments
-# ==================
-set_global_assignment -name DEVICE EP1C12Q240C8
-set_global_assignment -name CYCLONE_CONFIGURATION_SCHEME "PASSIVE SERIAL"
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED"
-set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF
-set_global_assignment -name OPTIMIZE_TIMING "NORMAL COMPILATION"
-set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING OFF
-set_global_assignment -name IO_PLACEMENT_OPTIMIZATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT NORMAL
-set_global_assignment -name INC_PLC_MODE OFF
-set_global_assignment -name ROUTING_BACK_ANNOTATION_MODE OFF
-set_instance_assignment -name IO_STANDARD LVTTL -to usbdata[12]
-set_global_assignment -name STRATIX_DEVICE_IO_STANDARD LVTTL
-set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
-
-# Timing Analysis Assignments
-# ===========================
-set_global_assignment -name MAX_SCC_SIZE 50
-
-# EDA Netlist Writer Assignments
-# ==============================
-set_global_assignment -name EDA_SIMULATION_TOOL "<None>"
-set_global_assignment -name EDA_TIMING_ANALYSIS_TOOL "<NONE>"
-set_global_assignment -name EDA_BOARD_DESIGN_TOOL "<NONE>"
-set_global_assignment -name EDA_FORMAL_VERIFICATION_TOOL "<NONE>"
-set_global_assignment -name EDA_RESYNTHESIS_TOOL "<NONE>"
-
-# Assembler Assignments
-# =====================
-set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
-set_global_assignment -name GENERATE_RBF_FILE ON
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
-set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
-
-# Simulator Assignments
-# =====================
-set_global_assignment -name START_TIME "0 ns"
-set_global_assignment -name GLITCH_INTERVAL "1 ns"
-
-# Design Assistant Assignments
-# ============================
-set_global_assignment -name DRC_REPORT_TOP_FANOUT OFF
-set_global_assignment -name DRC_REPORT_FANOUT_EXCEEDING OFF
-set_global_assignment -name ASSG_CAT OFF
-set_global_assignment -name ASSG_RULE_MISSING_FMAX OFF
-set_global_assignment -name ASSG_RULE_MISSING_TIMING OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ASYN_RAM OFF
-set_global_assignment -name CLK_CAT OFF
-set_global_assignment -name CLK_RULE_COMB_CLOCK OFF
-set_global_assignment -name CLK_RULE_INV_CLOCK OFF
-set_global_assignment -name CLK_RULE_GATING_SCHEME OFF
-set_global_assignment -name CLK_RULE_INPINS_CLKNET OFF
-set_global_assignment -name CLK_RULE_CLKNET_CLKSPINES OFF
-set_global_assignment -name CLK_RULE_MIX_EDGES OFF
-set_global_assignment -name RESET_CAT OFF
-set_global_assignment -name RESET_RULE_INPINS_RESETNET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_COMB_ASYNCH_RESET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name TIMING_CAT OFF
-set_global_assignment -name TIMING_RULE_SHIFT_REG OFF
-set_global_assignment -name TIMING_RULE_COIN_CLKEDGE OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE OFF
-set_global_assignment -name NONSYNCHSTRUCT_CAT OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMBLOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_REG_LOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_DELAY_CHAIN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_RIPPLE_CLK OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_SRLATCH OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED OFF
-set_global_assignment -name SIGNALRACE_CAT OFF
-set_global_assignment -name ACLK_CAT OFF
-set_global_assignment -name ACLK_RULE_NO_SZER_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_SZER_BTW_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_IMSZER_ADOMAIN OFF
-set_global_assignment -name HCPY_CAT OFF
-set_global_assignment -name HCPY_VREF_PINS OFF
-
-# SignalTap II Assignments
-# ========================
-set_global_assignment -name HUB_ENTITY_NAME SLD_HUB
-set_global_assignment -name HUB_INSTANCE_NAME SLD_HUB_INST
-set_global_assignment -name ENABLE_SIGNALTAP OFF
-
-# LogicLock Region Assignments
-# ============================
-set_global_assignment -name LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT OFF
-
-# -----------------
-# start CLOCK(SCLK)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id SCLK
-set_global_assignment -name FMAX_REQUIREMENT "1 MHz" -section_id SCLK
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id SCLK
-
-# end CLOCK(SCLK)
-# ---------------
-
-# -----------------------
-# start CLOCK(master_clk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id master_clk
-set_global_assignment -name FMAX_REQUIREMENT "64 MHz" -section_id master_clk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id master_clk
-
-# end CLOCK(master_clk)
-# ---------------------
-
-# -------------------
-# start CLOCK(usbclk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id usbclk
-set_global_assignment -name FMAX_REQUIREMENT "48 MHz" -section_id usbclk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id usbclk
-
-# end CLOCK(usbclk)
-# -----------------
-
-# ----------------------
-# start ENTITY(usrp_multi)
-
- # Timing Assignments
- # ==================
-set_instance_assignment -name CLOCK_SETTINGS SCLK -to SCLK
-set_instance_assignment -name CLOCK_SETTINGS usbclk -to usbclk
-set_instance_assignment -name CLOCK_SETTINGS master_clk -to master_clk
-
-# end ENTITY(usrp_multi)
-# --------------------
-
-
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rssi.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/setting_reg_masked.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/master_control_multi.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/ram16.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4k.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mult.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/ram16_2sum.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_rom.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/halfband_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mac.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_ram.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_dcoffset.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/adc_interface.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/io_pins.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/setting_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/bidir_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_int_shifter.v
-set_global_assignment -name VERILOG_FILE ../../megacells/clk_doubler.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/gen_sync.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/master_control.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_2k.v
-set_global_assignment -name VERILOG_FILE ../../megacells/bustri.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/phase_acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_interp.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic_stage.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic.v
-set_global_assignment -name VERILOG_FILE usrp_multi.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/clk_divider.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/serial_io.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/strobe_gen.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/sign_extend.v \ No newline at end of file
diff --git a/usrp/fpga/toplevel/usrp_multi/usrp_multi.v b/usrp/fpga/toplevel/usrp_multi/usrp_multi.v
deleted file mode 100644
index ce484fc1c..000000000
--- a/usrp/fpga/toplevel/usrp_multi/usrp_multi.v
+++ /dev/null
@@ -1,379 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003,2004,2005,2006 Matt Ettus
-// Copyright (C) 2006 Martin Dudok van Heel
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Top level module for a full setup with DUCs and DDCs
-
-// Define DEBUG_OWNS_IO_PINS if we're using the daughterboard i/o pins
-// for debugging info. NB, This can kill the m'board and/or d'board if you
-// have anything except basic d'boards installed.
-
-// Uncomment the following to include optional circuitry
-
-`include "config.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-
-module usrp_multi
-(output MYSTERY_SIGNAL,
- input master_clk,
- input SCLK,
- input SDI,
- inout SDO,
- input SEN_FPGA,
-
- input FX2_1,
- output FX2_2,
- output FX2_3,
-
- input wire [11:0] rx_a_a,
- input wire [11:0] rx_b_a,
- input wire [11:0] rx_a_b,
- input wire [11:0] rx_b_b,
-
- output wire [13:0] tx_a,
- output wire [13:0] tx_b,
-
- output wire TXSYNC_A,
- output wire TXSYNC_B,
-
- // USB interface
- input usbclk,
- input wire [2:0] usbctl,
- output wire [1:0] usbrdy,
- inout [15:0] usbdata, // NB Careful, inout
-
- // These are the general purpose i/o's that go to the daughterboard slots
- inout wire [15:0] io_tx_a,
- inout wire [15:0] io_tx_b,
- inout wire [15:0] io_rx_a,
- inout wire [15:0] io_rx_b
- );
- wire [15:0] debugdata,debugctrl;
- assign MYSTERY_SIGNAL = 1'b0;
-
- wire clk64,clk128;
-
- wire WR = usbctl[0];
- wire RD = usbctl[1];
- wire OE = usbctl[2];
-
- wire have_space, have_pkt_rdy;
- assign usbrdy[0] = have_space;
- assign usbrdy[1] = have_pkt_rdy;
-
- wire tx_underrun, rx_overrun;
- wire clear_status = FX2_1;
- assign FX2_2 = rx_overrun;
- assign FX2_3 = tx_underrun;
-
- wire [15:0] usbdata_out;
-
- wire [3:0] dac0mux,dac1mux,dac2mux,dac3mux;
-
- wire tx_realsignals;
- wire [3:0] rx_numchan;
- wire [2:0] tx_numchan;
-
- wire [7:0] interp_rate, decim_rate;
- wire [15:0] tx_debugbus, rx_debugbus;
-
- wire enable_tx, enable_rx;
- wire reset_data;
-`ifdef MULTI_ON
- wire sync_rx;
- assign reset_data = sync_rx;
-`else
- assign reset_data = 1'b0;
-`endif // `ifdef MULTI_ON
-
- wire tx_dsp_reset, rx_dsp_reset, tx_bus_reset, rx_bus_reset;
- wire [7:0] settings;
-
- // Tri-state bus macro
- bustri bustri( .data(usbdata_out),.enabledt(OE),.tridata(usbdata) );
-
- assign clk64 = master_clk;
-
- wire [15:0] ch0tx,ch1tx,ch2tx,ch3tx; //,ch4tx,ch5tx,ch6tx,ch7tx;
- wire [15:0] ch0rx,ch1rx,ch2rx,ch3rx,ch4rx,ch5rx,ch6rx,ch7rx;
-
- // TX
- wire [15:0] i_out_0,i_out_1,q_out_0,q_out_1;
- wire [15:0] bb_tx_i0,bb_tx_q0,bb_tx_i1,bb_tx_q1; // bb_tx_i2,bb_tx_q2,bb_tx_i3,bb_tx_q3;
-
- wire strobe_interp, tx_sample_strobe;
- wire tx_empty;
-
- wire serial_strobe;
- wire [6:0] serial_addr;
- wire [31:0] serial_data;
-
- reg [15:0] debug_counter;
-`ifdef COUNTER_32BIT_ON
- reg [31:0] sample_counter_32bit;
-`endif // `ifdef COUNTER_32BIT_ON
- reg [15:0] loopback_i_0,loopback_q_0;
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Transmit Side
-`ifdef TX_ON
- assign bb_tx_i0 = ch0tx;
- assign bb_tx_q0 = ch1tx;
- assign bb_tx_i1 = ch2tx;
- assign bb_tx_q1 = ch3tx;
-
- tx_buffer tx_buffer
- ( .usbclk(usbclk),.bus_reset(tx_bus_reset),.reset(tx_dsp_reset),
- .usbdata(usbdata),.WR(WR),.have_space(have_space),.tx_underrun(tx_underrun),
- .channels({tx_numchan,1'b0}),
- .tx_i_0(ch0tx),.tx_q_0(ch1tx),
- .tx_i_1(ch2tx),.tx_q_1(ch3tx),
- .tx_i_2(),.tx_q_2(),
- .tx_i_3(),.tx_q_3(),
- .txclk(clk64),.txstrobe(strobe_interp),
- .clear_status(clear_status),
- .tx_empty(tx_empty),
- .debugbus(tx_debugbus) );
-
- tx_chain tx_chain_0
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i0),.q_in(bb_tx_q0),.i_out(i_out_0),.q_out(q_out_0) );
-
- tx_chain tx_chain_1
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i1),.q_in(bb_tx_q1),.i_out(i_out_1),.q_out(q_out_1) );
-
- setting_reg #(`FR_TX_MUX)
- sr_txmux(.clock(clk64),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({dac3mux,dac2mux,dac1mux,dac0mux,tx_realsignals,tx_numchan}));
-
- wire [15:0] tx_a_a = dac0mux[3] ? (dac0mux[1] ? (dac0mux[0] ? q_out_1 : i_out_1) : (dac0mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_a = dac1mux[3] ? (dac1mux[1] ? (dac1mux[0] ? q_out_1 : i_out_1) : (dac1mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_a_b = dac2mux[3] ? (dac2mux[1] ? (dac2mux[0] ? q_out_1 : i_out_1) : (dac2mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_b = dac3mux[3] ? (dac3mux[1] ? (dac3mux[0] ? q_out_1 : i_out_1) : (dac3mux[0] ? q_out_0 : i_out_0)) : 16'b0;
-
- wire txsync = tx_sample_strobe;
- assign TXSYNC_A = txsync;
- assign TXSYNC_B = txsync;
-
- assign tx_a = txsync ? tx_b_a[15:2] : tx_a_a[15:2];
- assign tx_b = txsync ? tx_b_b[15:2] : tx_a_b[15:2];
-`endif // `ifdef TX_ON
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Receive Side
-`ifdef RX_ON
- wire rx_sample_strobe,strobe_decim,hb_strobe;
- wire [15:0] bb_rx_i0,bb_rx_q0,bb_rx_i1,bb_rx_q1,
- bb_rx_i2,bb_rx_q2,bb_rx_i3,bb_rx_q3;
-
- wire loopback = settings[0];
- wire counter = settings[1];
-`ifdef COUNTER_32BIT_ON
- wire counter_32bit = settings[2];
-
- always @(posedge clk64)
- if(rx_dsp_reset)
- sample_counter_32bit <= #1 32'd0;
- else if(~enable_rx | reset_data)
- sample_counter_32bit <=#1 32'd0;
- else if(hb_strobe)
- sample_counter_32bit <=#1 sample_counter_32bit + 32'd1;
-`endif // `ifdef COUNTER_32BIT_ON
-
- always @(posedge clk64)
- if(rx_dsp_reset)
- debug_counter <= #1 16'd0;
- else if(~enable_rx)
- debug_counter <= #1 16'd0;
- else if(hb_strobe)
- debug_counter <=#1 debug_counter + 16'd2;
-
- always @(posedge clk64)
- if(strobe_interp)
- begin
- loopback_i_0 <= #1 ch0tx;
- loopback_q_0 <= #1 ch1tx;
- end
-
-`ifdef COUNTER_32BIT_ON
- assign ch0rx = counter_32bit?sample_counter_32bit[31:16]:counter ? debug_counter : loopback ? loopback_i_0 : bb_rx_i0;
- assign ch1rx = counter_32bit?sample_counter_32bit[15:0]:counter ? debug_counter + 16'd1 : loopback ? loopback_q_0 : bb_rx_q0;
- assign ch2rx = bb_rx_i1;
- assign ch3rx = bb_rx_q1;
- assign ch4rx = counter_32bit?bb_rx_i0:bb_rx_i2;
- assign ch5rx = counter_32bit?bb_rx_q0:bb_rx_q2;// If using counter replicate channels here to be able to get rx_i0 when using counter
- //This means if you use 4 channels that channel 3 will be replaced by channel 0
- // and channel 0 will output the 32 bit counter.
- assign ch6rx = bb_rx_i3;
- assign ch7rx = bb_rx_q3;
-`else
- assign ch0rx = counter ? debug_counter : loopback ? loopback_i_0 : bb_rx_i0;
- assign ch1rx = counter ? debug_counter + 16'd1 : loopback ? loopback_q_0 : bb_rx_q0;
- assign ch2rx = bb_rx_i1;
- assign ch3rx = bb_rx_q1;
- assign ch4rx = bb_rx_i2;
- assign ch5rx = bb_rx_q2;
- assign ch6rx = bb_rx_i3;
- assign ch7rx = bb_rx_q3;
-`endif // `ifdef COUNTER_32BIT_ON
-
-
- wire [15:0] ddc0_in_i,ddc0_in_q,ddc1_in_i,ddc1_in_q,ddc2_in_i,ddc2_in_q,ddc3_in_i,ddc3_in_q;
- adc_interface adc_interface(.clock(clk64),.reset(rx_dsp_reset),.enable(1'b1),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .rx_a_a(rx_a_a),.rx_b_a(rx_b_a),.rx_a_b(rx_a_b),.rx_b_b(rx_b_b),
- .ddc0_in_i(ddc0_in_i),.ddc0_in_q(ddc0_in_q),
- .ddc1_in_i(ddc1_in_i),.ddc1_in_q(ddc1_in_q),
- .ddc2_in_i(ddc2_in_i),.ddc2_in_q(ddc2_in_q),
- .ddc3_in_i(ddc3_in_i),.ddc3_in_q(ddc3_in_q),.rx_numchan(rx_numchan) );
-
- rx_buffer rx_buffer
- ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset | reset_data),
- .reset_regs(rx_dsp_reset),
- .usbdata(usbdata_out),.RD(RD),.have_pkt_rdy(have_pkt_rdy),.rx_overrun(rx_overrun),
- .channels(rx_numchan),
- .ch_0(ch0rx),.ch_1(ch1rx),
- .ch_2(ch2rx),.ch_3(ch3rx),
- .ch_4(ch4rx),.ch_5(ch5rx),
- .ch_6(ch6rx),.ch_7(ch7rx),
- .rxclk(clk64),.rxstrobe(hb_strobe),
- .clear_status(clear_status),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .debugbus(rx_debugbus) );
-
- `ifdef RX_EN_0
- rx_chain #(`FR_RX_FREQ_0,`FR_RX_PHASE_0) rx_chain_0
- ( .clock(clk64),.reset(reset_data),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(hb_strobe),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc0_in_i),.q_in(ddc0_in_q),.i_out(bb_rx_i0),.q_out(bb_rx_q0),.debugdata(debugdata),.debugctrl(debugctrl));
- `else
- assign bb_rx_i0=16'd0;
- assign bb_rx_q0=16'd0;
- `endif
-
- `ifdef RX_EN_1
- rx_chain #(`FR_RX_FREQ_1,`FR_RX_PHASE_1) rx_chain_1
- ( .clock(clk64),.reset(reset_data),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc1_in_i),.q_in(ddc1_in_q),.i_out(bb_rx_i1),.q_out(bb_rx_q1));
- `else
- assign bb_rx_i1=16'd0;
- assign bb_rx_q1=16'd0;
- `endif
-
- `ifdef RX_EN_2
- rx_chain #(`FR_RX_FREQ_2,`FR_RX_PHASE_2) rx_chain_2
- ( .clock(clk64),.reset(reset_data),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc2_in_i),.q_in(ddc2_in_q),.i_out(bb_rx_i2),.q_out(bb_rx_q2));
- `else
- assign bb_rx_i2=16'd0;
- assign bb_rx_q2=16'd0;
- `endif
-
- `ifdef RX_EN_3
- rx_chain #(`FR_RX_FREQ_3,`FR_RX_PHASE_3) rx_chain_3
- ( .clock(clk64),.reset(reset_data),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc3_in_i),.q_in(ddc3_in_q),.i_out(bb_rx_i3),.q_out(bb_rx_q3));
- assign bb_rx_i3=16'd0;
- assign bb_rx_q3=16'd0;
- `endif
-
-`endif // `ifdef RX_ON
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Control Functions
-
- wire [31:0] capabilities;
- assign capabilities[7] = `TX_CAP_HB;
- assign capabilities[6:4] = `TX_CAP_NCHAN;
- assign capabilities[3] = `RX_CAP_HB;
- assign capabilities[2:0] = `RX_CAP_NCHAN;
-
-
- serial_io serial_io
- ( .master_clk(clk64),.serial_clock(SCLK),.serial_data_in(SDI),
- .enable(SEN_FPGA),.reset(1'b0),.serial_data_out(SDO),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .readback_0({io_rx_a,io_tx_a}),.readback_1({io_rx_b,io_tx_b}),.readback_2(capabilities),.readback_3(32'hf0f0931a) );
-
- wire [15:0] reg_0,reg_1,reg_2,reg_3;
-
-`ifdef MULTI_ON
-
- master_control_multi master_control
- ( .master_clk(clk64),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .rx_slave_sync(io_rx_a[`bitnoFR_RX_SYNC_INPUT_IOPIN]),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .sync_rx(sync_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- //.debug_0(rx_a_a),.debug_1(ddc0_in_i),
- .debug_0(rx_debugbus),.debug_1(ddc0_in_i),
- .debug_2({rx_sample_strobe,strobe_decim,serial_strobe,serial_addr}),.debug_3({rx_dsp_reset,tx_dsp_reset,rx_bus_reset,tx_bus_reset,enable_rx,tx_underrun,rx_overrun,decim_rate}),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3) );
-
-`else //`ifdef MULTI_ON
-
- master_control master_control
- ( .master_clk(clk64),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- //.debug_0(rx_a_a),.debug_1(ddc0_in_i),
- .debug_0(rx_debugbus),.debug_1(ddc0_in_i),
- .debug_2({rx_sample_strobe,strobe_decim,serial_strobe,serial_addr}),.debug_3({rx_dsp_reset,tx_dsp_reset,rx_bus_reset,tx_bus_reset,enable_rx,tx_underrun,rx_overrun,decim_rate}),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3) );
-
-`endif //`ifdef MULTI_ON
-
- io_pins io_pins
- (.io_0(io_tx_a),.io_1(io_rx_a),.io_2(io_tx_b),.io_3(io_rx_b),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3),
- .clock(clk64),.rx_reset(rx_dsp_reset),.tx_reset(tx_dsp_reset),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Misc Settings
- setting_reg #(`FR_MODE) sr_misc(.clock(clk64),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(settings));
-
-endmodule // usrp_multi
diff --git a/usrp/fpga/toplevel/usrp_std/.gitignore b/usrp/fpga/toplevel/usrp_std/.gitignore
deleted file mode 100644
index 31d6ea9ef..000000000
--- a/usrp/fpga/toplevel/usrp_std/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/*.qws
-/*.eqn
-/*.done
-/*.htm
-/*.rpt
-/*.ini
-/*.fsf
-/*.jam
-/*.jbc
-/*.pin
-/*.pof
-/*.sof
-/*.rbf
-/*.ttf
-/*.summary
-/prev*
-/db
diff --git a/usrp/fpga/toplevel/usrp_std/config.vh b/usrp/fpga/toplevel/usrp_std/config.vh
deleted file mode 100644
index f1f8ec40e..000000000
--- a/usrp/fpga/toplevel/usrp_std/config.vh
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2006,2007 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// ====================================================================
-// User control over what parts get included
-//
-// >>>> EDIT ONLY THIS SECTION <<<<
-// Uncomment only ONE configuration
-// ====================================================================
-
-// ====================================================================
-// FIXME drive configuration selection from the command line and/or gui
-// ====================================================================
-
-// Uncomment this for 1 rx channel (w/ halfband) & 1 transmit channel
-//`include "../include/common_config_1rxhb_1tx.vh"
-
-// Uncomment this for 2 rx channels (w/ halfband) & 2 transmit channels
- `include "../include/common_config_2rxhb_2tx.vh"
-
-// Uncomment this for 4 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_4rx_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/ halfband) & 0 transmit channels
-//`include "../include/common_config_2rxhb_0tx.vh"
-
-// Uncomment this for multi with 2 rx channels (w/o halfband) & 0 transmit channels
-//`include "../include/common_config_2rx_0tx.vh"
-
-// Add other "known to fit" configurations here...
-
-// ====================================================================
-// Now include the common footer
-// ====================================================================
- `include "../include/common_config_bottom.vh"
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.csf b/usrp/fpga/toplevel/usrp_std/usrp_std.csf
deleted file mode 100644
index 627197caf..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.csf
+++ /dev/null
@@ -1,444 +0,0 @@
-COMPILER_SETTINGS
-{
- IO_PLACEMENT_OPTIMIZATION = OFF;
- ENABLE_DRC_SETTINGS = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_RETIMING = OFF;
- PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION = OFF;
- PHYSICAL_SYNTHESIS_COMBO_LOGIC = OFF;
- DRC_FANOUT_EXCEEDING = 30;
- DRC_REPORT_FANOUT_EXCEEDING = OFF;
- DRC_TOP_FANOUT = 50;
- DRC_REPORT_TOP_FANOUT = OFF;
- RUN_DRC_DURING_COMPILATION = OFF;
- ADV_NETLIST_OPT_RETIME_CORE_AND_IO = ON;
- ADV_NETLIST_OPT_SYNTH_USE_FITTER_INFO = OFF;
- ADV_NETLIST_OPT_SYNTH_GATE_RETIME = OFF;
- ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP = OFF;
- SMART_COMPILE_IGNORES_TDC_FOR_STRATIX_PLL_CHANGES = OFF;
- MERGE_HEX_FILE = OFF;
- TRUE_WYSIWYG_FLOW = OFF;
- SEED = 1;
- FINAL_PLACEMENT_OPTIMIZATION = AUTOMATICALLY;
- FAMILY = Cyclone;
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "LOWER TO 1ESB UPPER TO 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_OUTPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA1 = "DPRAM0 TO 1 DPRAM1 TO 2";
- DPRAM_32BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_8BIT_16BIT_SINGLE_PORT_MODE_INPUT_EPXA1 = "MEGALAB COLUMN 1";
- DPRAM_DUAL_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_OTHER_SIGNALS_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DEEP_MODE_OTHER_SIGNALS_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_SINGLE_PORT_MODE_OUTPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4ESB";
- DPRAM_WIDE_MODE_OUTPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4ESB";
- DPRAM_DEEP_MODE_OUTPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_DUAL_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_SINGLE_PORT_MODE_INPUT_EPXA4_10 = "DPRAM0 TO 3 DPRAM1 TO 4";
- DPRAM_WIDE_MODE_INPUT_EPXA4_10 = "LOWER TO 3 UPPER TO 4";
- DPRAM_DEEP_MODE_INPUT_EPXA4_10 = "MEGALAB COLUMN 3";
- DPRAM_OTHER_SIGNALS_EPXA4_10 = "DEFAULT OTHER ROUTING OPTIONS";
- DPRAM_OUTPUT_EPXA4_10 = "DEFAULT OUTPUT ROUTING OPTIONS";
- DPRAM_INPUT_EPXA4_10 = "DEFAULT INPUT ROUTING OPTIONS";
- STRIPE_TO_PLD_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PLD_TO_STRIPE_INTERRUPTS_EPXA4_10 = "MEGALAB COLUMN 2";
- PROCESSOR_DEBUG_EXTENSIONS_EPXA4_10 = "MEGALAB COLUMN 2";
- STRIPE_TO_PLD_BRIDGE_EPXA4_10 = "MEGALAB COLUMN 1";
- FAST_FIT_COMPILATION = OFF;
- SIGNALPROBE_DURING_NORMAL_COMPILATION = OFF;
- OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING = ON;
- OPTIMIZE_TIMING = "NORMAL COMPILATION";
- OPTIMIZE_HOLD_TIMING = OFF;
- COMPILATION_LEVEL = FULL;
- SAVE_DISK_SPACE = OFF;
- SPEED_DISK_USAGE_TRADEOFF = NORMAL;
- LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT = OFF;
- SIGNALPROBE_ALLOW_OVERUSE = OFF;
- FOCUS_ENTITY_NAME = |usrp_std;
- ROUTING_BACK_ANNOTATION_MODE = OFF;
- INC_PLC_MODE = OFF;
- FIT_ONLY_ONE_ATTEMPT = OFF;
-}
-DEFAULT_DEVICE_OPTIONS
-{
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_SVF_FILE = OFF;
- RESERVE_PIN = "AS INPUT TRI-STATED";
- RESERVE_ALL_UNUSED_PINS = "AS OUTPUT DRIVING GROUND";
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- HEXOUT_FILE_START_ADDRESS = 0;
- GENERATE_HEX_FILE = OFF;
- GENERATE_RBF_FILE = OFF;
- GENERATE_TTF_FILE = OFF;
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- USE_CONFIGURATION_DEVICE = ON;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- AUTO_RESTART_CONFIGURATION = OFF;
- ENABLE_VREFB_PIN = OFF;
- ENABLE_VREFA_PIN = OFF;
- SECURITY_BIT = OFF;
- USER_START_UP_CLOCK = OFF;
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "ACTIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_UPDATE_MODE = STANDARD;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- CONFIGURATION_CLOCK_DIVISOR = 1;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CLOCK_SOURCE = INTERNAL;
- COMPRESSION_MODE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
-}
-AUTO_SLD_HUB_ENTITY
-{
- AUTO_INSERT_SLD_HUB_ENTITY = ENABLE;
- HUB_INSTANCE_NAME = SLD_HUB_INST;
- HUB_ENTITY_NAME = SLD_HUB;
-}
-SIGNALTAP_LOGIC_ANALYZER_SETTINGS
-{
- ENABLE_SIGNALTAP = Off;
- AUTO_ENABLE_SMART_COMPILE = On;
-}
-CHIP(usrp_std)
-{
- DEVICE = EP1C12Q240C8;
- DEVICE_FILTER_PACKAGE = "ANY QFP";
- DEVICE_FILTER_PIN_COUNT = 240;
- DEVICE_FILTER_SPEED_GRADE = ANY;
- AUTO_RESTART_CONFIGURATION = OFF;
- RELEASE_CLEARS_BEFORE_TRI_STATES = OFF;
- USER_START_UP_CLOCK = OFF;
- ENABLE_DEVICE_WIDE_RESET = OFF;
- ENABLE_DEVICE_WIDE_OE = OFF;
- ENABLE_INIT_DONE_OUTPUT = OFF;
- FLEX10K_ENABLE_LOCK_OUTPUT = OFF;
- ENABLE_JTAG_BST_SUPPORT = OFF;
- MAX7000_ENABLE_JTAG_BST_SUPPORT = ON;
- APEX20K_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_JTAG_USER_CODE = 7F;
- MAX7000_JTAG_USER_CODE = FFFFFFFF;
- MAX7000S_JTAG_USER_CODE = FFFF;
- STRATIX_JTAG_USER_CODE = FFFFFFFF;
- APEX20K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- MERCURY_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX6K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- FLEX10K_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- EXCALIBUR_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- APEXII_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- STRATIX_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- CYCLONE_CONFIGURATION_SCHEME = "PASSIVE SERIAL";
- USE_CONFIGURATION_DEVICE = OFF;
- APEX20K_CONFIGURATION_DEVICE = AUTO;
- MERCURY_CONFIGURATION_DEVICE = AUTO;
- FLEX6K_CONFIGURATION_DEVICE = AUTO;
- FLEX10K_CONFIGURATION_DEVICE = AUTO;
- EXCALIBUR_CONFIGURATION_DEVICE = AUTO;
- STRATIX_CONFIGURATION_DEVICE = AUTO;
- CYCLONE_CONFIGURATION_DEVICE = AUTO;
- STRATIX_UPDATE_MODE = STANDARD;
- APEX20K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- MERCURY_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- FLEX10K_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- STRATIX_CONFIG_DEVICE_JTAG_USER_CODE = FFFFFFFF;
- AUTO_INCREMENT_CONFIG_DEVICE_JTAG_USER_CODE = ON;
- DISABLE_NCS_AND_OE_PULLUPS_ON_CONFIG_DEVICE = OFF;
- COMPRESSION_MODE = OFF;
- ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- FLEX6K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = OFF;
- FLEX10K_ENABLE_LOW_VOLTAGE_MODE_ON_CONFIG_DEVICE = ON;
- EPROM_USE_CHECKSUM_AS_USERCODE = OFF;
- USE_CHECKSUM_AS_USERCODE = OFF;
- MAX7000_USE_CHECKSUM_AS_USERCODE = OFF;
- GENERATE_TTF_FILE = OFF;
- GENERATE_RBF_FILE = ON;
- GENERATE_HEX_FILE = OFF;
- SECURITY_BIT = OFF;
- ENABLE_VREFA_PIN = OFF;
- ENABLE_VREFB_PIN = OFF;
- GENERATE_SVF_FILE = OFF;
- GENERATE_ISC_FILE = OFF;
- GENERATE_JAM_FILE = OFF;
- GENERATE_JBC_FILE = OFF;
- GENERATE_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_SVF_FILE = OFF;
- GENERATE_CONFIG_ISC_FILE = OFF;
- GENERATE_CONFIG_JAM_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE = OFF;
- GENERATE_CONFIG_JBC_FILE_COMPRESSED = ON;
- GENERATE_CONFIG_HEXOUT_FILE = OFF;
- ON_CHIP_BITSTREAM_DECOMPRESSION = OFF;
- BASE_PIN_OUT_FILE_ON_SAMEFRAME_DEVICE = OFF;
- HEXOUT_FILE_START_ADDRESS = 0;
- HEXOUT_FILE_COUNT_DIRECTION = UP;
- RESERVE_ALL_UNUSED_PINS = "AS INPUT TRI-STATED";
- STRATIX_DEVICE_IO_STANDARD = LVTTL;
- CLOCK_SOURCE = INTERNAL;
- CONFIGURATION_CLOCK_FREQUENCY = "10 MHZ";
- CONFIGURATION_CLOCK_DIVISOR = 1;
- RESERVE_NWS_NRS_NCS_CS_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_RDYNBUSY_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA7_THROUGH_DATA1_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_DATA0_AFTER_CONFIGURATION = "AS INPUT TRI-STATED";
- RESERVE_NCEO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- RESERVE_ASDO_AFTER_CONFIGURATION = "USE AS REGULAR IO";
- SCLK : LOCATION = Pin_101;
- SDI : LOCATION = Pin_100;
- SEN : LOCATION = Pin_98;
- SLD : LOCATION = Pin_95;
- adc1_data[0] : LOCATION = Pin_5;
- adc1_data[10] : LOCATION = Pin_235;
- adc1_data[11] : LOCATION = Pin_234;
- adc1_data[1] : LOCATION = Pin_4;
- adc1_data[2] : LOCATION = Pin_3;
- adc1_data[3] : LOCATION = Pin_2;
- adc1_data[4] : LOCATION = Pin_1;
- adc1_data[4] : IO_STANDARD = LVTTL;
- adc1_data[5] : LOCATION = Pin_240;
- adc1_data[6] : LOCATION = Pin_239;
- adc1_data[7] : LOCATION = Pin_238;
- adc1_data[8] : LOCATION = Pin_237;
- adc1_data[9] : LOCATION = Pin_236;
- adc2_data[0] : LOCATION = Pin_20;
- adc2_data[10] : LOCATION = Pin_8;
- adc2_data[11] : LOCATION = Pin_7;
- adc2_data[1] : LOCATION = Pin_19;
- adc2_data[2] : LOCATION = Pin_18;
- adc2_data[3] : LOCATION = Pin_17;
- adc2_data[4] : LOCATION = Pin_16;
- adc2_data[5] : LOCATION = Pin_15;
- adc2_data[6] : LOCATION = Pin_14;
- adc2_data[7] : LOCATION = Pin_13;
- adc2_data[8] : LOCATION = Pin_12;
- adc2_data[9] : LOCATION = Pin_11;
- adc3_data[0] : LOCATION = Pin_200;
- adc3_data[10] : LOCATION = Pin_184;
- adc3_data[11] : LOCATION = Pin_183;
- adc3_data[1] : LOCATION = Pin_197;
- adc3_data[2] : LOCATION = Pin_196;
- adc3_data[3] : LOCATION = Pin_195;
- adc3_data[4] : LOCATION = Pin_194;
- adc3_data[5] : LOCATION = Pin_193;
- adc3_data[6] : LOCATION = Pin_188;
- adc3_data[7] : LOCATION = Pin_187;
- adc3_data[8] : LOCATION = Pin_186;
- adc3_data[9] : LOCATION = Pin_185;
- adc4_data[0] : LOCATION = Pin_222;
- adc4_data[10] : LOCATION = Pin_203;
- adc4_data[11] : LOCATION = Pin_202;
- adc4_data[1] : LOCATION = Pin_219;
- adc4_data[2] : LOCATION = Pin_217;
- adc4_data[3] : LOCATION = Pin_216;
- adc4_data[4] : LOCATION = Pin_215;
- adc4_data[5] : LOCATION = Pin_214;
- adc4_data[6] : LOCATION = Pin_213;
- adc4_data[7] : LOCATION = Pin_208;
- adc4_data[8] : LOCATION = Pin_207;
- adc4_data[9] : LOCATION = Pin_206;
- adc_oeb[0] : LOCATION = Pin_228;
- adc_oeb[1] : LOCATION = Pin_21;
- adc_oeb[2] : LOCATION = Pin_181;
- adc_oeb[3] : LOCATION = Pin_218;
- adc_otr[0] : LOCATION = Pin_233;
- adc_otr[1] : LOCATION = Pin_6;
- adc_otr[2] : LOCATION = Pin_182;
- adc_otr[3] : LOCATION = Pin_201;
- adclk0 : LOCATION = Pin_224;
- adclk1 : LOCATION = Pin_226;
- clk0 : LOCATION = Pin_28;
- clk0 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk0 : IO_STANDARD = LVTTL;
- clk1 : LOCATION = Pin_29;
- clk1 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk1 : IO_STANDARD = LVTTL;
- clk3 : LOCATION = Pin_152;
- clk3 : RESERVE_PIN = "AS INPUT TRI-STATED";
- clk3 : IO_STANDARD = LVTTL;
- clk_120mhz : LOCATION = Pin_153;
- clk_120mhz : IO_STANDARD = LVTTL;
- clk_out : LOCATION = Pin_63;
- clk_out : IO_STANDARD = LVTTL;
- dac1_data[0] : LOCATION = Pin_165;
- dac1_data[10] : LOCATION = Pin_177;
- dac1_data[11] : LOCATION = Pin_178;
- dac1_data[12] : LOCATION = Pin_179;
- dac1_data[13] : LOCATION = Pin_180;
- dac1_data[1] : LOCATION = Pin_166;
- dac1_data[2] : LOCATION = Pin_167;
- dac1_data[3] : LOCATION = Pin_168;
- dac1_data[4] : LOCATION = Pin_169;
- dac1_data[5] : LOCATION = Pin_170;
- dac1_data[6] : LOCATION = Pin_173;
- dac1_data[7] : LOCATION = Pin_174;
- dac1_data[8] : LOCATION = Pin_175;
- dac1_data[9] : LOCATION = Pin_176;
- dac2_data[0] : LOCATION = Pin_159;
- dac2_data[10] : LOCATION = Pin_163;
- dac2_data[11] : LOCATION = Pin_139;
- dac2_data[12] : LOCATION = Pin_164;
- dac2_data[13] : LOCATION = Pin_138;
- dac2_data[1] : LOCATION = Pin_158;
- dac2_data[2] : LOCATION = Pin_160;
- dac2_data[3] : LOCATION = Pin_156;
- dac2_data[4] : LOCATION = Pin_161;
- dac2_data[5] : LOCATION = Pin_144;
- dac2_data[6] : LOCATION = Pin_162;
- dac2_data[7] : LOCATION = Pin_141;
- dac2_data[8] : LOCATION = Pin_143;
- dac2_data[9] : LOCATION = Pin_140;
- dac3_data[0] : LOCATION = Pin_122;
- dac3_data[10] : LOCATION = Pin_134;
- dac3_data[11] : LOCATION = Pin_135;
- dac3_data[12] : LOCATION = Pin_136;
- dac3_data[13] : LOCATION = Pin_137;
- dac3_data[1] : LOCATION = Pin_123;
- dac3_data[2] : LOCATION = Pin_124;
- dac3_data[3] : LOCATION = Pin_125;
- dac3_data[4] : LOCATION = Pin_126;
- dac3_data[5] : LOCATION = Pin_127;
- dac3_data[6] : LOCATION = Pin_128;
- dac3_data[7] : LOCATION = Pin_131;
- dac3_data[8] : LOCATION = Pin_132;
- dac3_data[9] : LOCATION = Pin_133;
- dac4_data[0] : LOCATION = Pin_104;
- dac4_data[10] : LOCATION = Pin_118;
- dac4_data[11] : LOCATION = Pin_119;
- dac4_data[12] : LOCATION = Pin_120;
- dac4_data[13] : LOCATION = Pin_121;
- dac4_data[1] : LOCATION = Pin_105;
- dac4_data[2] : LOCATION = Pin_106;
- dac4_data[3] : LOCATION = Pin_107;
- dac4_data[4] : LOCATION = Pin_108;
- dac4_data[5] : LOCATION = Pin_113;
- dac4_data[6] : LOCATION = Pin_114;
- dac4_data[7] : LOCATION = Pin_115;
- dac4_data[8] : LOCATION = Pin_116;
- dac4_data[9] : LOCATION = Pin_117;
- enable_rx : LOCATION = Pin_88;
- enable_tx : LOCATION = Pin_93;
- gndbus[0] : LOCATION = Pin_223;
- gndbus[0] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[0] : IO_STANDARD = LVTTL;
- gndbus[1] : LOCATION = Pin_225;
- gndbus[1] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[1] : IO_STANDARD = LVTTL;
- gndbus[2] : LOCATION = Pin_227;
- gndbus[2] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[2] : IO_STANDARD = LVTTL;
- gndbus[3] : LOCATION = Pin_62;
- gndbus[3] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[3] : IO_STANDARD = LVTTL;
- gndbus[4] : LOCATION = Pin_64;
- gndbus[4] : RESERVE_PIN = "AS INPUT TRI-STATED";
- gndbus[4] : IO_STANDARD = LVTTL;
- misc_pins[0] : LOCATION = Pin_87;
- misc_pins[0] : IO_STANDARD = LVTTL;
- misc_pins[10] : LOCATION = Pin_76;
- misc_pins[10] : IO_STANDARD = LVTTL;
- misc_pins[11] : LOCATION = Pin_74;
- misc_pins[11] : IO_STANDARD = LVTTL;
- misc_pins[1] : LOCATION = Pin_86;
- misc_pins[1] : IO_STANDARD = LVTTL;
- misc_pins[2] : LOCATION = Pin_85;
- misc_pins[2] : IO_STANDARD = LVTTL;
- misc_pins[3] : LOCATION = Pin_84;
- misc_pins[3] : IO_STANDARD = LVTTL;
- misc_pins[4] : LOCATION = Pin_83;
- misc_pins[4] : IO_STANDARD = LVTTL;
- misc_pins[5] : LOCATION = Pin_82;
- misc_pins[5] : IO_STANDARD = LVTTL;
- misc_pins[6] : LOCATION = Pin_79;
- misc_pins[6] : IO_STANDARD = LVTTL;
- misc_pins[7] : LOCATION = Pin_78;
- misc_pins[7] : IO_STANDARD = LVTTL;
- misc_pins[8] : LOCATION = Pin_77;
- misc_pins[8] : IO_STANDARD = LVTTL;
- misc_pins[9] : LOCATION = Pin_75;
- misc_pins[9] : IO_STANDARD = LVTTL;
- reset : LOCATION = Pin_94;
- usbclk : LOCATION = Pin_55;
- usbctl[0] : LOCATION = Pin_56;
- usbctl[1] : LOCATION = Pin_54;
- usbctl[2] : LOCATION = Pin_53;
- usbctl[3] : LOCATION = Pin_58;
- usbctl[4] : LOCATION = Pin_57;
- usbctl[5] : LOCATION = Pin_44;
- usbdata[0] : LOCATION = Pin_73;
- usbdata[10] : LOCATION = Pin_41;
- usbdata[11] : LOCATION = Pin_39;
- usbdata[12] : LOCATION = Pin_38;
- usbdata[12] : IO_STANDARD = LVTTL;
- usbdata[13] : LOCATION = Pin_37;
- usbdata[14] : LOCATION = Pin_24;
- usbdata[15] : LOCATION = Pin_23;
- usbdata[1] : LOCATION = Pin_68;
- usbdata[2] : LOCATION = Pin_67;
- usbdata[3] : LOCATION = Pin_66;
- usbdata[4] : LOCATION = Pin_65;
- usbdata[5] : LOCATION = Pin_61;
- usbdata[6] : LOCATION = Pin_60;
- usbdata[7] : LOCATION = Pin_59;
- usbdata[8] : LOCATION = Pin_43;
- usbdata[9] : LOCATION = Pin_42;
- usbrdy[0] : LOCATION = Pin_45;
- usbrdy[1] : LOCATION = Pin_46;
- usbrdy[2] : LOCATION = Pin_47;
- usbrdy[3] : LOCATION = Pin_48;
- usbrdy[4] : LOCATION = Pin_49;
- usbrdy[5] : LOCATION = Pin_50;
- clear_status : LOCATION = Pin_99;
-}
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.esf b/usrp/fpga/toplevel/usrp_std/usrp_std.esf
deleted file mode 100644
index b88c15994..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.esf
+++ /dev/null
@@ -1,14 +0,0 @@
-SIMULATOR_SETTINGS
-{
- ESTIMATE_POWER_CONSUMPTION = OFF;
- GLITCH_INTERVAL = 1NS;
- GLITCH_DETECTION = OFF;
- SIMULATION_COVERAGE = ON;
- CHECK_OUTPUTS = OFF;
- SETUP_HOLD_DETECTION = OFF;
- POWER_ESTIMATION_START_TIME = "0 NS";
- ADD_DEFAULT_PINS_TO_SIMULATION_OUTPUT_WAVEFORMS = ON;
- SIMULATION_MODE = TIMING;
- START_TIME = 0NS;
- USE_COMPILER_SETTINGS = usrp_std;
-}
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.psf b/usrp/fpga/toplevel/usrp_std/usrp_std.psf
deleted file mode 100644
index 506c81b6a..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.psf
+++ /dev/null
@@ -1,312 +0,0 @@
-DEFAULT_DESIGN_ASSISTANT_SETTINGS
-{
- HCPY_ALOAD_SIGNALS = OFF;
- HCPY_VREF_PINS = OFF;
- HCPY_CAT = OFF;
- HCPY_ILLEGAL_HC_DEV_PKG = OFF;
- ACLK_RULE_IMSZER_ADOMAIN = OFF;
- ACLK_RULE_SZER_BTW_ACLK_DOMAIN = OFF;
- ACLK_RULE_NO_SZER_ACLK_DOMAIN = OFF;
- ACLK_CAT = OFF;
- SIGNALRACE_RULE_ASYNCHPIN_SYNCH_CLKPIN = OFF;
- SIGNALRACE_CAT = OFF;
- NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED = OFF;
- NONSYNCHSTRUCT_RULE_SRLATCH = OFF;
- NONSYNCHSTRUCT_RULE_DLATCH = OFF;
- NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR = OFF;
- NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN = OFF;
- NONSYNCHSTRUCT_RULE_RIPPLE_CLK = OFF;
- NONSYNCHSTRUCT_RULE_DELAY_CHAIN = OFF;
- NONSYNCHSTRUCT_RULE_REG_LOOP = OFF;
- NONSYNCHSTRUCT_RULE_COMBLOOP = OFF;
- NONSYNCHSTRUCT_CAT = OFF;
- NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE = OFF;
- TIMING_RULE_COIN_CLKEDGE = OFF;
- TIMING_RULE_SHIFT_REG = OFF;
- TIMING_RULE_HIGH_FANOUTS = OFF;
- TIMING_CAT = OFF;
- RESET_RULE_ALL = OFF;
- RESET_RULE_IMSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_UNSYNCH_ASYNCH_DOMAIN = OFF;
- RESET_RULE_REG_ASNYCH = OFF;
- RESET_RULE_COMB_ASYNCH_RESET = OFF;
- RESET_RULE_IMSYNCH_EXRESET = OFF;
- RESET_RULE_UNSYNCH_EXRESET = OFF;
- RESET_RULE_INPINS_RESETNET = OFF;
- RESET_CAT = OFF;
- CLK_RULE_ALL = OFF;
- CLK_RULE_MIX_EDGES = OFF;
- CLK_RULE_CLKNET_CLKSPINES = OFF;
- CLK_RULE_INPINS_CLKNET = OFF;
- CLK_RULE_GATING_SCHEME = OFF;
- CLK_RULE_INV_CLOCK = OFF;
- CLK_RULE_COMB_CLOCK = OFF;
- CLK_CAT = OFF;
- HCPY_EXCEED_USER_IO_USAGE = OFF;
- HCPY_EXCEED_RAM_USAGE = OFF;
- NONSYNCHSTRUCT_RULE_ASYN_RAM = OFF;
- SIGNALRACE_RULE_TRISTATE = OFF;
- ASSG_RULE_MISSING_TIMING = OFF;
- ASSG_RULE_MISSING_FMAX = OFF;
- ASSG_CAT = OFF;
-}
-SYNTHESIS_FITTING_SETTINGS
-{
- AUTO_SHIFT_REGISTER_RECOGNITION = ON;
- AUTO_DSP_RECOGNITION = ON;
- AUTO_RAM_RECOGNITION = ON;
- REMOVE_DUPLICATE_LOGIC = ON;
- AUTO_TURBO_BIT = ON;
- AUTO_MERGE_PLLS = ON;
- AUTO_OPEN_DRAIN_PINS = ON;
- AUTO_PARALLEL_EXPANDERS = ON;
- AUTO_FAST_OUTPUT_ENABLE_REGISTERS = OFF;
- AUTO_FAST_OUTPUT_REGISTERS = OFF;
- AUTO_FAST_INPUT_REGISTERS = OFF;
- AUTO_CASCADE_CHAINS = ON;
- AUTO_CARRY_CHAINS = ON;
- AUTO_DELAY_CHAINS = ON;
- MAX7000_PARALLEL_EXPANDER_CHAIN_LENGTH = 4;
- PARALLEL_EXPANDER_CHAIN_LENGTH = 16;
- CASCADE_CHAIN_LENGTH = 2;
- STRATIX_CARRY_CHAIN_LENGTH = 70;
- MERCURY_CARRY_CHAIN_LENGTH = 48;
- FLEX10K_CARRY_CHAIN_LENGTH = 32;
- FLEX6K_CARRY_CHAIN_LENGTH = 32;
- CARRY_CHAIN_LENGTH = 48;
- CARRY_OUT_PINS_LCELL_INSERT = ON;
- NORMAL_LCELL_INSERT = ON;
- AUTO_LCELL_INSERTION = ON;
- ALLOW_XOR_GATE_USAGE = ON;
- AUTO_PACKED_REGISTERS_STRATIX = NORMAL;
- AUTO_PACKED_REGISTERS = OFF;
- AUTO_PACKED_REG_CYCLONE = NORMAL;
- FLEX10K_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX6K_OPTIMIZATION_TECHNIQUE = AREA;
- MERCURY_OPTIMIZATION_TECHNIQUE = AREA;
- APEX20K_OPTIMIZATION_TECHNIQUE = SPEED;
- MAX7000_OPTIMIZATION_TECHNIQUE = SPEED;
- STRATIX_OPTIMIZATION_TECHNIQUE = SPEED;
- CYCLONE_OPTIMIZATION_TECHNIQUE = AREA;
- FLEX10K_TECHNOLOGY_MAPPER = LUT;
- FLEX6K_TECHNOLOGY_MAPPER = LUT;
- MERCURY_TECHNOLOGY_MAPPER = LUT;
- APEX20K_TECHNOLOGY_MAPPER = LUT;
- MAX7000_TECHNOLOGY_MAPPER = "PRODUCT TERM";
- STRATIX_TECHNOLOGY_MAPPER = LUT;
- AUTO_IMPLEMENT_IN_ROM = OFF;
- AUTO_GLOBAL_MEMORY_CONTROLS = OFF;
- AUTO_GLOBAL_REGISTER_CONTROLS = ON;
- AUTO_GLOBAL_OE = ON;
- AUTO_GLOBAL_CLOCK = ON;
- USE_LPM_FOR_AHDL_OPERATORS = ON;
- LIMIT_AHDL_INTEGERS_TO_32_BITS = OFF;
- ENABLE_BUS_HOLD_CIRCUITRY = OFF;
- WEAK_PULL_UP_RESISTOR = OFF;
- TURBO_BIT = ON;
- MAX7000_IGNORE_SOFT_BUFFERS = OFF;
- IGNORE_SOFT_BUFFERS = ON;
- MAX7000_IGNORE_LCELL_BUFFERS = AUTO;
- IGNORE_LCELL_BUFFERS = OFF;
- IGNORE_ROW_GLOBAL_BUFFERS = OFF;
- IGNORE_GLOBAL_BUFFERS = OFF;
- IGNORE_CASCADE_BUFFERS = OFF;
- IGNORE_CARRY_BUFFERS = OFF;
- REMOVE_DUPLICATE_REGISTERS = ON;
- REMOVE_REDUNDANT_LOGIC_CELLS = OFF;
- ALLOW_POWER_UP_DONT_CARE = ON;
- PCI_IO = OFF;
- NOT_GATE_PUSH_BACK = ON;
- SLOW_SLEW_RATE = OFF;
- DSP_BLOCK_BALANCING = AUTO;
- STATE_MACHINE_PROCESSING = AUTO;
-}
-DEFAULT_HARDCOPY_SETTINGS
-{
- HARDCOPY_EXTERNAL_CLOCK_JITTER = "0.0 NS";
-}
-DEFAULT_TIMING_REQUIREMENTS
-{
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- RUN_ALL_TIMING_ANALYSES = ON;
- IGNORE_CLOCK_SETTINGS = OFF;
- DEFAULT_HOLD_MULTICYCLE = "SAME AS MULTICYCLE";
- CUT_OFF_IO_PIN_FEEDBACK = ON;
- CUT_OFF_CLEAR_AND_PRESET_PATHS = ON;
- CUT_OFF_READ_DURING_WRITE_PATHS = ON;
- CUT_OFF_PATHS_BETWEEN_CLOCK_DOMAINS = ON;
- DO_MIN_ANALYSIS = ON;
- DO_MIN_TIMING = OFF;
- NUMBER_OF_PATHS_TO_REPORT = 200;
- NUMBER_OF_DESTINATION_TO_REPORT = 10;
- NUMBER_OF_SOURCES_PER_DESTINATION_TO_REPORT = 10;
- MAX_SCC_SIZE = 50;
-}
-HDL_SETTINGS
-{
- VERILOG_INPUT_VERSION = VERILOG_2001;
- ENABLE_IP_DEBUG = OFF;
- VHDL_INPUT_VERSION = VHDL93;
- VHDL_SHOW_LMF_MAPPING_MESSAGES = OFF;
-}
-PROJECT_INFO(usrp_std)
-{
- ORIGINAL_QUARTUS_VERSION = 3.0;
- PROJECT_CREATION_TIME_DATE = "00:14:04 JULY 13, 2003";
- LAST_QUARTUS_VERSION = 3.0;
- SHOW_REGISTRATION_MESSAGE = ON;
- USER_LIBRARIES = "e:\usrp\fpga\megacells";
-}
-THIRD_PARTY_EDA_TOOLS(usrp_std)
-{
- EDA_DESIGN_ENTRY_SYNTHESIS_TOOL = "<NONE>";
- EDA_SIMULATION_TOOL = "<NONE>";
- EDA_TIMING_ANALYSIS_TOOL = "<NONE>";
- EDA_BOARD_DESIGN_TOOL = "<NONE>";
- EDA_FORMAL_VERIFICATION_TOOL = "<NONE>";
- EDA_RESYNTHESIS_TOOL = "<NONE>";
-}
-EDA_TOOL_SETTINGS(eda_design_synthesis)
-{
- EDA_INPUT_GND_NAME = GND;
- EDA_INPUT_VCC_NAME = VCC;
- EDA_SHOW_LMF_MAPPING_MESSAGES = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_INPUT_DATA_FORMAT = EDIF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_simulation)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_timing_analysis)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- EDA_LAUNCH_CMD_LINE_TOOL = OFF;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_board_design)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_formal_verification)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- RESYNTHESIS_RETIMING = FULL;
-}
-EDA_TOOL_SETTINGS(eda_palace)
-{
- EDA_INCLUDE_VHDL_CONFIGURATION_DECLARATION = OFF;
- EDA_TRUNCATE_LONG_HIERARCHY_PATHS = OFF;
- EDA_MAINTAIN_DESIGN_HIERARCHY = OFF;
- EDA_WRITE_DEVICE_CONTROL_PORTS = OFF;
- EDA_GENERATE_FUNCTIONAL_NETLIST = OFF;
- EDA_FLATTEN_BUSES = OFF;
- EDA_MAP_ILLEGAL_CHARACTERS = OFF;
- EDA_EXCALIBUR_ATOMS_AS_SINGLE_STRIPE = OFF;
- EDA_RUN_TOOL_AUTOMATICALLY = OFF;
- EDA_OUTPUT_DATA_FORMAT = NONE;
- RESYNTHESIS_RETIMING = FULL;
- RESYNTHESIS_PHYSICAL_SYNTHESIS = NORMAL;
- RESYNTHESIS_OPTIMIZATION_EFFORT = NORMAL;
- USE_GENERATED_PHYSICAL_CONSTRAINTS = ON;
-}
-CLOCK(clk_120mhz)
-{
- FMAX_REQUIREMENT = "120.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(usbclk)
-{
- FMAX_REQUIREMENT = "48.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(SCLK)
-{
- FMAX_REQUIREMENT = "1.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk0)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
-CLOCK(adclk1)
-{
- FMAX_REQUIREMENT = "60.0 MHz";
- INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS = OFF;
- DUTY_CYCLE = 50;
- DIVIDE_BASE_CLOCK_PERIOD_BY = 1;
- MULTIPLY_BASE_CLOCK_PERIOD_BY = 1;
- INVERT_BASE_CLOCK = OFF;
-}
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.qpf b/usrp/fpga/toplevel/usrp_std/usrp_std.qpf
deleted file mode 100644
index e8b27505c..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.qpf
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 1991-2004 Altera Corporation
-# Any megafunction design, and related netlist (encrypted or decrypted),
-# support information, device programming or simulation file, and any other
-# associated documentation or information provided by Altera or a partner
-# under Altera's Megafunction Partnership Program may be used only
-# to program PLD devices (but not masked PLD devices) from Altera. Any
-# other use of such megafunction design, netlist, support information,
-# device programming or simulation file, or any other related documentation
-# or information is prohibited for any other purpose, including, but not
-# limited to modification, reverse engineering, de-compiling, or use with
-# any other silicon devices, unless such use is explicitly licensed under
-# a separate agreement with Altera or a megafunction partner. Title to the
-# intellectual property, including patents, copyrights, trademarks, trade
-# secrets, or maskworks, embodied in any such megafunction design, netlist,
-# support information, device programming or simulation file, or any other
-# related documentation or information provided by Altera or a megafunction
-# partner, remains with Altera, the megafunction partner, or their respective
-# licensors. No other licenses, including any licenses needed under any third
-# party's intellectual property, are provided herein.
-
-
-
-QUARTUS_VERSION = "4.0"
-DATE = "17:10:11 December 20, 2004"
-
-
-# Active Revisions
-
-PROJECT_REVISION = "usrp_std"
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.qsf b/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
deleted file mode 100644
index e0bac4893..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
+++ /dev/null
@@ -1,409 +0,0 @@
-# Copyright (C) 1991-2005 Altera Corporation
-# Your use of Altera Corporation's design tools, logic functions
-# and other software and tools, and its AMPP partner logic
-# functions, and any output files any of the foregoing
-# (including device programming or simulation files), and any
-# associated documentation or information are expressly subject
-# to the terms and conditions of the Altera Program License
-# Subscription Agreement, Altera MegaCore Function License
-# Agreement, or other applicable license agreement, including,
-# without limitation, that your use is for the sole purpose of
-# programming logic devices manufactured by Altera and sold by
-# Altera or its authorized distributors. Please refer to the
-# applicable agreement for further details.
-
-
-# The default values for assignments are stored in the file
-# usrp_std_assignment_defaults.qdf
-# If this file doesn't exist, and for assignments not listed, see file
-# assignment_defaults.qdf
-
-# Altera recommends that you do not modify this file. This
-# file is updated automatically by the Quartus II software
-# and any changes you make may be lost or overwritten.
-
-
-# Project-Wide Assignments
-# ========================
-set_global_assignment -name ORIGINAL_QUARTUS_VERSION 3.0
-set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:14:04 JULY 13, 2003"
-set_global_assignment -name LAST_QUARTUS_VERSION "7.1 SP1"
-
-# Pin & Location Assignments
-# ==========================
-set_global_assignment -name RESERVE_PIN "AS INPUT TRI-STATED"
-set_location_assignment PIN_29 -to SCLK
-set_location_assignment PIN_117 -to SDI
-set_location_assignment PIN_28 -to usbclk
-set_location_assignment PIN_107 -to usbctl[0]
-set_location_assignment PIN_106 -to usbctl[1]
-set_location_assignment PIN_105 -to usbctl[2]
-set_location_assignment PIN_100 -to usbdata[0]
-set_location_assignment PIN_84 -to usbdata[10]
-set_location_assignment PIN_83 -to usbdata[11]
-set_location_assignment PIN_82 -to usbdata[12]
-set_location_assignment PIN_79 -to usbdata[13]
-set_location_assignment PIN_78 -to usbdata[14]
-set_location_assignment PIN_77 -to usbdata[15]
-set_location_assignment PIN_99 -to usbdata[1]
-set_location_assignment PIN_98 -to usbdata[2]
-set_location_assignment PIN_95 -to usbdata[3]
-set_location_assignment PIN_94 -to usbdata[4]
-set_location_assignment PIN_93 -to usbdata[5]
-set_location_assignment PIN_88 -to usbdata[6]
-set_location_assignment PIN_87 -to usbdata[7]
-set_location_assignment PIN_86 -to usbdata[8]
-set_location_assignment PIN_85 -to usbdata[9]
-set_location_assignment PIN_104 -to usbrdy[0]
-set_location_assignment PIN_101 -to usbrdy[1]
-set_location_assignment PIN_76 -to FX2_1
-set_location_assignment PIN_75 -to FX2_2
-set_location_assignment PIN_74 -to FX2_3
-set_location_assignment PIN_116 -to io_rx_a[0]
-set_location_assignment PIN_115 -to io_rx_a[1]
-set_location_assignment PIN_114 -to io_rx_a[2]
-set_location_assignment PIN_113 -to io_rx_a[3]
-set_location_assignment PIN_108 -to io_rx_a[4]
-set_location_assignment PIN_195 -to io_rx_a[5]
-set_location_assignment PIN_196 -to io_rx_a[6]
-set_location_assignment PIN_197 -to io_rx_a[7]
-set_location_assignment PIN_200 -to io_rx_a[8]
-set_location_assignment PIN_201 -to io_rx_a[9]
-set_location_assignment PIN_202 -to io_rx_a[10]
-set_location_assignment PIN_203 -to io_rx_a[11]
-set_location_assignment PIN_206 -to io_rx_a[12]
-set_location_assignment PIN_207 -to io_rx_a[13]
-set_location_assignment PIN_208 -to io_rx_a[14]
-set_location_assignment PIN_214 -to io_rx_b[0]
-set_location_assignment PIN_215 -to io_rx_b[1]
-set_location_assignment PIN_216 -to io_rx_b[2]
-set_location_assignment PIN_217 -to io_rx_b[3]
-set_location_assignment PIN_218 -to io_rx_b[4]
-set_location_assignment PIN_219 -to io_rx_b[5]
-set_location_assignment PIN_222 -to io_rx_b[6]
-set_location_assignment PIN_223 -to io_rx_b[7]
-set_location_assignment PIN_224 -to io_rx_b[8]
-set_location_assignment PIN_225 -to io_rx_b[9]
-set_location_assignment PIN_226 -to io_rx_b[10]
-set_location_assignment PIN_227 -to io_rx_b[11]
-set_location_assignment PIN_228 -to io_rx_b[12]
-set_location_assignment PIN_233 -to io_rx_b[13]
-set_location_assignment PIN_234 -to io_rx_b[14]
-set_location_assignment PIN_175 -to io_tx_a[0]
-set_location_assignment PIN_176 -to io_tx_a[1]
-set_location_assignment PIN_177 -to io_tx_a[2]
-set_location_assignment PIN_178 -to io_tx_a[3]
-set_location_assignment PIN_179 -to io_tx_a[4]
-set_location_assignment PIN_180 -to io_tx_a[5]
-set_location_assignment PIN_181 -to io_tx_a[6]
-set_location_assignment PIN_182 -to io_tx_a[7]
-set_location_assignment PIN_183 -to io_tx_a[8]
-set_location_assignment PIN_184 -to io_tx_a[9]
-set_location_assignment PIN_185 -to io_tx_a[10]
-set_location_assignment PIN_186 -to io_tx_a[11]
-set_location_assignment PIN_187 -to io_tx_a[12]
-set_location_assignment PIN_188 -to io_tx_a[13]
-set_location_assignment PIN_193 -to io_tx_a[14]
-set_location_assignment PIN_73 -to io_tx_b[0]
-set_location_assignment PIN_68 -to io_tx_b[1]
-set_location_assignment PIN_67 -to io_tx_b[2]
-set_location_assignment PIN_66 -to io_tx_b[3]
-set_location_assignment PIN_65 -to io_tx_b[4]
-set_location_assignment PIN_64 -to io_tx_b[5]
-set_location_assignment PIN_63 -to io_tx_b[6]
-set_location_assignment PIN_62 -to io_tx_b[7]
-set_location_assignment PIN_61 -to io_tx_b[8]
-set_location_assignment PIN_60 -to io_tx_b[9]
-set_location_assignment PIN_59 -to io_tx_b[10]
-set_location_assignment PIN_58 -to io_tx_b[11]
-set_location_assignment PIN_57 -to io_tx_b[12]
-set_location_assignment PIN_56 -to io_tx_b[13]
-set_location_assignment PIN_55 -to io_tx_b[14]
-set_location_assignment PIN_152 -to master_clk
-set_location_assignment PIN_144 -to rx_a_a[0]
-set_location_assignment PIN_143 -to rx_a_a[1]
-set_location_assignment PIN_141 -to rx_a_a[2]
-set_location_assignment PIN_140 -to rx_a_a[3]
-set_location_assignment PIN_139 -to rx_a_a[4]
-set_location_assignment PIN_138 -to rx_a_a[5]
-set_location_assignment PIN_137 -to rx_a_a[6]
-set_location_assignment PIN_136 -to rx_a_a[7]
-set_location_assignment PIN_135 -to rx_a_a[8]
-set_location_assignment PIN_134 -to rx_a_a[9]
-set_location_assignment PIN_133 -to rx_a_a[10]
-set_location_assignment PIN_132 -to rx_a_a[11]
-set_location_assignment PIN_23 -to rx_a_b[0]
-set_location_assignment PIN_21 -to rx_a_b[1]
-set_location_assignment PIN_20 -to rx_a_b[2]
-set_location_assignment PIN_19 -to rx_a_b[3]
-set_location_assignment PIN_18 -to rx_a_b[4]
-set_location_assignment PIN_17 -to rx_a_b[5]
-set_location_assignment PIN_16 -to rx_a_b[6]
-set_location_assignment PIN_15 -to rx_a_b[7]
-set_location_assignment PIN_14 -to rx_a_b[8]
-set_location_assignment PIN_13 -to rx_a_b[9]
-set_location_assignment PIN_12 -to rx_a_b[10]
-set_location_assignment PIN_11 -to rx_a_b[11]
-set_location_assignment PIN_131 -to rx_b_a[0]
-set_location_assignment PIN_128 -to rx_b_a[1]
-set_location_assignment PIN_127 -to rx_b_a[2]
-set_location_assignment PIN_126 -to rx_b_a[3]
-set_location_assignment PIN_125 -to rx_b_a[4]
-set_location_assignment PIN_124 -to rx_b_a[5]
-set_location_assignment PIN_123 -to rx_b_a[6]
-set_location_assignment PIN_122 -to rx_b_a[7]
-set_location_assignment PIN_121 -to rx_b_a[8]
-set_location_assignment PIN_120 -to rx_b_a[9]
-set_location_assignment PIN_119 -to rx_b_a[10]
-set_location_assignment PIN_118 -to rx_b_a[11]
-set_location_assignment PIN_8 -to rx_b_b[0]
-set_location_assignment PIN_7 -to rx_b_b[1]
-set_location_assignment PIN_6 -to rx_b_b[2]
-set_location_assignment PIN_5 -to rx_b_b[3]
-set_location_assignment PIN_4 -to rx_b_b[4]
-set_location_assignment PIN_3 -to rx_b_b[5]
-set_location_assignment PIN_2 -to rx_b_b[6]
-set_location_assignment PIN_240 -to rx_b_b[7]
-set_location_assignment PIN_239 -to rx_b_b[8]
-set_location_assignment PIN_238 -to rx_b_b[9]
-set_location_assignment PIN_237 -to rx_b_b[10]
-set_location_assignment PIN_236 -to rx_b_b[11]
-set_location_assignment PIN_156 -to SDO
-set_location_assignment PIN_153 -to SEN_FPGA
-set_location_assignment PIN_159 -to tx_a[0]
-set_location_assignment PIN_160 -to tx_a[1]
-set_location_assignment PIN_161 -to tx_a[2]
-set_location_assignment PIN_162 -to tx_a[3]
-set_location_assignment PIN_163 -to tx_a[4]
-set_location_assignment PIN_164 -to tx_a[5]
-set_location_assignment PIN_165 -to tx_a[6]
-set_location_assignment PIN_166 -to tx_a[7]
-set_location_assignment PIN_167 -to tx_a[8]
-set_location_assignment PIN_168 -to tx_a[9]
-set_location_assignment PIN_169 -to tx_a[10]
-set_location_assignment PIN_170 -to tx_a[11]
-set_location_assignment PIN_173 -to tx_a[12]
-set_location_assignment PIN_174 -to tx_a[13]
-set_location_assignment PIN_38 -to tx_b[0]
-set_location_assignment PIN_39 -to tx_b[1]
-set_location_assignment PIN_41 -to tx_b[2]
-set_location_assignment PIN_42 -to tx_b[3]
-set_location_assignment PIN_43 -to tx_b[4]
-set_location_assignment PIN_44 -to tx_b[5]
-set_location_assignment PIN_45 -to tx_b[6]
-set_location_assignment PIN_46 -to tx_b[7]
-set_location_assignment PIN_47 -to tx_b[8]
-set_location_assignment PIN_48 -to tx_b[9]
-set_location_assignment PIN_49 -to tx_b[10]
-set_location_assignment PIN_50 -to tx_b[11]
-set_location_assignment PIN_53 -to tx_b[12]
-set_location_assignment PIN_54 -to tx_b[13]
-set_location_assignment PIN_158 -to TXSYNC_A
-set_location_assignment PIN_37 -to TXSYNC_B
-set_location_assignment PIN_235 -to io_rx_b[15]
-set_location_assignment PIN_24 -to io_tx_b[15]
-set_location_assignment PIN_213 -to io_rx_a[15]
-set_location_assignment PIN_194 -to io_tx_a[15]
-set_location_assignment PIN_1 -to MYSTERY_SIGNAL
-
-# Timing Assignments
-# ==================
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF
-
-# Analysis & Synthesis Assignments
-# ================================
-set_global_assignment -name SAVE_DISK_SPACE OFF
-set_global_assignment -name DEVICE_FILTER_PACKAGE "ANY QFP"
-set_global_assignment -name DEVICE_FILTER_PIN_COUNT 240
-set_global_assignment -name EDA_DESIGN_ENTRY_SYNTHESIS_TOOL "<None>"
-set_global_assignment -name FAMILY Cyclone
-set_global_assignment -name CYCLONE_OPTIMIZATION_TECHNIQUE BALANCED
-set_global_assignment -name STRATIX_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name APEX20K_OPTIMIZATION_TECHNIQUE SPEED
-set_global_assignment -name TOP_LEVEL_ENTITY usrp_std
-set_global_assignment -name VHDL_SHOW_LMF_MAPPING_MESSAGES OFF
-set_global_assignment -name USER_LIBRARIES "e:\\usrp\\fpga\\megacells"
-set_global_assignment -name AUTO_ENABLE_SMART_COMPILE ON
-
-# Fitter Assignments
-# ==================
-set_global_assignment -name DEVICE EP1C12Q240C8
-set_global_assignment -name CYCLONE_CONFIGURATION_SCHEME "PASSIVE SERIAL"
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS "AS INPUT TRI-STATED"
-set_global_assignment -name OPTIMIZE_HOLD_TIMING OFF
-set_global_assignment -name OPTIMIZE_TIMING "NORMAL COMPILATION"
-set_global_assignment -name PHYSICAL_SYNTHESIS_COMBO_LOGIC OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_DUPLICATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_REGISTER_RETIMING OFF
-set_global_assignment -name IO_PLACEMENT_OPTIMIZATION OFF
-set_global_assignment -name PHYSICAL_SYNTHESIS_EFFORT NORMAL
-set_global_assignment -name INC_PLC_MODE OFF
-set_global_assignment -name ROUTING_BACK_ANNOTATION_MODE OFF
-set_instance_assignment -name IO_STANDARD LVTTL -to usbdata[12]
-set_global_assignment -name STRATIX_DEVICE_IO_STANDARD LVTTL
-set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
-
-# Timing Analysis Assignments
-# ===========================
-set_global_assignment -name MAX_SCC_SIZE 50
-
-# EDA Netlist Writer Assignments
-# ==============================
-set_global_assignment -name EDA_SIMULATION_TOOL "<None>"
-set_global_assignment -name EDA_TIMING_ANALYSIS_TOOL "<NONE>"
-set_global_assignment -name EDA_BOARD_DESIGN_TOOL "<NONE>"
-set_global_assignment -name EDA_FORMAL_VERIFICATION_TOOL "<NONE>"
-set_global_assignment -name EDA_RESYNTHESIS_TOOL "<NONE>"
-
-# Assembler Assignments
-# =====================
-set_global_assignment -name USE_CONFIGURATION_DEVICE OFF
-set_global_assignment -name GENERATE_RBF_FILE ON
-set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
-set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
-
-# Simulator Assignments
-# =====================
-set_global_assignment -name START_TIME "0 ns"
-set_global_assignment -name GLITCH_INTERVAL "1 ns"
-
-# Design Assistant Assignments
-# ============================
-set_global_assignment -name DRC_REPORT_TOP_FANOUT OFF
-set_global_assignment -name DRC_REPORT_FANOUT_EXCEEDING OFF
-set_global_assignment -name ASSG_CAT OFF
-set_global_assignment -name ASSG_RULE_MISSING_FMAX OFF
-set_global_assignment -name ASSG_RULE_MISSING_TIMING OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ASYN_RAM OFF
-set_global_assignment -name CLK_CAT OFF
-set_global_assignment -name CLK_RULE_COMB_CLOCK OFF
-set_global_assignment -name CLK_RULE_INV_CLOCK OFF
-set_global_assignment -name CLK_RULE_GATING_SCHEME OFF
-set_global_assignment -name CLK_RULE_INPINS_CLKNET OFF
-set_global_assignment -name CLK_RULE_CLKNET_CLKSPINES OFF
-set_global_assignment -name CLK_RULE_MIX_EDGES OFF
-set_global_assignment -name RESET_CAT OFF
-set_global_assignment -name RESET_RULE_INPINS_RESETNET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_EXRESET OFF
-set_global_assignment -name RESET_RULE_COMB_ASYNCH_RESET OFF
-set_global_assignment -name RESET_RULE_UNSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name RESET_RULE_IMSYNCH_ASYNCH_DOMAIN OFF
-set_global_assignment -name TIMING_CAT OFF
-set_global_assignment -name TIMING_RULE_SHIFT_REG OFF
-set_global_assignment -name TIMING_RULE_COIN_CLKEDGE OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMB_DRIVES_RAM_WE OFF
-set_global_assignment -name NONSYNCHSTRUCT_CAT OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_COMBLOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_REG_LOOP OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_DELAY_CHAIN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_RIPPLE_CLK OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_ILLEGAL_PULSE_GEN OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_MULTI_VIBRATOR OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_SRLATCH OFF
-set_global_assignment -name NONSYNCHSTRUCT_RULE_LATCH_UNIDENTIFIED OFF
-set_global_assignment -name SIGNALRACE_CAT OFF
-set_global_assignment -name ACLK_CAT OFF
-set_global_assignment -name ACLK_RULE_NO_SZER_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_SZER_BTW_ACLK_DOMAIN OFF
-set_global_assignment -name ACLK_RULE_IMSZER_ADOMAIN OFF
-set_global_assignment -name HCPY_CAT OFF
-set_global_assignment -name HCPY_VREF_PINS OFF
-
-# SignalTap II Assignments
-# ========================
-set_global_assignment -name HUB_ENTITY_NAME SLD_HUB
-set_global_assignment -name HUB_INSTANCE_NAME SLD_HUB_INST
-set_global_assignment -name ENABLE_SIGNALTAP OFF
-
-# LogicLock Region Assignments
-# ============================
-set_global_assignment -name LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT OFF
-
-# -----------------
-# start CLOCK(SCLK)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id SCLK
-set_global_assignment -name FMAX_REQUIREMENT "1 MHz" -section_id SCLK
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id SCLK
-
-# end CLOCK(SCLK)
-# ---------------
-
-# -----------------------
-# start CLOCK(master_clk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id master_clk
-set_global_assignment -name FMAX_REQUIREMENT "64 MHz" -section_id master_clk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id master_clk
-
-# end CLOCK(master_clk)
-# ---------------------
-
-# -------------------
-# start CLOCK(usbclk)
-
- # Timing Assignments
- # ==================
-set_global_assignment -name DUTY_CYCLE 50 -section_id usbclk
-set_global_assignment -name FMAX_REQUIREMENT "48 MHz" -section_id usbclk
-set_global_assignment -name INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF -section_id usbclk
-
-# end CLOCK(usbclk)
-# -----------------
-
-# ----------------------
-# start ENTITY(usrp_std)
-
- # Timing Assignments
- # ==================
-set_instance_assignment -name CLOCK_SETTINGS SCLK -to SCLK
-set_instance_assignment -name CLOCK_SETTINGS usbclk -to usbclk
-set_instance_assignment -name CLOCK_SETTINGS master_clk -to master_clk
-
-# end ENTITY(usrp_std)
-# --------------------
-
-set_instance_assignment -name PARTITION_HIERARCHY no_file_for_top_partition -to | -section_id Top
-set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4k_18.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/atr_delay.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_dec_shifter.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rssi.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/ram16.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_4k.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mult.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/ram16_2sum.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/coeff_rom.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/halfband_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/hb/mac.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_dcoffset.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/adc_interface.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/io_pins.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/setting_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/bidir_reg.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_int_shifter.v
-set_global_assignment -name VERILOG_FILE ../../megacells/clk_doubler.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_chain.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/gen_sync.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/master_control.v
-set_global_assignment -name VERILOG_FILE ../../megacells/fifo_2k.v
-set_global_assignment -name VERILOG_FILE ../../megacells/bustri.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/rx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/tx_buffer.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/phase_acc.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_interp.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cic_decim.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic_stage.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/cordic.v
-set_global_assignment -name VERILOG_FILE usrp_std.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/clk_divider.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/serial_io.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/strobe_gen.v
-set_global_assignment -name VERILOG_FILE ../../sdr_lib/sign_extend.v \ No newline at end of file
diff --git a/usrp/fpga/toplevel/usrp_std/usrp_std.v b/usrp/fpga/toplevel/usrp_std/usrp_std.v
deleted file mode 100644
index 8b29a9c21..000000000
--- a/usrp/fpga/toplevel/usrp_std/usrp_std.v
+++ /dev/null
@@ -1,333 +0,0 @@
-// -*- verilog -*-
-//
-// USRP - Universal Software Radio Peripheral
-//
-// Copyright (C) 2003,2004 Matt Ettus
-//
-// This program 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 2 of the License, or
-// (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
-//
-
-// Top level module for a full setup with DUCs and DDCs
-
-// Define DEBUG_OWNS_IO_PINS if we're using the daughterboard i/o pins
-// for debugging info. NB, This can kill the m'board and/or d'board if you
-// have anything except basic d'boards installed.
-
-// Uncomment the following to include optional circuitry
-
-`include "config.vh"
-`include "../../../firmware/include/fpga_regs_common.v"
-`include "../../../firmware/include/fpga_regs_standard.v"
-
-module usrp_std
-(output MYSTERY_SIGNAL,
- input master_clk,
- input SCLK,
- input SDI,
- inout SDO,
- input SEN_FPGA,
-
- input FX2_1,
- output FX2_2,
- output FX2_3,
-
- input wire [11:0] rx_a_a,
- input wire [11:0] rx_b_a,
- input wire [11:0] rx_a_b,
- input wire [11:0] rx_b_b,
-
- output wire [13:0] tx_a,
- output wire [13:0] tx_b,
-
- output wire TXSYNC_A,
- output wire TXSYNC_B,
-
- // USB interface
- input usbclk,
- input wire [2:0] usbctl,
- output wire [1:0] usbrdy,
- inout [15:0] usbdata, // NB Careful, inout
-
- // These are the general purpose i/o's that go to the daughterboard slots
- inout wire [15:0] io_tx_a,
- inout wire [15:0] io_tx_b,
- inout wire [15:0] io_rx_a,
- inout wire [15:0] io_rx_b
- );
- wire [15:0] debugdata,debugctrl;
- assign MYSTERY_SIGNAL = 1'b0;
-
- wire clk64,clk128;
-
- wire WR = usbctl[0];
- wire RD = usbctl[1];
- wire OE = usbctl[2];
-
- wire have_space, have_pkt_rdy;
- assign usbrdy[0] = have_space;
- assign usbrdy[1] = have_pkt_rdy;
-
- wire tx_underrun, rx_overrun;
- wire clear_status = FX2_1;
- assign FX2_2 = rx_overrun;
- assign FX2_3 = tx_underrun;
-
- wire [15:0] usbdata_out;
-
- wire [3:0] dac0mux,dac1mux,dac2mux,dac3mux;
-
- wire tx_realsignals;
- wire [3:0] rx_numchan;
- wire [2:0] tx_numchan;
-
- wire [7:0] interp_rate, decim_rate;
- wire [31:0] tx_debugbus, rx_debugbus;
-
- wire enable_tx, enable_rx;
- wire tx_dsp_reset, rx_dsp_reset, tx_bus_reset, rx_bus_reset;
- wire [7:0] settings;
-
- // Tri-state bus macro
- bustri bustri( .data(usbdata_out),.enabledt(OE),.tridata(usbdata) );
-
- assign clk64 = master_clk;
-
- wire [15:0] ch0tx,ch1tx,ch2tx,ch3tx; //,ch4tx,ch5tx,ch6tx,ch7tx;
- wire [15:0] ch0rx,ch1rx,ch2rx,ch3rx,ch4rx,ch5rx,ch6rx,ch7rx;
-
- // TX
- wire [15:0] i_out_0,i_out_1,q_out_0,q_out_1;
- wire [15:0] bb_tx_i0,bb_tx_q0,bb_tx_i1,bb_tx_q1; // bb_tx_i2,bb_tx_q2,bb_tx_i3,bb_tx_q3;
-
- wire strobe_interp, tx_sample_strobe;
- wire tx_empty;
-
- wire serial_strobe;
- wire [6:0] serial_addr;
- wire [31:0] serial_data;
-
- reg [15:0] debug_counter;
- reg [15:0] loopback_i_0,loopback_q_0;
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Transmit Side
-`ifdef TX_ON
- assign bb_tx_i0 = ch0tx;
- assign bb_tx_q0 = ch1tx;
- assign bb_tx_i1 = ch2tx;
- assign bb_tx_q1 = ch3tx;
-
- tx_buffer tx_buffer
- ( .usbclk(usbclk), .bus_reset(tx_bus_reset),
- .usbdata(usbdata),.WR(WR), .have_space(have_space),
- .tx_underrun(tx_underrun), .clear_status(clear_status),
- .txclk(clk64), .reset(tx_dsp_reset),
- .channels({tx_numchan,1'b0}),
- .tx_i_0(ch0tx),.tx_q_0(ch1tx),
- .tx_i_1(ch2tx),.tx_q_1(ch3tx),
- .txstrobe(strobe_interp),
- .tx_empty(tx_empty),
- .debugbus(tx_debugbus) );
-
- `ifdef TX_EN_0
- tx_chain tx_chain_0
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i0),.q_in(bb_tx_q0),.i_out(i_out_0),.q_out(q_out_0) );
- `else
- assign i_out_0=16'd0;
- assign q_out_0=16'd0;
- `endif
-
- `ifdef TX_EN_1
- tx_chain tx_chain_1
- ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
- .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
- .interpolator_strobe(strobe_interp),.freq(),
- .i_in(bb_tx_i1),.q_in(bb_tx_q1),.i_out(i_out_1),.q_out(q_out_1) );
- `else
- assign i_out_1=16'd0;
- assign q_out_1=16'd0;
- `endif
-
- setting_reg #(`FR_TX_MUX)
- sr_txmux(.clock(clk64),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
- .out({dac3mux,dac2mux,dac1mux,dac0mux,tx_realsignals,tx_numchan}));
-
- wire [15:0] tx_a_a = dac0mux[3] ? (dac0mux[1] ? (dac0mux[0] ? q_out_1 : i_out_1) : (dac0mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_a = dac1mux[3] ? (dac1mux[1] ? (dac1mux[0] ? q_out_1 : i_out_1) : (dac1mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_a_b = dac2mux[3] ? (dac2mux[1] ? (dac2mux[0] ? q_out_1 : i_out_1) : (dac2mux[0] ? q_out_0 : i_out_0)) : 16'b0;
- wire [15:0] tx_b_b = dac3mux[3] ? (dac3mux[1] ? (dac3mux[0] ? q_out_1 : i_out_1) : (dac3mux[0] ? q_out_0 : i_out_0)) : 16'b0;
-
- wire txsync = tx_sample_strobe;
- assign TXSYNC_A = txsync;
- assign TXSYNC_B = txsync;
-
- assign tx_a = txsync ? tx_b_a[15:2] : tx_a_a[15:2];
- assign tx_b = txsync ? tx_b_b[15:2] : tx_a_b[15:2];
-`endif // `ifdef TX_ON
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Receive Side
-`ifdef RX_ON
- wire rx_sample_strobe,strobe_decim,hb_strobe;
- wire [15:0] bb_rx_i0,bb_rx_q0,bb_rx_i1,bb_rx_q1,
- bb_rx_i2,bb_rx_q2,bb_rx_i3,bb_rx_q3;
-
- wire loopback = settings[0];
- wire counter = settings[1];
-
- always @(posedge clk64)
- if(rx_dsp_reset)
- debug_counter <= #1 16'd0;
- else if(~enable_rx)
- debug_counter <= #1 16'd0;
- else if(hb_strobe)
- debug_counter <=#1 debug_counter + 16'd2;
-
- always @(posedge clk64)
- if(strobe_interp)
- begin
- loopback_i_0 <= #1 ch0tx;
- loopback_q_0 <= #1 ch1tx;
- end
-
- assign ch0rx = counter ? debug_counter : loopback ? loopback_i_0 : bb_rx_i0;
- assign ch1rx = counter ? debug_counter + 16'd1 : loopback ? loopback_q_0 : bb_rx_q0;
- assign ch2rx = bb_rx_i1;
- assign ch3rx = bb_rx_q1;
- assign ch4rx = bb_rx_i2;
- assign ch5rx = bb_rx_q2;
- assign ch6rx = bb_rx_i3;
- assign ch7rx = bb_rx_q3;
-
- wire [15:0] ddc0_in_i,ddc0_in_q,ddc1_in_i,ddc1_in_q,ddc2_in_i,ddc2_in_q,ddc3_in_i,ddc3_in_q;
- wire [31:0] rssi_0,rssi_1,rssi_2,rssi_3;
-
- adc_interface adc_interface(.clock(clk64),.reset(rx_dsp_reset),.enable(1'b1),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .rx_a_a(rx_a_a),.rx_b_a(rx_b_a),.rx_a_b(rx_a_b),.rx_b_b(rx_b_b),
- .rssi_0(rssi_0),.rssi_1(rssi_1),.rssi_2(rssi_2),.rssi_3(rssi_3),
- .ddc0_in_i(ddc0_in_i),.ddc0_in_q(ddc0_in_q),
- .ddc1_in_i(ddc1_in_i),.ddc1_in_q(ddc1_in_q),
- .ddc2_in_i(ddc2_in_i),.ddc2_in_q(ddc2_in_q),
- .ddc3_in_i(ddc3_in_i),.ddc3_in_q(ddc3_in_q),.rx_numchan(rx_numchan) );
-
- rx_buffer rx_buffer
- ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset),
- .reset_regs(rx_dsp_reset),
- .usbdata(usbdata_out),.RD(RD),.have_pkt_rdy(have_pkt_rdy),.rx_overrun(rx_overrun),
- .channels(rx_numchan),
- .ch_0(ch0rx),.ch_1(ch1rx),
- .ch_2(ch2rx),.ch_3(ch3rx),
- .ch_4(ch4rx),.ch_5(ch5rx),
- .ch_6(ch6rx),.ch_7(ch7rx),
- .rxclk(clk64),.rxstrobe(hb_strobe),
- .clear_status(clear_status),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .debugbus(rx_debugbus) );
-
- `ifdef RX_EN_0
- rx_chain #(`FR_RX_FREQ_0,`FR_RX_PHASE_0) rx_chain_0
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(hb_strobe),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc0_in_i),.q_in(ddc0_in_q),.i_out(bb_rx_i0),.q_out(bb_rx_q0),.debugdata(debugdata),.debugctrl(debugctrl));
- `else
- assign bb_rx_i0=16'd0;
- assign bb_rx_q0=16'd0;
- `endif
-
- `ifdef RX_EN_1
- rx_chain #(`FR_RX_FREQ_1,`FR_RX_PHASE_1) rx_chain_1
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc1_in_i),.q_in(ddc1_in_q),.i_out(bb_rx_i1),.q_out(bb_rx_q1));
- `else
- assign bb_rx_i1=16'd0;
- assign bb_rx_q1=16'd0;
- `endif
-
- `ifdef RX_EN_2
- rx_chain #(`FR_RX_FREQ_2,`FR_RX_PHASE_2) rx_chain_2
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc2_in_i),.q_in(ddc2_in_q),.i_out(bb_rx_i2),.q_out(bb_rx_q2));
- `else
- assign bb_rx_i2=16'd0;
- assign bb_rx_q2=16'd0;
- `endif
-
- `ifdef RX_EN_3
- rx_chain #(`FR_RX_FREQ_3,`FR_RX_PHASE_3) rx_chain_3
- ( .clock(clk64),.reset(1'b0),.enable(enable_rx),
- .decim_rate(decim_rate),.sample_strobe(rx_sample_strobe),.decimator_strobe(strobe_decim),.hb_strobe(),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .i_in(ddc3_in_i),.q_in(ddc3_in_q),.i_out(bb_rx_i3),.q_out(bb_rx_q3));
- `else
- assign bb_rx_i3=16'd0;
- assign bb_rx_q3=16'd0;
- `endif
-
-`endif // `ifdef RX_ON
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Control Functions
-
- wire [31:0] capabilities;
- assign capabilities[7] = `TX_CAP_HB;
- assign capabilities[6:4] = `TX_CAP_NCHAN;
- assign capabilities[3] = `RX_CAP_HB;
- assign capabilities[2:0] = `RX_CAP_NCHAN;
-
-
- serial_io serial_io
- ( .master_clk(clk64),.serial_clock(SCLK),.serial_data_in(SDI),
- .enable(SEN_FPGA),.reset(1'b0),.serial_data_out(SDO),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .readback_0({io_rx_a,io_tx_a}),.readback_1({io_rx_b,io_tx_b}),.readback_2(capabilities),.readback_3(32'hf0f0931a),
- .readback_4(rssi_0),.readback_5(rssi_1),.readback_6(rssi_2),.readback_7(rssi_3)
- );
-
- wire [15:0] reg_0,reg_1,reg_2,reg_3;
- master_control master_control
- ( .master_clk(clk64),.usbclk(usbclk),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe),
- .tx_bus_reset(tx_bus_reset),.rx_bus_reset(rx_bus_reset),
- .tx_dsp_reset(tx_dsp_reset),.rx_dsp_reset(rx_dsp_reset),
- .enable_tx(enable_tx),.enable_rx(enable_rx),
- .interp_rate(interp_rate),.decim_rate(decim_rate),
- .tx_sample_strobe(tx_sample_strobe),.strobe_interp(strobe_interp),
- .rx_sample_strobe(rx_sample_strobe),.strobe_decim(strobe_decim),
- .tx_empty(tx_empty),
- //.debug_0(rx_a_a),.debug_1(ddc0_in_i),
- .debug_0(tx_debugbus[15:0]),.debug_1(tx_debugbus[31:16]),
- .debug_2(rx_debugbus[15:0]),.debug_3(rx_debugbus[31:16]),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3) );
-
- io_pins io_pins
- (.io_0(io_tx_a),.io_1(io_rx_a),.io_2(io_tx_b),.io_3(io_rx_b),
- .reg_0(reg_0),.reg_1(reg_1),.reg_2(reg_2),.reg_3(reg_3),
- .clock(clk64),.rx_reset(rx_dsp_reset),.tx_reset(tx_dsp_reset),
- .serial_addr(serial_addr),.serial_data(serial_data),.serial_strobe(serial_strobe));
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Misc Settings
- setting_reg #(`FR_MODE) sr_misc(.clock(clk64),.reset(rx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),.out(settings));
-
-endmodule // usrp_std
diff --git a/usrp/host/apps/burn-db-eeprom b/usrp/host/apps/burn-db-eeprom
index 7ff1e9736..8fb9143eb 100755
--- a/usrp/host/apps/burn-db-eeprom
+++ b/usrp/host/apps/burn-db-eeprom
@@ -71,6 +71,7 @@ daughterboards = {
'wbx_lo' : ((WBX_LO_TX, 0x0000), (WBX_LO_RX, 0x0000)),
'wbx_ng' : ((WBX_NG_TX, 0x0000), (WBX_NG_RX, 0x0000)),
'xcvr2450' : ((XCVR2450_TX, 0x0000), (XCVR2450_RX, 0x0000)),
+ 'bitshark_rx' : (None, (BITSHARK_RX, 0x0000)),
'experimental_tx' : ((EXPERIMENTAL_TX, 0x0000), None),
'experimental_rx' : (None, (EXPERIMENTAL_RX, 0x0000)),
}
diff --git a/usrp/host/include/usrp/Makefile.am b/usrp/host/include/usrp/Makefile.am
index cfce51443..2aaf66a53 100644
--- a/usrp/host/include/usrp/Makefile.am
+++ b/usrp/host/include/usrp/Makefile.am
@@ -26,6 +26,7 @@ usrpincludedir = $(includedir)/usrp
usrpinclude_HEADERS = \
db_base.h \
db_basic.h \
+ db_bitshark_rx.h \
db_dbs_rx.h \
db_dtt754.h \
db_dtt768.h \
diff --git a/usrp/host/include/usrp/db_bitshark_rx.h b/usrp/host/include/usrp/db_bitshark_rx.h
new file mode 100644
index 000000000..f81877d28
--- /dev/null
+++ b/usrp/host/include/usrp/db_bitshark_rx.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+//
+// Copyright 2010 Free Software Foundation, Inc.
+//
+// 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 asversion 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.
+
+#ifndef DB_BITSHARK_RX_H
+#define DB_BITSHARK_RX_H
+
+#include <usrp/db_base.h>
+#include <vector>
+#include <stdint.h>
+
+class db_bitshark_rx : public db_base
+{
+private:
+ int d_i2c_addr;
+ // Internal function for interfacing to the card
+ void _set_pga(int pga_gain);
+
+protected:
+ void shutdown();
+
+public:
+ db_bitshark_rx(usrp_basic_sptr usrp, int which);
+ ~db_bitshark_rx();
+
+ float gain_min();
+ float gain_max();
+ float gain_db_per_step();
+ double freq_min();
+ double freq_max();
+ struct freq_result_t set_freq(double freq);
+ bool set_gain(float gain);
+ bool set_bw(float bw);
+ bool set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clock_freq);
+ bool is_quadrature();
+ bool i_and_q_swapped();
+};
+
+#endif
diff --git a/usrp/host/lib/Makefile.am b/usrp/host/lib/Makefile.am
index e80f27112..f01ff8a0a 100644
--- a/usrp/host/lib/Makefile.am
+++ b/usrp/host/lib/Makefile.am
@@ -1,7 +1,7 @@
#
# USRP - Universal Software Radio Peripheral
#
-# Copyright (C) 2003,2004,2006,2007,2008,2009 Free Software Foundation, Inc.
+# Copyright (C) 2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,10 +31,10 @@ libusrp_la_common_LIBADD = \
$(BOOST_THREAD_LIB) \
../misc/libmisc.la
-# darwin fusb requires omnithreads
+# darwin fusb requires gruel (for threading)
if FUSB_TECH_darwin
-AM_CPPFLAGS = $(common_INCLUDES) $(OMNITHREAD_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
-libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(OMNITHREAD_LA)
+AM_CPPFLAGS = $(common_INCLUDES) $(GRUEL_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
+libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(GRUEL_LA)
libusrp_la_LDFLAGS = $(libusrp_la_common_LDFLAGS) -framework CoreFoundation
else
AM_CPPFLAGS = $(common_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
@@ -70,7 +70,6 @@ darwin_CODE = \
circular_buffer.h \
circular_linked_list.h \
darwin_libusb.h \
- mld_threads.h \
usrp_prims_libusb0.cc
@@ -121,6 +120,7 @@ libusrp_la_common_SOURCES = \
db_boards.cc \
db_base.cc \
db_basic.cc \
+ db_bitshark_rx.cc \
db_tv_rx.cc \
db_tv_rx_mimo.cc \
db_flexrf.cc \
diff --git a/usrp/host/lib/circular_buffer.h b/usrp/host/lib/circular_buffer.h
index 6d491fb6f..48758bf87 100644
--- a/usrp/host/lib/circular_buffer.h
+++ b/usrp/host/lib/circular_buffer.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -23,7 +23,7 @@
#ifndef _CIRCULAR_BUFFER_H_
#define _CIRCULAR_BUFFER_H_
-#include "mld_threads.h"
+#include <gruel/thread.h>
#include <iostream>
#include <stdexcept>
@@ -37,7 +37,8 @@
#define DEBUG(X) do{} while(0);
#endif
-template <class T> class circular_buffer
+template <class T>
+class circular_buffer
{
private:
// the buffer to use
@@ -48,8 +49,9 @@ private:
size_t d_n_avail_write_I, d_n_avail_read_I;
// stuff to control access to class internals
- mld_mutex_ptr d_internal;
- mld_condition_ptr d_readBlock, d_writeBlock;
+ gruel::mutex* d_internal;
+ gruel::condition_variable* d_readBlock;
+ gruel::condition_variable* d_writeBlock;
// booleans to decide how to control reading, writing, and aborting
bool d_doWriteBlock, d_doFullRead, d_doAbort;
@@ -94,16 +96,14 @@ public:
};
inline size_t n_avail_write_items () {
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
size_t retVal = d_n_avail_write_I;
- d_internal->unlock ();
return (retVal);
};
inline size_t n_avail_read_items () {
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
size_t retVal = d_n_avail_read_I;
- d_internal->unlock ();
return (retVal);
};
@@ -120,13 +120,13 @@ public:
// create a mutex to handle contention of shared resources;
// any routine needed access to shared resources uses lock()
// before doing anything, then unlock() when finished.
- d_internal = new mld_mutex ();
+ d_internal = new gruel::mutex ();
// link the internal mutex to the read and write conditions;
// when wait() is called, the internal mutex will automatically
- // be unlock()'ed. Upon return (from a signal() to the condition),
+ // be unlock()'ed. Upon return (from a notify_one() to the condition),
// the internal mutex will be lock()'ed.
- d_readBlock = new mld_condition (d_internal);
- d_writeBlock = new mld_condition (d_internal);
+ d_readBlock = new gruel::condition_variable ();
+ d_writeBlock = new gruel::condition_variable ();
};
/*
@@ -167,9 +167,8 @@ public:
if (!buf)
throw std::runtime_error ("circular_buffer::enqueue(): "
"input buffer is NULL.\n");
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
if (d_doAbort) {
- d_internal->unlock ();
return (2);
}
// set the return value to 1: success; change if needed
@@ -178,11 +177,11 @@ public:
if (d_doWriteBlock) {
while (bufLen_I > d_n_avail_write_I) {
DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl);
- // wait will automatically unlock() the internal mutex
- d_writeBlock->wait ();
- // and lock() it here.
+ // wait; will automatically unlock() the internal mutex via
+ // the scoped lock
+ d_writeBlock->wait (l);
+ // and auto re-lock() it here.
if (d_doAbort) {
- d_internal->unlock ();
DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl);
return (2);
}
@@ -208,8 +207,7 @@ public:
d_writeNdx_I += n_now_I;
d_n_avail_read_I += bufLen_I;
d_n_avail_write_I -= bufLen_I;
- d_readBlock->signal ();
- d_internal->unlock ();
+ d_readBlock->notify_one ();
return (retval);
};
@@ -255,19 +253,18 @@ public:
throw std::runtime_error ("circular_buffer::dequeue()");
}
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
if (d_doAbort) {
- d_internal->unlock ();
return (2);
}
if (d_doFullRead) {
while (d_n_avail_read_I < l_bufLen_I) {
DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl);
- // wait will automatically unlock() the internal mutex
- d_readBlock->wait ();
- // and lock() it here.
+ // wait; will automatically unlock() the internal mutex via
+ // the scoped lock
+ d_readBlock->wait (l);
+ // and re-lock() it here.
if (d_doAbort) {
- d_internal->unlock ();
DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl);
return (2);
}
@@ -276,11 +273,11 @@ public:
} else {
while (d_n_avail_read_I == 0) {
DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl);
- // wait will automatically unlock() the internal mutex
- d_readBlock->wait ();
- // and lock() it here.
+ // wait; will automatically unlock() the internal mutex via
+ // the scoped lock
+ d_readBlock->wait (l);
+ // and re-lock() it here.
if (d_doAbort) {
- d_internal->unlock ();
DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl);
return (2);
}
@@ -303,17 +300,15 @@ public:
*bufLen_I = l_bufLen_I;
d_n_avail_read_I -= l_bufLen_I;
d_n_avail_write_I += l_bufLen_I;
- d_writeBlock->signal ();
- d_internal->unlock ();
+ d_writeBlock->notify_one ();
return (1);
};
void abort () {
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
d_doAbort = true;
- d_writeBlock->signal ();
- d_readBlock->signal ();
- d_internal->unlock ();
+ d_writeBlock->notify_one ();
+ d_readBlock->notify_one ();
};
};
diff --git a/usrp/host/lib/circular_linked_list.h b/usrp/host/lib/circular_linked_list.h
index 97fe2c1a8..bbed5e49b 100644
--- a/usrp/host/lib/circular_linked_list.h
+++ b/usrp/host/lib/circular_linked_list.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -23,7 +23,7 @@
#ifndef _CIRCULAR_LINKED_LIST_H_
#define _CIRCULAR_LINKED_LIST_H_
-#include <mld_threads.h>
+#include <gruel/thread.h>
#include <stdexcept>
#define __INLINE__ inline
@@ -110,8 +110,8 @@ template <class T> class circular_linked_list {
private:
s_node_ptr d_current, d_iterate, d_available, d_inUse;
size_t d_n_nodes, d_n_used;
- mld_mutex_ptr d_internal;
- mld_condition_ptr d_ioBlock;
+ gruel::mutex* d_internal;
+ gruel::condition_variable* d_ioBlock;
public:
circular_linked_list (size_t n_nodes) {
@@ -150,8 +150,8 @@ public:
}
}
d_available = d_current = l_prev;
- d_ioBlock = new mld_condition ();
- d_internal = d_ioBlock->mutex ();
+ d_ioBlock = new gruel::condition_variable ();
+ d_internal = new gruel::mutex ();
};
~circular_linked_list () {
@@ -163,19 +163,21 @@ public:
}
delete d_ioBlock;
d_ioBlock = NULL;
+ delete d_internal;
+ d_internal = NULL;
d_available = d_inUse = d_iterate = d_current = NULL;
d_n_used = d_n_nodes = 0;
};
s_node_ptr find_next_available_node () {
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
// find an available node
s_node_ptr l_node = d_available;
DEBUG (std::cerr << "w ");
while (! l_node) {
DEBUG (std::cerr << "x" << std::endl);
// the ioBlock condition will automatically unlock() d_internal
- d_ioBlock->wait ();
+ d_ioBlock->wait (l);
// and lock() is here
DEBUG (std::cerr << "y" << std::endl);
l_node = d_available;
@@ -196,13 +198,12 @@ public:
l_node->insert_before (d_inUse);
d_n_used++;
l_node->set_not_available ();
- d_internal->unlock ();
return (l_node);
};
void make_node_available (s_node_ptr l_node) {
if (!l_node) return;
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
DEBUG (std::cerr << "::m_n_a: #u = " << num_used()
<< ", node = " << l_node << std::endl);
// remove this node from the inUse list
@@ -221,11 +222,8 @@ public:
DEBUG (std::cerr << "s" << d_n_used);
// signal the condition when new data arrives
- d_ioBlock->signal ();
+ d_ioBlock->notify_one ();
DEBUG (std::cerr << "t ");
-
-// unlock the mutex for thread safety
- d_internal->unlock ();
};
__INLINE__ void iterate_start () { d_iterate = d_current; };
@@ -233,7 +231,7 @@ public:
s_node_ptr iterate_next () {
#if 0
// lock the mutex for thread safety
- d_internal->lock ();
+ gruel::scoped_lock l (*d_internal);
#endif
s_node_ptr l_this = NULL;
if (d_iterate) {
@@ -242,10 +240,6 @@ public:
if (d_iterate == d_current)
d_iterate = NULL;
}
-#if 0
-// unlock the mutex for thread safety
- d_internal->unlock ();
-#endif
return (l_this);
};
@@ -261,7 +255,7 @@ public:
__INLINE__ void num_used_dec (void) {
if (d_n_used != 0) --d_n_used;
// signal the condition that new data has arrived
- d_ioBlock->signal ();
+ d_ioBlock->notify_one ();
};
__INLINE__ bool in_use () { return (d_n_used != 0); };
};
diff --git a/usrp/host/lib/db_bitshark_rx.cc b/usrp/host/lib/db_bitshark_rx.cc
new file mode 100644
index 000000000..5368866d8
--- /dev/null
+++ b/usrp/host/lib/db_bitshark_rx.cc
@@ -0,0 +1,417 @@
+//
+// Copyright 2010 Free Software Foundation, Inc.
+//
+// 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 asversion 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.
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrp/db_bitshark_rx.h>
+#include <db_base_impl.h>
+#include <cmath>
+#include <cstdio>
+#include <string.h>
+#include <stdint.h>
+
+/* Note: Thie general structure of this file is based on the db_dbsrx.cc
+ codebase for the dbsrx daughterboard. */
+
+/* The following defines specify the address map provided by the
+ Bitshark card. These registers are all accessed over I2C. */
+#define RF_CENTER_FREQ_REG 0x00
+#define RF_CHAN_FILTER_BW_REG 0x01
+#define RF_GAIN_REG 0x02
+#define BB_GAIN_REG 0x03
+#define ADF4350_REG 0x10
+#define SKY73202_REG 0x11
+#define CLOCK_SCHEME_REG 0x20
+
+/* The following table lists the registers provided by the BURX board that
+ are accessible over I2C:
+ --------------------------------------------------------
+ |RegAddr: 0x00-RF Center Freq register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF center freq (in KHz)|
+ |RegAddr: 0x01-RF channel filter bandwidth register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF channel filter bw (in KHz)|
+ |RegAddr: 0x02-RF gain register |
+ |7-bytes 0x00|
+ |1-byte signed RF gain (in dB)|
+ |RegAddr: 0x03-Baseband gain register |
+ |4-bytes 0x00|
+ |4-byte signed baseband filter gain (in dB)|
+ |RegAddr: 0x10-ADF4350 register |
+ |4-bytes 0x00|
+ |4-byte ADF4350 register value (actual ADF4350 reg addr embedded
+ within 4-byte value)|
+ |RegAddr: 0x11-SKY73202 register |
+ |5-bytes 0x00|
+ |1-byte reg 0 of SKY73202 |
+ |1-byte reg 1 of SKY73202 |
+ |1-byte reg 2 of SKY73202 |
+ |RegAddr: 0x20-Clock Scheme |
+ |3-bytes 0x00|
+ |1-byte indicating clocking scheme:
+ -0x00 -> BURX local TCXO off, BURX accepts ref clock from
+ USRP (freq of USRP's ref clock specified in bytes 2-5)
+ -0x01 -> BURX local TCXO on, BURX uses its local TCXO as its ref
+ clock, TCXO signal output for use by USRP |
+ |4-byte USRP ref clock freq in hz (only needed if byte 1 set to 0x00) |
+
+ ---------------------------------------------------------------------------
+
+ As an example, lets say the client wants to set an RF center freq of
+ 1000 MHz. In KHz, this translates to 1000000 (resolution is only down to
+ steps of 1 KHz), which is 0x000F4240 in hex. So the complete 9-byte I2C
+ sequence that the client should send is as follows:
+ byte 0: 0x00-register 0x00 is the target of the write operation
+ bytes 1-4: 0x00 (padding)
+ byte 5: 0x40 (LSB of the 1000000 KHz value, in hex)
+ byte 6: 0x42
+ byte 7: 0x0F
+ byte 8: 0x00 (MSB of the 1000000 KHz value, in hex)
+
+ If using the usrper cmd-line application on a PC, this sequence would
+ be sent as follows (assuming that the BURX is in slot A):
+
+ # usrper i2c_write 0x47 000000000040420F00
+
+ How about another example...lets say the client wants to setup the clock
+ scheme to use scheme #1 where the 26 MHz TCXO on the BURX board is enabled,
+ and is provided to the USRP. 26 MHz (i.e. 26 million), in hex, is 0x18CBA80.
+ So the complete 9-byte I2C sequence that the client should send is as follows:
+ byte 0: 0x20-register 0x20 is the target of the write operation
+ bytes 1-3: 0x00 (padding)
+ byte 4: 0x01 (indicating that clock scheme #1 is wanted)
+ byte 5: 0x80 (LSB of the BURX ref clk freq)
+ byte 6: 0xBA
+ byte 7: 0x8C
+ byte 8: 0x01 (MSB of the BURX ref clk freq)
+
+ To enable the BURX local ref clk, which will also make it available on the
+ on-board U.FL connector as a source for the USRP, a user can also use
+ the usrper cmd-line application on a PC. The following sequence would
+ be sent (assuming that the BURX is in slot A):
+
+ # usrper i2c_write 0x47 200000000180BA8C01
+
+*/
+
+#define NUM_BYTES_IN_I2C_CMD 9
+
+/*****************************************************************************/
+
+db_bitshark_rx::db_bitshark_rx(usrp_basic_sptr _usrp, int which)
+ : db_base(_usrp, which)
+{
+ // Control Bitshark receiver USRP daughterboard.
+ //
+ // @param usrp: instance of usrp.source_c
+ // @param which: which side: 0, 1 corresponding to RX_A or RX_B respectively
+
+ // turn off all outputs
+ usrp()->_write_oe(d_which, 0, 0xffff);
+
+ if (which == 0)
+ {
+ d_i2c_addr = 0x47;
+ }
+ else
+ {
+ d_i2c_addr = 0x45;
+ }
+
+ // initialize gain
+ set_gain((gain_min() + gain_max()) / 2.0);
+
+ // by default, assume we're using the USRPs clock as the ref clk,
+ // so setup the clock scheme and frequency. If the user wants
+ // to use the Bitshark's TCXO, the clock scheme should be set
+ // to 1, the freq should be set to 26000000, and a top-level
+ // 'make' and 'make install' needs to be executed. In addition,
+ // a U.FL to SMA cable needs to connect J6 on the Bitshark to
+ // the external clk input on the USRP
+ set_clock_scheme(0,64000000);
+
+ set_bw(8e6); // Default IF bandwidth to match USRP1 max host bandwidth
+
+ bypass_adc_buffers(true);
+}
+
+db_bitshark_rx::~db_bitshark_rx()
+{
+ shutdown();
+}
+
+/************ Private Functions **********************/
+
+void
+db_bitshark_rx::_set_pga(int pga_gain)
+{
+ assert(pga_gain>=0 && pga_gain<=20);
+ if(d_which == 0)
+ {
+ usrp()->set_pga (0, pga_gain);
+ usrp()->set_pga (1, pga_gain);
+ }
+ else
+ {
+ usrp()->set_pga (2, pga_gain);
+ usrp()->set_pga (3, pga_gain);
+ }
+}
+
+/************ Public Functions **********************/
+void
+db_bitshark_rx::shutdown()
+{
+ if (!d_is_shutdown)
+ {
+ d_is_shutdown = true;
+ }
+}
+
+bool
+db_bitshark_rx::set_bw (float bw)
+{
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ uint16_t rf_bw_in_khz = (uint16_t)(bw/1000.0);
+ char val[4];
+ bool result = false;
+ uint8_t try_count = 0;
+
+ memset(val,0x00,4);
+ if (rf_bw_in_khz < 660 || rf_bw_in_khz > 56000)
+ {
+ fprintf(stderr, "db_bitshark_rx::set_bw: bw (=%d) must be between 660 KHz and 56 MHz inclusive\n", rf_bw_in_khz);
+ return false;
+ }
+ //fprintf(stdout,"Setting bw: requested bw in khz is %d\r\n",rf_bw_in_khz);
+ memcpy(val,&rf_bw_in_khz,4);
+ args[0] = RF_CHAN_FILTER_BW_REG;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_bw: giving up after 3 tries without success\n");
+ }
+
+ return result;
+}
+
+/* The gain referenced below is RF gain only. There are two independent
+ gain settings at RF: a digital step attenuator (providing 0, -6, -12, and
+ -18 dB of attenuation), and a second LNA (LNA2) that provides ~25 dB of
+ gain (roughly...it actually depends on the RF freq). So combining these
+ two stages can provide an overall gain range from 0 (which is mapped
+ to -18 dB on the step attenuator + LNA2 turned off) to 42 (which is
+ mapped to 0 dB on the step attenuator + LNA2 turned on).
+
+ There could be better ways to map these, but this is sufficient for
+ now. */
+float
+db_bitshark_rx::gain_min()
+{
+ return 0;
+}
+
+float
+db_bitshark_rx::gain_max()
+{
+ return 42;
+}
+
+float
+db_bitshark_rx::gain_db_per_step()
+{
+ return 6;
+}
+
+bool
+db_bitshark_rx::set_gain(float gain)
+{
+ // Set the gain.
+ //
+ // @param gain: RF gain in decibels, range of 0-42
+ // @returns True/False
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ bool result = false;
+ uint8_t try_count = 0;
+
+ if (gain < gain_min() || gain > gain_max())
+ {
+ fprintf(stderr,"db_bitshark_rx::set_gain: gain (=%f) must be between %f and %f inclusive\n", gain,gain_min(),gain_max());
+ return false;
+ }
+ //fprintf(stdout,"db_bitshark_rx::set_gain: requested gain of %f\r\n",gain);
+ args[0] = RF_GAIN_REG;
+ args[5] = (int)gain;
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_gain: giving up after 3 tries without success\n");
+ }
+
+ return result;
+}
+
+
+bool
+db_bitshark_rx::set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clk_freq)
+{
+ // Set the clock scheme for determining how the BURX
+ // dboard receives its clock. Note: Ideally, the constructor for the
+ // BURX board could simply call this method to set how it wants the
+ // clock scheme configured. However, depending on the application
+ // using the daughterboard, the constructor may run _after_ some
+ // other portion of the application needs the FPGA. And if the
+ // the clock source for the FPGA was the BURX's 26 MHz TCXO, we're in
+ // a chicken-before-the-egg dilemna. So the solution is to leave
+ // this function here for reference in case an app wants to use it,
+ // and also give the user the ability to set the clock scheme through
+ // the usrper cmd-line application (see example at the top of this
+ // file).
+ //
+ // @param clock_scheme
+ // @param ref_clk_freq in Hz
+ // @returns True/False
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ bool result = false;
+ uint8_t try_count = 0;
+ char val[4];
+
+ if (clock_scheme > 1)
+ {
+ fprintf(stderr,"db_bitshark_rx::set_clock_scheme: invalid scheme %d\n",clock_scheme);
+ return false;
+ }
+ //fprintf(stdout,"db_bitshark_rx::set_clock_scheme: requested clock schem of %d with freq %d Hz \n",clock_scheme,ref_clk_freq);
+ memcpy(val,&ref_clk_freq,4);
+ args[0] = CLOCK_SCHEME_REG;
+ args[4] = (int)clock_scheme;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_clock_scheme: giving up after 3 tries without success\n");
+ }
+ return result;
+}
+
+double
+db_bitshark_rx::freq_min()
+{
+ return 300e6;
+}
+
+double
+db_bitshark_rx::freq_max()
+{
+ return 4e9;
+}
+
+struct freq_result_t
+db_bitshark_rx::set_freq(double freq)
+{
+ // Set the frequency.
+ //
+ // @param freq: target RF frequency in Hz
+ // @type freq: double
+ //
+ // @returns (ok, actual_baseband_freq) where:
+ // ok is True or False and indicates success or failure,
+ // actual_baseband_freq is RF frequency that corresponds to DC in the IF.
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ std::vector<int> bytes(2);
+ char val[4];
+ freq_result_t act_freq = {false, 0};
+ uint32_t freq_in_khz = (uint32_t)(freq/1000.0);
+ bool result = false;
+ uint8_t try_count = 0;
+
+ memset(val,0x00,4);
+ if(!(freq>=freq_min() && freq<=freq_max()))
+ {
+ return act_freq;
+ }
+
+ //fprintf(stdout,"db_bitshark_rx::set_freq: requested freq is %d KHz\n",freq_in_khz);
+ memcpy(val,&freq_in_khz,4);
+ args[0] = RF_CENTER_FREQ_REG;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_freq: giving up after 3 tries without success\n");
+ }
+
+ act_freq.ok = result;
+ act_freq.baseband_freq = (double)freq;
+ return act_freq;
+}
+
+bool
+db_bitshark_rx::is_quadrature()
+{
+ // Return True if this board requires both I & Q analog channels.
+ return true;
+}
+
+bool
+db_bitshark_rx::i_and_q_swapped()
+{
+ // Returns True since our I and Q channels are swapped
+ return true;
+}
diff --git a/usrp/host/lib/db_boards.cc b/usrp/host/lib/db_boards.cc
index 590d8132d..9324d58ee 100644
--- a/usrp/host/lib/db_boards.cc
+++ b/usrp/host/lib/db_boards.cc
@@ -36,6 +36,7 @@
#include <usrp/db_xcvr2450.h>
#include <usrp/db_dtt754.h>
#include <usrp/db_dtt768.h>
+#include <usrp/db_bitshark_rx.h>
#include <cstdio>
std::vector<db_base_sptr>
@@ -209,6 +210,10 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
db.push_back(db_base_sptr(new db_dtt768(usrp, which_side)));
break;
+ case(USRP_DBID_BITSHARK_RX):
+ db.push_back(db_base_sptr(new db_bitshark_rx(usrp, which_side)));
+ break;
+
case(-1):
if (boost::dynamic_pointer_cast<usrp_basic_tx>(usrp)){
db.push_back(db_base_sptr(new db_basic_tx(usrp, which_side)));
diff --git a/usrp/host/lib/db_wbxng.cc b/usrp/host/lib/db_wbxng.cc
index b35a9cb35..bd836dfe3 100644
--- a/usrp/host/lib/db_wbxng.cc
+++ b/usrp/host/lib/db_wbxng.cc
@@ -80,7 +80,9 @@ wbxng_base::set_freq(double freq)
actual_baseband_freq is the RF frequency that corresponds to DC in the IF.
*/
- freq_t int_freq = freq_t(freq);
+ // clamp freq
+ freq_t int_freq = freq_t(std::max(freq_min(), std::min(freq, freq_max())));
+
bool ok = d_common->_set_freq(int_freq*2);
double freq_result = (double) d_common->_get_freq()/2.0;
struct freq_result_t args = {ok, freq_result};
diff --git a/usrp/host/lib/fusb_darwin.cc b/usrp/host/lib/fusb_darwin.cc
index 95c4878aa..d2966c115 100644
--- a/usrp/host/lib/fusb_darwin.cc
+++ b/usrp/host/lib/fusb_darwin.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -24,9 +24,6 @@
#include "config.h"
#endif
-// tell mld_threads to NOT use omni_threads,
-// but rather Darwin's pthreads
-#define _USE_OMNI_THREADS_
#define DO_DEBUG 0
#include <usb.h>
@@ -85,10 +82,12 @@ fusb_ephandle_darwin::fusb_ephandle_darwin (fusb_devhandle_darwin* dh,
l_buf = NULL;
}
- d_readRunning = new mld_mutex ();
- d_runThreadRunning = new mld_mutex ();
- d_runBlock = new mld_condition ();
- d_readBlock = new mld_condition ();
+ d_readRunning = new gruel::mutex ();
+ d_runThreadRunning = new gruel::mutex ();
+ d_runBlock = new gruel::condition_variable ();
+ d_readBlock = new gruel::condition_variable ();
+ d_runBlock_mutex = new gruel::mutex ();
+ d_readBlock_mutex = new gruel::mutex ();
}
fusb_ephandle_darwin::~fusb_ephandle_darwin ()
@@ -116,6 +115,10 @@ fusb_ephandle_darwin::~fusb_ephandle_darwin ()
d_readRunning = NULL;
delete d_runThreadRunning;
d_runThreadRunning = NULL;
+ delete d_runBlock_mutex;
+ d_runBlock_mutex = NULL;
+ delete d_readBlock_mutex;
+ d_readBlock_mutex = NULL;
delete d_runBlock;
d_runBlock = NULL;
delete d_readBlock;
@@ -200,14 +203,14 @@ fusb_ephandle_darwin::start ()
// lock the runBlock mutex, before creating the run thread.
// this guarantees that we can control execution between these 2 threads
- d_runBlock->mutex ()->lock ();
+ gruel::scoped_lock l (*d_runBlock_mutex);
// create the run thread, which allows OSX to process I/O separately
- d_runThread = new mld_thread (run_thread, this);
+ d_runThread = new gruel::thread (run_thread, this);
// wait until the run thread (and possibky read thread) are -really-
// going; this will unlock the mutex before waiting for a signal ()
- d_runBlock->wait ();
+ d_runBlock->wait (l);
if (usb_debug) {
std::cerr << "fusb_ephandle_darwin::start: " << (d_input_p ? "read" : "write")
@@ -225,12 +228,12 @@ fusb_ephandle_darwin::run_thread (void* arg)
// lock the run thread running mutex; if ::stop() is called, it will
// first abort() the pipe then wait for the run thread to finish,
// via a lock() on this mutex
- mld_mutex_ptr l_runThreadRunning = This->d_runThreadRunning;
- l_runThreadRunning->lock ();
+ gruel::mutex* l_runThreadRunning = This->d_runThreadRunning;
+ gruel::scoped_lock l0 (*l_runThreadRunning);
- mld_mutex_ptr l_readRunning = This->d_readRunning;
- mld_condition_ptr l_readBlock = This->d_readBlock;
- mld_mutex_ptr l_readBlock_mutex = l_readBlock->mutex ();
+ gruel::mutex* l_readRunning = This->d_readRunning;
+ gruel::condition_variable* l_readBlock = This->d_readBlock;
+ gruel::mutex* l_readBlock_mutex = This->d_readBlock_mutex;
bool l_input_p = This->d_input_p;
@@ -250,41 +253,39 @@ fusb_ephandle_darwin::run_thread (void* arg)
// get run loop reference, to allow other threads to stop
This->d_CFRunLoopRef = CFRunLoopGetCurrent ();
- mld_thread_ptr l_rwThread = NULL;
+ gruel::thread* l_rwThread = NULL;
if (l_input_p) {
// lock the readBlock mutex, before creating the read thread.
// this guarantees that we can control execution between these 2 threads
- l_readBlock_mutex->lock ();
+ gruel::scoped_lock l1 (*l_readBlock_mutex);
// create the read thread, which just issues all of the starting
// async read commands, then returns
- l_rwThread = new mld_thread (read_thread, arg);
+ l_rwThread = new gruel::thread (read_thread, arg);
// wait until the the read thread is -really- going; this will
// unlock the read block mutex before waiting for a signal ()
- l_readBlock->wait ();
+ l_readBlock->wait (l1);
}
- // now signal the run condition to release and finish ::start().
+ {
+ // now signal the run condition to release and finish ::start().
- // lock the runBlock mutex first; this will force waiting until the
- // ->wait() command is issued in ::start()
- mld_mutex_ptr l_run_block_mutex = This->d_runBlock->mutex ();
- l_run_block_mutex->lock ();
+ // lock the runBlock mutex first; this will force waiting until the
+ // ->wait() command is issued in ::start()
+ gruel::mutex* l_run_block_mutex = This->d_runBlock_mutex;
+ gruel::scoped_lock l2 (*l_run_block_mutex);
- // now that the lock is in place, signal the parent thread that
- // things are running
- This->d_runBlock->signal ();
-
- // release the run_block mutex, just in case
- l_run_block_mutex->unlock ();
+ // now that the lock is in place, signal the parent thread that
+ // things are running
+ This->d_runBlock->notify_one ();
+ }
// run the loop
CFRunLoopRun ();
if (l_input_p) {
// wait for read_thread () to finish, if needed
- l_readRunning->lock ();
- l_readRunning->unlock ();
+ gruel::scoped_lock l3 (*l_readRunning);
}
// remove run loop stuff
@@ -295,9 +296,6 @@ fusb_ephandle_darwin::run_thread (void* arg)
std::cerr << "fusb_ephandle_darwin::run_thread: finished for "
<< (l_input_p ? "read" : "write") << "." << std::endl;
}
-
- // release the run thread running mutex
- l_runThreadRunning->unlock ();
}
void
@@ -311,23 +309,23 @@ fusb_ephandle_darwin::read_thread (void* arg)
// before doing anything else, lock the read running mutex. this
// mutex does flow control between this thread and the run_thread
- mld_mutex_ptr l_readRunning = This->d_readRunning;
- l_readRunning->lock ();
+ gruel::mutex* l_readRunning = This->d_readRunning;
+ gruel::scoped_lock l0 (*l_readRunning);
// signal the read condition from run_thread() to continue
// lock the readBlock mutex first; this will force waiting until the
// ->wait() command is issued in ::run_thread()
- mld_condition_ptr l_readBlock = This->d_readBlock;
- mld_mutex_ptr l_read_block_mutex = l_readBlock->mutex ();
- l_read_block_mutex->lock ();
+ gruel::condition_variable* l_readBlock = This->d_readBlock;
+ gruel::mutex* l_read_block_mutex = This->d_readBlock_mutex;
- // now that the lock is in place, signal the parent thread that
- // things are running here
- l_readBlock->signal ();
+ {
+ gruel::scoped_lock l1 (*l_read_block_mutex);
- // release the run_block mutex, just in case
- l_read_block_mutex->unlock ();
+ // now that the lock is in place, signal the parent thread that
+ // things are running here
+ l_readBlock->notify_one ();
+ }
// queue up all of the available read requests
s_queue_ptr l_queue = This->d_queue;
@@ -341,10 +339,6 @@ fusb_ephandle_darwin::read_thread (void* arg)
if (usb_debug) {
std::cerr << "fusb_ephandle_darwin::read_thread: finished." << std::endl;
}
-
- // release the read running mutex, to let the parent thread knows
- // that this thread is finished
- l_readRunning->unlock ();
}
void
@@ -569,8 +563,7 @@ fusb_ephandle_darwin::stop ()
CFRunLoopStop (d_CFRunLoopRef);
// wait for the runThread to stop
- d_runThreadRunning->lock ();
- d_runThreadRunning->unlock ();
+ gruel::scoped_lock l (*d_runThreadRunning);
if (usb_debug) {
std::cerr << "fusb_ephandle_darwin::stop: " << (d_input_p ? "read" : "write")
diff --git a/usrp/host/lib/fusb_darwin.h b/usrp/host/lib/fusb_darwin.h
index 735e5f16d..4d18177be 100644
--- a/usrp/host/lib/fusb_darwin.h
+++ b/usrp/host/lib/fusb_darwin.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
@@ -150,8 +150,8 @@ class fusb_ephandle_darwin : public fusb_ephandle
{
private:
fusb_devhandle_darwin* d_devhandle;
- mld_thread_ptr d_runThread;
- mld_mutex_ptr d_runThreadRunning;
+ gruel::thread* d_runThread;
+ gruel::mutex* d_runThreadRunning;
CFRunLoopRef d_CFRunLoopRef;
@@ -174,8 +174,11 @@ public:
s_queue_ptr d_queue;
circular_buffer<char>* d_buffer;
size_t d_bufLenBytes;
- mld_mutex_ptr d_readRunning;
- mld_condition_ptr d_runBlock, d_readBlock;
+ gruel::mutex* d_readRunning;
+ gruel::mutex* d_runBlock_mutex;
+ gruel::mutex* d_readBlock_mutex;
+ gruel::condition_variable* d_runBlock;
+ gruel::condition_variable* d_readBlock;
// CREATORS
diff --git a/usrp/host/lib/mld_threads.h b/usrp/host/lib/mld_threads.h
deleted file mode 100644
index 322f557b6..000000000
--- a/usrp/host/lib/mld_threads.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio.
- *
- * Primary Author: Michael Dickens, NCIP Lab, University of Notre Dame
- *
- * 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.
- */
-
-#ifndef _INCLUDED_MLD_THREADS_H_
-#define _INCLUDED_MLD_THREADS_H_
-
-/* classes which allow for either pthreads or omni_threads */
-
-#define __macos__
-#ifdef _USE_OMNI_THREADS_
-#include <gnuradio/omnithread.h>
-#else
-#include <pthread.h>
-#endif
-
-#include <stdexcept>
-
-#define __INLINE__ inline
-
-#ifndef DO_DEBUG
-#define DO_DEBUG 0
-#endif
-
-#if DO_DEBUG
-#define DEBUG(X) do{X} while(0);
-#else
-#define DEBUG(X) do{} while(0);
-#endif
-
-class mld_condition_t;
-
-class mld_mutex_t {
-#ifdef _USE_OMNI_THREADS_
- typedef omni_mutex l_mutex, *l_mutex_ptr;
-#else
- typedef pthread_mutex_t l_mutex, *l_mutex_ptr;
-#endif
-
- friend class mld_condition_t;
-
-private:
- l_mutex_ptr d_mutex;
-
-protected:
- inline l_mutex_ptr mutex () { return (d_mutex); };
-
-public:
- __INLINE__ mld_mutex_t () {
-#ifdef _USE_OMNI_THREADS_
- d_mutex = new omni_mutex ();
-#else
- d_mutex = (l_mutex_ptr) new l_mutex;
- int l_ret = pthread_mutex_init (d_mutex, NULL);
- if (l_ret != 0) {
- fprintf (stderr, "Error %d creating mutex.\n", l_ret);
- throw std::runtime_error ("mld_mutex_t::mld_mutex_t()\n");
- }
-#endif
- };
-
- __INLINE__ ~mld_mutex_t () {
- unlock ();
-#ifndef _USE_OMNI_THREADS_
- int l_ret = pthread_mutex_destroy (d_mutex);
- if (l_ret != 0) {
- fprintf (stderr, "mld_mutex_t::~mld_mutex_t(): "
- "Error %d destroying mutex.\n", l_ret);
- }
-#endif
- delete d_mutex;
- d_mutex = NULL;
- };
-
- __INLINE__ void lock () {
-#ifdef _USE_OMNI_THREADS_
- d_mutex->lock ();
-#else
- int l_ret = pthread_mutex_lock (d_mutex);
- if (l_ret != 0) {
- fprintf (stderr, "mld_mutex_t::lock(): "
- "Error %d locking mutex.\n", l_ret);
- }
-#endif
- };
-
- __INLINE__ void unlock () {
-#ifdef _USE_OMNI_THREADS_
- d_mutex->unlock ();
-#else
- int l_ret = pthread_mutex_unlock (d_mutex);
- if (l_ret != 0) {
- fprintf (stderr, "mld_mutex_t::unlock(): "
- "Error %d locking mutex.\n", l_ret);
- }
-#endif
- };
-
- __INLINE__ bool trylock () {
-#ifdef _USE_OMNI_THREADS_
- int l_ret = d_mutex->trylock ();
-#else
- int l_ret = pthread_mutex_unlock (d_mutex);
-#endif
- return (l_ret == 0 ? true : false);
- };
-
- inline void acquire () { lock(); };
- inline void release () { unlock(); };
- inline void wait () { lock(); };
- inline void post () { unlock(); };
-};
-
-typedef mld_mutex_t mld_mutex, *mld_mutex_ptr;
-
-class mld_condition_t {
-#ifdef _USE_OMNI_THREADS_
- typedef omni_condition l_condition, *l_condition_ptr;
-#else
- typedef pthread_cond_t l_condition, *l_condition_ptr;
-#endif
-
-private:
- l_condition_ptr d_condition;
- mld_mutex_ptr d_mutex;
- bool d_i_own_mutex;
-
-public:
- __INLINE__ mld_condition_t (mld_mutex_ptr mutex = NULL) {
- if (mutex) {
- d_i_own_mutex = false;
- d_mutex = mutex;
- } else {
- d_i_own_mutex = true;
- d_mutex = new mld_mutex ();
- }
-#ifdef _USE_OMNI_THREADS_
- d_condition = new omni_condition (d_mutex->mutex ());
-#else
- d_condition = (l_condition_ptr) new l_condition;
- int l_ret = pthread_cond_init (d_condition, NULL);
- if (l_ret != 0) {
- fprintf (stderr, "Error %d creating condition.\n", l_ret);
- throw std::runtime_error ("mld_condition_t::mld_condition_t()\n");
- }
-#endif
- };
-
- __INLINE__ ~mld_condition_t () {
- signal ();
-#ifndef _USE_OMNI_THREADS_
- int l_ret = pthread_cond_destroy (d_condition);
- if (l_ret != 0) {
- fprintf (stderr, "mld_condition_t::mld_condition_t(): "
- "Error %d destroying condition.\n", l_ret);
- }
-#endif
- delete d_condition;
- d_condition = NULL;
- if (d_i_own_mutex)
- delete d_mutex;
- d_mutex = NULL;
- };
-
- __INLINE__ mld_mutex_ptr mutex () {return (d_mutex);};
-
- __INLINE__ void signal () {
- DEBUG (fprintf (stderr, "a "););
-
-#ifdef _USE_OMNI_THREADS_
- d_condition->signal ();
-#else
- int l_ret = pthread_cond_signal (d_condition);
- if (l_ret != 0) {
- fprintf (stderr, "mld_condition_t::signal(): "
- "Error %d.\n", l_ret);
- }
-#endif
- DEBUG (fprintf (stderr, "b "););
- };
-
- __INLINE__ void wait () {
- DEBUG (fprintf (stderr, "c "););
-#ifdef _USE_OMNI_THREADS_
- d_condition->wait ();
-#else
- int l_ret = pthread_cond_wait (d_condition, d_mutex->mutex ());
- if (l_ret != 0) {
- fprintf (stderr, "mld_condition_t::wait(): "
- "Error %d.\n", l_ret);
- }
-#endif
- DEBUG (fprintf (stderr, "d "););
- };
-};
-
-typedef mld_condition_t mld_condition, *mld_condition_ptr;
-
-class mld_thread_t {
-#ifdef _USE_OMNI_THREADS_
- typedef omni_thread l_thread, *l_thread_ptr;
-#else
- typedef pthread_t l_thread, *l_thread_ptr;
-#endif
-
-private:
-#ifndef _USE_OMNI_THREADS_
- l_thread d_thread;
- void (*d_start_routine)(void*);
- void *d_arg;
-#else
- l_thread_ptr d_thread;
-#endif
-
-#ifndef _USE_OMNI_THREADS_
- static void* local_start_routine (void *arg) {
- mld_thread_t* This = (mld_thread_t*) arg;
- (*(This->d_start_routine))(This->d_arg);
- return (NULL);
- };
-#endif
-
-public:
- __INLINE__ mld_thread_t (void (*start_routine)(void *), void *arg) {
-#ifdef _USE_OMNI_THREADS_
- d_thread = new omni_thread (start_routine, arg);
- d_thread->start ();
-#else
- d_start_routine = start_routine;
- d_arg = arg;
- int l_ret = pthread_create (&d_thread, NULL, local_start_routine, this);
- if (l_ret != 0) {
- fprintf (stderr, "Error %d creating thread.\n", l_ret);
- throw std::runtime_error ("mld_thread_t::mld_thread_t()\n");
- }
-#endif
- };
-
- __INLINE__ ~mld_thread_t () {
-#ifdef _USE_OMNI_THREADS_
-// delete d_thread;
- d_thread = NULL;
-#else
- int l_ret = pthread_detach (d_thread);
- if (l_ret != 0) {
- fprintf (stderr, "Error %d detaching thread.\n", l_ret);
- throw std::runtime_error ("mld_thread_t::~mld_thread_t()\n");
- }
-#endif
- };
-};
-
-typedef mld_thread_t mld_thread, *mld_thread_ptr;
-
-#endif /* _INCLUDED_MLD_THREADS_H_ */
diff --git a/usrp/host/lib/usrp_dbid.dat b/usrp/host/lib/usrp_dbid.dat
index 7d1e18714..5193a5fa0 100644
--- a/usrp/host/lib/usrp_dbid.dat
+++ b/usrp/host/lib/usrp_dbid.dat
@@ -84,5 +84,7 @@
"XCVR2450 Tx" 0x0060
"XCVR2450 Rx" 0x0061
+"Bitshark Rx" 0x0070
+
"Experimental Tx" 0xfffe
"Experimental Rx" 0xffff
diff --git a/usrp/limbo/apps-inband/.gitignore b/usrp/limbo/apps-inband/.gitignore
deleted file mode 100644
index f62d9e1de..000000000
--- a/usrp/limbo/apps-inband/.gitignore
+++ /dev/null
@@ -1,35 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/*.dat
-/.*.swp
-/usrper
-/usrper2
-/test_input
-/test_fusb
-/test_usrp
-/test_usrp0
-/test_usrp_standard_rx
-/test_usrp_standard_tx
-/test_usrp_standard_2tx
-/test_usrp_inband_timestamps
-/test_usrp_inband_registers
-/test_usrp_inband_rx
-/test_usrp_inband_2rx
-/test_usrp_inband_tx
-/test_usrp_inband_2tx
-/test_usrp_basic_rx
-/check_order_quickly
-/usrp_cal_dc_offset
-/test_usrp_inband_cs
-/read_packets
-/test_usrp_inband_ping
-/test_usrp_inband_underrun
-/test_usrp_inband_overrun
-/gmac_mbh.cc
-/test_gmac_tx
diff --git a/usrp/limbo/apps-inband/Makefile.am b/usrp/limbo/apps-inband/Makefile.am
deleted file mode 100644
index 0a44d8112..000000000
--- a/usrp/limbo/apps-inband/Makefile.am
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright 2003,2006,2008 Free Software Foundation, Inc.
-#
-# 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.
-#
-
-include $(top_srcdir)/Makefile.common
-
-AM_CPPFLAGS = \
- $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
- $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) $(BOOST_CPPFLAGS) \
- $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) -I$(top_srcdir)/mblock/src/lib
-
-
-bin_PROGRAMS =
-
-noinst_PROGRAMS = \
- test_usrp_inband_ping \
- test_usrp_inband_registers \
- test_usrp_inband_rx \
- test_usrp_inband_2rx \
- test_usrp_inband_tx \
- test_usrp_inband_2tx \
- test_usrp_inband_timestamps \
- test_usrp_inband_overrun \
- test_usrp_inband_underrun \
- read_packets
-
-noinst_HEADERS = \
- ui_nco.h \
- ui_sincos.h
-
-
-test_usrp_inband_ping_SOURCES = test_usrp_inband_ping.cc
-test_usrp_inband_ping_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_tx_SOURCES = test_usrp_inband_tx.cc ui_sincos.c
-test_usrp_inband_tx_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_2tx_SOURCES = test_usrp_inband_2tx.cc ui_sincos.c
-test_usrp_inband_2tx_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_timestamps_SOURCES = test_usrp_inband_timestamps.cc ui_sincos.c
-test_usrp_inband_timestamps_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_registers_SOURCES = test_usrp_inband_registers.cc ui_sincos.c
-test_usrp_inband_registers_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_overrun_SOURCES = test_usrp_inband_overrun.cc
-test_usrp_inband_overrun_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_underrun_SOURCES = test_usrp_inband_underrun.cc
-test_usrp_inband_underrun_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_rx_SOURCES = test_usrp_inband_rx.cc ui_sincos.c
-test_usrp_inband_rx_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-test_usrp_inband_2rx_SOURCES = test_usrp_inband_2rx.cc ui_sincos.c
-test_usrp_inband_2rx_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
-
-read_packets_SOURCES = read_packets.cc
-read_packets_LDADD = $(USRP_LA) $(USRP_INBAND_LA)
diff --git a/usrp/limbo/apps-inband/read_packets.cc b/usrp/limbo/apps-inband/read_packets.cc
deleted file mode 100644
index 24a1e88b5..000000000
--- a/usrp/limbo/apps-inband/read_packets.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <iostream>
-#include <usrp_inband_usb_packet.h>
-#include <mblock/class_registry.h>
-#include <vector>
-#include <usrp_usb_interface.h>
-#include <fstream>
-
-typedef usrp_inband_usb_packet transport_pkt; // makes conversion to gigabit easy
-
-int main(int argc, char *argv[]) {
-
- if(argc !=2) {
- std::cout << "Usage: ./read_packets <data_file>\n";
- return -1;
- }
-
- std::ifstream infile;
- std::ofstream outfile;
-
- unsigned int pkt_size = transport_pkt::max_pkt_size();
- unsigned int pkt_num=0;
-
- transport_pkt *pkt;
- char pkt_data[pkt_size]; // allocate the number of bytes for a single packet
-
- pkt = (transport_pkt *)pkt_data; // makes operations cleaner to read
-
- // Open the file and read the packets, dumping information
- infile.open(argv[1], std::ios::binary|std::ios::in);
- if(!infile.is_open())
- exit(-1);
-
- //outfile.open("dump.dat",std::ios::out|std::ios::binary);
-
- // read 1 packet in to the memory
- infile.read(pkt_data, pkt_size);
-
- while(!infile.eof()) {
-
- printf("Packet %u\n", pkt_num);
-
- if(pkt->start_of_burst())
- printf("\tstart of burst\n");
-
- if(pkt->end_of_burst())
- printf("\tend of burst\n");
-
-// if(pkt->carrier_sense())
-// printf("\tcarrier sense\n");
-
- if(pkt->underrun())
- printf("\tunderrun\n");
-
- if(pkt->overrun())
- printf("\toverrun\n");
-
- printf("\tchannel: \t0x%x\n", pkt->chan());
- printf("\ttimestamp: \t0x%x\n", pkt->timestamp());
- //printf("\ttimestamp: \t%u\n", pkt->timestamp());
- printf("\tlength: \t%u\n", pkt->payload_len());
- printf("\trssi: \t%u\n", pkt->rssi());
-
- printf("\tpayload: \n");
- for(int i=0; i < pkt->payload_len(); i++)
- //for(int i=0; i < pkt->max_payload(); i++)
- {
- printf("\t%d\t0x%x\n", i, *(pkt->payload()+i));
- //outfile.write((const char*)(pkt->payload()+i),1);
- //printf("\t\t0x%x\n", pkt->payload()+i);
-
- }
- printf("\n\n");
-
- pkt_num++;
-
- // read 1 packet in to the memory
- infile.read(pkt_data, pkt_size);
-
- }
-
- infile.close();
- //outfile.close();
-
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_2rx.cc b/usrp/limbo/apps-inband/test_usrp_inband_2rx.cc
deleted file mode 100644
index c210f196a..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_2rx.cc
+++ /dev/null
@@ -1,371 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mb_runtime_nop.h> // QA only
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mb_mblock_impl.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <fstream>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = true;
-
-class test_usrp_rx : public mb_mblock
-{
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
- pmt_t d_rx_chan0, d_rx_chan1;
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- RECEIVING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
-
- std::ofstream d_ofile;
-
- long d_samples_recvd;
- long d_samples_to_recv;
-
- public:
- test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_rx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_receiving();
- void build_and_send_next_frame();
- void handle_response_recv_raw_samples(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_rx_chan0(PMT_NIL), d_rx_chan1(PMT_NIL),
- d_samples_recvd(0),
- d_samples_to_recv(20e6)
-{
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Pass a dictionary to usrp_server which specifies which interface to use, the stub or USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // To test the application without a USRP
- bool fake_usrp_p = false;
- if(fake_usrp_p) {
- pmt_dict_set(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_T);
- }
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_2rxhb_2tx.rbf"));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(64));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-test_usrp_rx::~test_usrp_rx()
-{
-}
-
-void
-test_usrp_rx::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_rx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- switch(d_state){
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // Allocate an RX channel to perform the overrun test.
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
- status = pmt_nth(1, data);
- if(pmt_eqv(d_rx_chan0, PMT_NIL))
- d_rx_chan0 = pmt_nth(2, data);
- else
- d_rx_chan1 = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T) && !pmt_eqv(d_rx_chan1, PMT_NIL)){
- enter_receiving();
- return;
- }
- else if(pmt_eq(status, PMT_F)){
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- return;
- }
- goto unhandled;
-
- //--------------------------- RECEIVING ------------------------------//
- // In the receiving state, we receive samples until the specified amount
- // while counting the number of overruns.
- case RECEIVING:
- if (pmt_eq(event, s_response_recv_raw_samples)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_response_recv_raw_samples(data);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
- goto unhandled;
-
- //------------------------- CLOSING CHANNEL ----------------------------//
- // Check deallocation response for the RX channel
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
-
- // Alternately, we ignore all response recv samples while waiting for the
- // channel to actually close
- if (pmt_eq(event, s_response_recv_raw_samples))
- return;
-
- goto unhandled;
-
- //--------------------------- CLOSING USRP ------------------------------//
- // Once we have received a successful USRP close response, we shutdown all
- // mblocks and exit.
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- fflush(stdout);
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose && !pmt_eq(event, pmt_intern("%shutdown")))
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_rx::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Opening the USRP\n";
-}
-
-void
-test_usrp_rx::close_usrp()
-{
-
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Closing the USRP\n";
-}
-
-void
-test_usrp_rx::allocate_channel()
-{
- long capacity = (long) 16e6;
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Requesting RX channel allocation\n";
-}
-
-void
-test_usrp_rx::enter_receiving()
-{
- d_state = RECEIVING;
-
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan0));
-
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan1));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Receiving...\n";
-}
-
-void
-test_usrp_rx::handle_response_recv_raw_samples(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t v_samples = pmt_nth(2, data);
- pmt_t timestamp = pmt_nth(3, data);
- pmt_t channel = pmt_nth(4, data);
- pmt_t properties = pmt_nth(5, data);
-
- d_samples_recvd += pmt_length(v_samples) / 4;
-
- // Check for overrun
- if(!pmt_is_dict(properties)) {
- std::cout << "[TEST_USRP_INBAND_RX] Recv samples dictionary is improper\n";
- return;
- }
-
- // Check if the number samples we have received meets the test
- if(d_samples_recvd >= d_samples_to_recv) {
- d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan0));
- d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan1));
- enter_closing_channel();
- return;
- }
-
-}
-
-void
-test_usrp_rx::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan0));
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan1));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Deallocating RX channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_rx);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_rx", PMT_F, &result);
-
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_2tx.cc b/usrp/limbo/apps-inband/test_usrp_inband_2tx.cc
deleted file mode 100644
index 11a1a491c..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_2tx.cc
+++ /dev/null
@@ -1,430 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mb_runtime_nop.h> // QA only
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mb_mblock_impl.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-
-#include <ui_nco.h>
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-
-static bool verbose = true;
-
-class test_usrp_tx : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_cs;
- pmt_t d_tx_chan0, d_tx_chan1;
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- TRANSMITTING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
- long d_nsamples_to_send;
- long d_nsamples_xmitted;
- long d_nframes_xmitted;
- long d_samples_per_frame;
- bool d_done_sending;
-
- // for generating sine wave output
- ui_nco<float,float> d_nco;
- double d_amplitude;
-
- public:
- test_usrp_tx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_tx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_transmitting();
- void build_and_send_next_frame();
- void handle_xmit_response(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_tx::test_usrp_tx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_tx_chan0(PMT_NIL), d_tx_chan1(PMT_NIL),
- d_state(INIT), d_nsamples_to_send((long) 80e6),
- d_nsamples_xmitted(0),
- d_nframes_xmitted(0),
- d_samples_per_frame((long)(126 * 4)), // full packet
- d_done_sending(false),
- d_amplitude(16384)
-{
- // std::cout << "[TEST_USRP_TX] Initializing...\n";
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- //bool fake_usrp_p = true;
- bool fake_usrp_p = false;
-
- // Test the TX side
-
- pmt_t usrp_dict = pmt_make_dict();
-
- if(fake_usrp_p) {
- pmt_dict_set(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_T);
- }
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_2rxhb_2tx.rbf"));
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(128));
-
-// pmt_dict_set(usrp_dict,
-// pmt_intern("rf-freq"),
-// pmt_from_long(10e6));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "tx0", "server", "tx0");
- connect("self", "cs", "server", "cs");
-
- // initialize NCO
- double freq = 100e3;
- int interp = 32; // 32 -> 4MS/s
- double sample_rate = 128e6 / interp;
- d_nco.set_freq(2*M_PI * freq/sample_rate);
-
- // FIXME need to somehow set the interp rate in the USRP.
- // for now, we'll have the low-level code hardwire it.
-}
-
-test_usrp_tx::~test_usrp_tx()
-{
-}
-
-void
-test_usrp_tx::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_tx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- //std::cout << msg << std::endl;
-
- switch(d_state){
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
- status = pmt_nth(1, data);
- if(pmt_eqv(d_tx_chan0, PMT_NIL))
- d_tx_chan0 = pmt_nth(2, data);
- else
- d_tx_chan1 = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T) && !pmt_eqv(d_tx_chan1, PMT_NIL)){
- enter_transmitting();
- return;
- }
- else if(pmt_eq(status, PMT_F)){
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- return;
- }
- goto unhandled;
-
- case TRANSMITTING:
- if (pmt_eq(event, s_response_xmit_raw_frame)){
- handle = pmt_nth(0, data);
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_xmit_response(handle);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- unhandled:
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_tx::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Opening the USRP\n";
-}
-
-void
-test_usrp_tx::close_usrp()
-{
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Closing the USRP\n";
-}
-
-void
-test_usrp_tx::allocate_channel()
-{
- long capacity = (long) 16e6;
-
- // Send two capacity requests, which will allocate us two channels
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Requesting TX channel allocation\n";
-}
-
-void
-test_usrp_tx::enter_transmitting()
-{
- d_state = TRANSMITTING;
- d_nsamples_xmitted = 0;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitting...\n";
-
- build_and_send_next_frame(); // fire off 4 to start pipeline
- build_and_send_next_frame();
- build_and_send_next_frame();
- build_and_send_next_frame();
-}
-
-void
-test_usrp_tx::build_and_send_next_frame()
-{
- // allocate the uniform vector for the samples
- // FIXME perhaps hold on to this between calls
-
-#if 1
- long nsamples_this_frame =
- std::min(d_nsamples_to_send - d_nsamples_xmitted,
- d_samples_per_frame);
-#else
- long nsamples_this_frame = d_samples_per_frame;
-#endif
-
- if (nsamples_this_frame == 0){
- d_done_sending = true;
- return;
- }
-
-
- size_t nshorts = 2 * nsamples_this_frame; // 16-bit I & Q
- pmt_t uvec = pmt_make_s16vector(nshorts, 0);
- size_t ignore;
- int16_t *samples = pmt_s16vector_writable_elements(uvec, ignore);
-
- // fill in the complex sinusoid
-
- for (int i = 0; i < nsamples_this_frame; i++){
-
- if (1){
- gr_complex s;
- d_nco.sincos(&s, 1, d_amplitude);
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- else {
- gr_complex s(d_amplitude, d_amplitude);
-
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- }
-
- pmt_t tx_properties = pmt_make_dict();
-
- pmt_t timestamp = pmt_from_long(0xffffffff); // NOW
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list5(pmt_from_long(d_nframes_xmitted), // invocation-handle
- d_tx_chan0, // channel
- uvec, // the samples
- timestamp,
- tx_properties));
-
- // Resend on channel 1
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list5(pmt_from_long(d_nframes_xmitted), // invocation-handle
- d_tx_chan1, // channel
- uvec, // the samples
- timestamp,
- tx_properties));
-
- d_nsamples_xmitted += nsamples_this_frame;
- d_nframes_xmitted++;
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitted frame\n";
-}
-
-
-void
-test_usrp_tx::handle_xmit_response(pmt_t handle)
-{
- if (d_done_sending &&
- pmt_to_long(handle) == (d_nframes_xmitted - 1)){
- // We're done sending and have received all responses
- enter_closing_channel();
- }
-
- build_and_send_next_frame();
-}
-
-void
-test_usrp_tx::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- // Deallocate both channels
- d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan0));
- d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan1));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_tX] Deallocating TX channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_tx);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_tx", PMT_F, &result);
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_overrun.cc b/usrp/limbo/apps-inband/test_usrp_inband_overrun.cc
deleted file mode 100644
index cd0fa525a..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_overrun.cc
+++ /dev/null
@@ -1,375 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <fstream>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = true;
-
-class test_usrp_rx : public mb_mblock
-{
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
- pmt_t d_rx_chan; // returned tx channel handle
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- RECEIVING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
-
- std::ofstream d_ofile;
-
- long d_n_overruns;
-
- long d_samples_recvd;
- long d_samples_to_recv;
-
- public:
- test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_rx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_receiving();
- void build_and_send_next_frame();
- void handle_response_recv_raw_samples(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_n_overruns(0),
- d_samples_recvd(0),
- d_samples_to_recv(10e6)
-{
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Pass a dictionary to usrp_server which specifies which interface to use, the stub or USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(128));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-test_usrp_rx::~test_usrp_rx()
-{
-}
-
-void
-test_usrp_rx::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_rx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- switch(d_state){
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // Allocate an RX channel to perform the overrun test.
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
- status = pmt_nth(1, data);
- d_rx_chan = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T)){
- enter_receiving();
- return;
- }
- else {
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- //--------------------------- RECEIVING ------------------------------//
- // In the receiving state, we receive samples until the specified amount
- // while counting the number of overruns.
- case RECEIVING:
- if (pmt_eq(event, s_response_recv_raw_samples)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_response_recv_raw_samples(data);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
- goto unhandled;
-
- //------------------------- CLOSING CHANNEL ----------------------------//
- // Check deallocation response for the RX channel
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
-
- // Alternately, we ignore all response recv samples while waiting for the
- // channel to actually close
- if (pmt_eq(event, s_response_recv_raw_samples))
- return;
-
- goto unhandled;
-
- //--------------------------- CLOSING USRP ------------------------------//
- // Once we have received a successful USRP close response, we shutdown all
- // mblocks and exit.
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- std::cout << "\nOverruns: " << d_n_overruns << std::endl;
- fflush(stdout);
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose && !pmt_eq(event, pmt_intern("%shutdown")))
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_rx::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Opening the USRP\n";
-}
-
-void
-test_usrp_rx::close_usrp()
-{
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Closing the USRP\n";
-}
-
-void
-test_usrp_rx::allocate_channel()
-{
- long capacity = (long) 16e6;
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Requesting RX channel allocation\n";
-}
-
-void
-test_usrp_rx::enter_receiving()
-{
- d_state = RECEIVING;
-
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Receiving...\n";
-}
-
-void
-test_usrp_rx::handle_response_recv_raw_samples(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t v_samples = pmt_nth(2, data);
- pmt_t timestamp = pmt_nth(3, data);
- pmt_t channel = pmt_nth(4, data);
- pmt_t properties = pmt_nth(5, data);
-
- d_samples_recvd += pmt_length(v_samples) / 4;
-
- // Check for overrun
- if(!pmt_is_dict(properties)) {
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Recv samples dictionary is improper\n";
- return;
- }
-
- if(pmt_t overrun = pmt_dict_ref(properties,
- pmt_intern("overrun"),
- PMT_NIL)) {
- if(pmt_eqv(overrun, PMT_T)) {
- d_n_overruns++;
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Underrun\n";
- }
- else {
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] No overrun\n" << overrun <<std::endl;
- }
- } else {
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] No overrun\n";
- }
-
- // Check if the number samples we have received meets the test
- if(d_samples_recvd >= d_samples_to_recv) {
- d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan));
- enter_closing_channel();
- return;
- }
-
-}
-
-void
-test_usrp_rx::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- sleep(2);
-
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_OVERRUN] Deallocating RX channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_rx);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_rx", PMT_F, &result);
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_ping.cc b/usrp/limbo/apps-inband/test_usrp_inband_ping.cc
deleted file mode 100644
index d779c9a64..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_ping.cc
+++ /dev/null
@@ -1,374 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <iostream>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = false;
-
-class test_usrp_inband_ping : public mb_mblock
-{
-
- mb_port_sptr d_tx; // Ports connected to the USRP server
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- pmt_t d_tx_chan; // Returned channel from TX allocation
- pmt_t d_rx_chan; // Returned channel from RX allocation
-
- pmt_t d_which_usrp; // The USRP to use for the test
-
- long d_warm_msgs; // The number of messages to 'warm' the USRP
- long d_warm_recvd; // The number of msgs received in the 'warm' state
-
- // Keep track of current state
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNELS,
- WARMING_USRP,
- PINGING,
- CLOSING_CHANNELS,
- CLOSING_USRP,
- };
- state_t d_state;
-
- public:
- test_usrp_inband_ping(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_inband_ping();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void opening_usrp();
- void allocating_channels();
- void enter_warming_usrp();
- void enter_pinging();
- void build_and_send_ping();
- void closing_channels();
- void closing_usrp();
-};
-
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_inband_ping", PMT_F, &result);
-}
-
-
-test_usrp_inband_ping::test_usrp_inband_ping(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_tx_chan(PMT_NIL),
- d_rx_chan(PMT_NIL),
- d_which_usrp(pmt_from_long(0)),
- d_state(INIT)
-{
-
- // A dictionary is used to pass parameters to the USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("fixed1.rbf"));
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(128));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(16));
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Create an instance of USRP server and connect ports
- define_component("server", "usrp_server", usrp_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-test_usrp_inband_ping::~test_usrp_inband_ping()
-{
-}
-
-void
-test_usrp_inband_ping::initial_transition()
-{
- opening_usrp();
-}
-
-// Handle message reads all incoming messages from USRP server which will be
-// initialization and ping responses. We perform actions based on the current
-// state and the event (ie, ping response)
-void
-test_usrp_inband_ping::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
- pmt_t port_id = msg->port_id();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- // Dispatch based on state
- switch(d_state) {
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
-
- if(pmt_eq(event, s_response_open)) {
-
- status = pmt_nth(1, data); // failed/succes
-
- if(pmt_eq(status, PMT_T)) {
- allocating_channels();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
-
- }
-
- goto unhandled; // all other messages not handled in this state
-
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // When allocating channels, we need to wait for 2 responses from
- // USRP server: one for TX and one for RX. Both are initialized to
- // NIL so we know to continue to the next state once both are set.
- case ALLOCATING_CHANNELS:
-
- // A TX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_tx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_tx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Received TX allocation"
- << " on channel " << d_tx_chan << std::endl;
-
- // If the RX has also been allocated already, we can continue
- if(!pmt_eqv(d_rx_chan, PMT_NIL))
- enter_warming_usrp();
-
- return;
- }
- else { // TX allocation failed
- error_msg = "failed to allocate TX channel:";
- goto bail;
- }
- }
-
- // A RX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_rx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_rx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Received RX allocation"
- << " on channel " << d_rx_chan << std::endl;
-
- // If the TX has also been allocated already, we can continue
- if(!pmt_eqv(d_tx_chan, PMT_NIL))
- enter_warming_usrp();
-
- return;
- }
- else { // RX allocation failed
- error_msg = "failed to allocate RX channel:";
- goto bail;
- }
- }
-
- goto unhandled;
-
- //----------------------- WARMING USRP --------------------//
- // The FX2 seems to need some amount of data to be buffered
- // before it begins reading. We use this state to simply
- // warm up the USRP before benchmarking pings.
- case WARMING_USRP:
-
- // We really don't care about the responses from the
- // control channel in the warming stage, but once we receive
- // the proper number of responses we switch states.
- if(pmt_eq(event, s_response_from_control_channel)
- && pmt_eq(d_rx->port_symbol(), port_id))
- {
- d_warm_recvd++;
-
- if(d_warm_recvd > d_warm_msgs)
- enter_pinging();
-
- return;
- }
-
- goto unhandled;
-
- case PINGING:
- goto unhandled;
-
- case CLOSING_CHANNELS:
- goto unhandled;
-
- case CLOSING_USRP:
- goto unhandled;
-
- case INIT:
- goto unhandled;
-
- }
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose)
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-
-}
-
-
-// Sends a command to USRP server to open up a connection to the
-// specified USRP, which is defaulted to USRP 0 on the system
-void
-test_usrp_inband_ping::opening_usrp()
-{
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Opening USRP "
- << d_which_usrp << std::endl;
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, d_which_usrp));
- d_state = OPENING_USRP;
-}
-
-// RX and TX channels must be allocated so that the USRP server can
-// properly share bandwidth across multiple USRPs. No commands will be
-// successful to the USRP through the USRP server on the TX or RX channels until
-// a bandwidth allocation has been received.
-void
-test_usrp_inband_ping::allocating_channels()
-{
- d_state = ALLOCATING_CHANNELS;
-
- long capacity = (long) 16e6;
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
-}
-
-// The USRP needs some amount of initial data to pass a buffering point such
-// that it begins to pull and read data from the FX2. We send an arbitrary
-// amount of data to start the pipeline, which are just pings.
-void
-test_usrp_inband_ping::enter_warming_usrp()
-{
- d_state = WARMING_USRP;
-
- for(int i=0; i < d_warm_msgs; i++)
- build_and_send_ping();
-}
-
-void
-test_usrp_inband_ping::enter_pinging()
-{
- d_state = PINGING;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Running ping tests\n";
-
-}
-
-// Pings are sent over the TX channel using the signal 'cmd-to-control-channel'
-// to the USRP server. Within this message there can be infinite subpackets
-// stored as a list (the second parameter) and sent. The only subpacket we send
-// is a ping, interpreted by the 'op-ping-fixed' signal.
-void
-test_usrp_inband_ping::build_and_send_ping()
-{
-
- d_tx->send(s_cmd_to_control_channel, // USRP server signal
- pmt_list2(PMT_NIL, // invocation handle
- pmt_list1(pmt_list3(s_op_ping_fixed,
- pmt_from_long(0),
- pmt_from_long(0)))));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Ping!!" << std::endl;
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_inband_ping);
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_registers.cc b/usrp/limbo/apps-inband/test_usrp_inband_registers.cc
deleted file mode 100644
index d9bd2db17..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_registers.cc
+++ /dev/null
@@ -1,435 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-//#include <mb_mblock_impl.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <iostream>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = true;
-
-class test_usrp_inband_registers : public mb_mblock
-{
-
- mb_port_sptr d_tx; // Ports connected to the USRP server
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- pmt_t d_tx_chan; // Returned channel from TX allocation
- pmt_t d_rx_chan; // Returned channel from RX allocation
-
- pmt_t d_which_usrp; // The USRP to use for the test
-
- long d_warm_msgs; // The number of messages to 'warm' the USRP
- long d_warm_recvd; // The number of msgs received in the 'warm' state
-
- // Keep track of current state
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNELS,
- WRITE_REGISTER,
- READ_REGISTER,
- CLOSING_CHANNELS,
- CLOSING_USRP,
- };
- state_t d_state;
-
- public:
- test_usrp_inband_registers(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_inband_registers();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void opening_usrp();
- void allocating_channels();
- void write_register();
- void read_register();
- void closing_channels();
- void closing_usrp();
- void enter_receiving();
- void build_and_send_ping();
-};
-
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_inband_registers", PMT_F, &result);
-}
-
-
-test_usrp_inband_registers::test_usrp_inband_registers(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_tx_chan(PMT_NIL),
- d_rx_chan(PMT_NIL),
- d_which_usrp(pmt_from_long(0)),
- d_state(INIT)
-{
-
- // A dictionary is used to pass parameters to the USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(128));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(16));
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Create an instance of USRP server and connect ports
- define_component("server", "usrp_server", usrp_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-test_usrp_inband_registers::~test_usrp_inband_registers()
-{
-}
-
-void
-test_usrp_inband_registers::initial_transition()
-{
- opening_usrp();
-}
-
-// Handle message reads all incoming messages from USRP server which will be
-// initialization and ping responses. We perform actions based on the current
-// state and the event (ie, ping response)
-void
-test_usrp_inband_registers::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
- pmt_t port_id = msg->port_id();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- // Dispatch based on state
- switch(d_state) {
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
-
- if(pmt_eq(event, s_response_open)) {
-
- status = pmt_nth(1, data); // failed/succes
-
- if(pmt_eq(status, PMT_T)) {
- allocating_channels();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
-
- }
-
- goto unhandled; // all other messages not handled in this state
-
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // When allocating channels, we need to wait for 2 responses from
- // USRP server: one for TX and one for RX. Both are initialized to
- // NIL so we know to continue to the next state once both are set.
- case ALLOCATING_CHANNELS:
-
- // A TX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_tx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_tx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Received TX allocation"
- << " on channel " << d_tx_chan << std::endl;
-
- // If the RX has also been allocated already, we can continue
- if(!pmt_eqv(d_rx_chan, PMT_NIL)) {
- enter_receiving();
- write_register();
- }
-
- return;
- }
- else { // TX allocation failed
- error_msg = "failed to allocate TX channel:";
- goto bail;
- }
- }
-
- // A RX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_rx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_rx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Received RX allocation"
- << " on channel " << d_rx_chan << std::endl;
-
- // If the TX has also been allocated already, we can continue
- if(!pmt_eqv(d_tx_chan, PMT_NIL)) {
- enter_receiving();
- write_register();
- }
-
- return;
- }
- else { // RX allocation failed
- error_msg = "failed to allocate RX channel:";
- goto bail;
- }
- }
-
- goto unhandled;
-
- //-------------------------- WRITE REGISTER ----------------------------//
- // In the write register state, we do not expect to receive any messages
- // since the write does not directly generate a response until the USRP
- // responds.
- case WRITE_REGISTER:
- goto unhandled;
-
- //-------------------------- READ REGISTER ----------------------------//
- // In the read register state, we only expect a read register response back
- // that has the value we expect to have in it. We read the response, ensure
- // that the read was successful and display the register value.
- case READ_REGISTER:
-
- if(pmt_eq(event, s_response_from_control_channel)
- && pmt_eq(d_tx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If the read was successful, we extract the subpacket information
- if(pmt_eq(status, PMT_T)) {
-
- pmt_t subp = pmt_nth(2, data); // subpacket should be the read reg reply
-
- pmt_t subp_sig = pmt_nth(0, subp);
- pmt_t subp_data = pmt_nth(1, subp);
-
- if(!pmt_eqv(subp_sig, s_op_read_reg_reply)) {
- error_msg = "received improper subpacket when expecting reg reply.";
- goto bail;
- }
-
- pmt_t rid = pmt_nth(0, subp_data);
- pmt_t reg_num = pmt_nth(1, subp_data);
- pmt_t reg_val = pmt_nth(2, subp_data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_REGISTERS] Received read reg reply "
- << "("
- << "RID: " << rid << ", "
- << "Reg: " << reg_num << ", "
- << "Val: " << reg_val
- << ")\n";
-
- // read_register(); FIX ME STATE TRANSITION
- return;
-
- } else { // bail on unsuccessful write
- error_msg = "failed to write to register.";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_CHANNELS:
- goto unhandled;
-
- case CLOSING_USRP:
- goto unhandled;
-
- case INIT:
- goto unhandled;
-
- }
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose && !pmt_eq(event, s_response_recv_raw_samples))
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-
-}
-
-
-// Sends a command to USRP server to open up a connection to the
-// specified USRP, which is defaulted to USRP 0 on the system
-void
-test_usrp_inband_registers::opening_usrp()
-{
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_PING] Opening USRP "
- << d_which_usrp << std::endl;
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, d_which_usrp));
- d_state = OPENING_USRP;
-}
-
-// RX and TX channels must be allocated so that the USRP server can
-// properly share bandwidth across multiple USRPs. No commands will be
-// successful to the USRP through the USRP server on the TX or RX channels until
-// a bandwidth allocation has been received.
-void
-test_usrp_inband_registers::allocating_channels()
-{
- d_state = ALLOCATING_CHANNELS;
-
- long capacity = (long) 16e6;
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
-}
-
-// After allocating the channels, a write register command will be sent to the
-// USRP.
-void
-test_usrp_inband_registers::write_register()
-{
- d_state = WRITE_REGISTER;
-
- long reg = 0;
-
- d_tx->send(s_cmd_to_control_channel, // C/S packet
- pmt_list2(PMT_NIL, // invoc handle
- pmt_list1(
- pmt_list2(s_op_write_reg,
- pmt_list2(
- pmt_from_long(reg),
- pmt_from_long(0xbeef))))));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_REGISTERS] Writing 0xbeef to "
- << reg << std::endl;
-
- read_register(); // immediately transition to read the register
-}
-
-// Temporary: for testing pings
-void
-test_usrp_inband_registers::build_and_send_ping()
-{
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(PMT_NIL, pmt_list1(pmt_list2(s_op_ping_fixed,
- pmt_list2(pmt_from_long(0),
- pmt_from_long(0))))));
-
- std::cout << "[TEST_USRP_INBAND_CS] Ping sent" << std::endl;
-}
-
-// After writing to the register, we want to read the value back and ensure that
-// it is the same value that we wrote.
-void
-test_usrp_inband_registers::read_register()
-{
- d_state = READ_REGISTER;
-
- long reg = 9;
-
- d_tx->send(s_cmd_to_control_channel, // C/S packet
- pmt_list2(PMT_NIL, // invoc handle
- pmt_list1(
- pmt_list2(s_op_read_reg,
- pmt_list2(
- pmt_from_long(0), // rid
- pmt_from_long(reg))))));
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_REGISTERS] Reading from register "
- << reg << std::endl;
-}
-
-// Used to enter the receiving state
-void
-test_usrp_inband_registers::enter_receiving()
-{
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan));
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_inband_registers);
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_rx.cc b/usrp/limbo/apps-inband/test_usrp_inband_rx.cc
deleted file mode 100644
index 4f21e4afc..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_rx.cc
+++ /dev/null
@@ -1,362 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <fstream>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = true;
-
-class test_usrp_rx : public mb_mblock
-{
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
- pmt_t d_rx_chan; // returned tx channel handle
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- RECEIVING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
-
- std::ofstream d_ofile;
-
- long d_samples_recvd;
- long d_samples_to_recv;
-
- public:
- test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_rx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_receiving();
- void build_and_send_next_frame();
- void handle_response_recv_raw_samples(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_samples_recvd(0),
- d_samples_to_recv(20e6)
-{
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Pass a dictionary to usrp_server which specifies which interface to use, the stub or USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // To test the application without a USRP
- bool fake_usrp_p = false;
- if(fake_usrp_p) {
- pmt_dict_set(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_T);
- }
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(64));
-
-// If unspecified, chooses center frequency from range
-// pmt_dict_set(usrp_dict,
-// pmt_intern("rf-freq"),
-// pmt_from_long(10e6));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-test_usrp_rx::~test_usrp_rx()
-{
-}
-
-void
-test_usrp_rx::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_rx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- switch(d_state){
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // Allocate an RX channel to perform the overrun test.
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
- status = pmt_nth(1, data);
- d_rx_chan = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T)){
- enter_receiving();
- return;
- }
- else {
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- //--------------------------- RECEIVING ------------------------------//
- // In the receiving state, we receive samples until the specified amount
- // while counting the number of overruns.
- case RECEIVING:
- if (pmt_eq(event, s_response_recv_raw_samples)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_response_recv_raw_samples(data);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
- goto unhandled;
-
- //------------------------- CLOSING CHANNEL ----------------------------//
- // Check deallocation response for the RX channel
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
-
- // Alternately, we ignore all response recv samples while waiting for the
- // channel to actually close
- if (pmt_eq(event, s_response_recv_raw_samples))
- return;
-
- goto unhandled;
-
- //--------------------------- CLOSING USRP ------------------------------//
- // Once we have received a successful USRP close response, we shutdown all
- // mblocks and exit.
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- fflush(stdout);
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose && !pmt_eq(event, pmt_intern("%shutdown")))
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_rx::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Opening the USRP\n";
-}
-
-void
-test_usrp_rx::close_usrp()
-{
-
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Closing the USRP\n";
-}
-
-void
-test_usrp_rx::allocate_channel()
-{
- long capacity = (long) 16e6;
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Requesting RX channel allocation\n";
-}
-
-void
-test_usrp_rx::enter_receiving()
-{
- d_state = RECEIVING;
-
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Receiving...\n";
-}
-
-void
-test_usrp_rx::handle_response_recv_raw_samples(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t v_samples = pmt_nth(2, data);
- pmt_t timestamp = pmt_nth(3, data);
- pmt_t channel = pmt_nth(4, data);
- pmt_t properties = pmt_nth(5, data);
-
- d_samples_recvd += pmt_length(v_samples) / 4;
-
- // Check for overrun
- if(!pmt_is_dict(properties)) {
- std::cout << "[TEST_USRP_INBAND_RX] Recv samples dictionary is improper\n";
- return;
- }
-
- // Check if the number samples we have received meets the test
- if(d_samples_recvd >= d_samples_to_recv) {
- d_rx->send(s_cmd_stop_recv_raw_samples, pmt_list2(PMT_NIL, d_rx_chan));
- enter_closing_channel();
- return;
- }
-
-}
-
-void
-test_usrp_rx::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_RX] Deallocating RX channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_rx);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_rx", PMT_F, &result);
-
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_timestamps.cc b/usrp/limbo/apps-inband/test_usrp_inband_timestamps.cc
deleted file mode 100644
index 3b874d1a5..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_timestamps.cc
+++ /dev/null
@@ -1,506 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <iostream>
-
-#include <ui_nco.h>
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-
-#define NBPING 10
-
-static bool verbose = true;
-bool bskip = false;
-long bstep = 10000;
-long bcurr = 0;
-long incr = 0x500;
-long ptime = 0x000;
-
-class test_usrp_inband_timestamps : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
- pmt_t d_tx_chan; // returned tx channel handle
- pmt_t d_rx_chan; // returned tx channel handle
-
- struct timeval times[NBPING];
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- TRANSMITTING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
- long d_nsamples_to_send;
- long d_nsamples_xmitted;
- long d_nframes_xmitted;
- long d_samples_per_frame;
- bool d_done_sending;
-
- // for generating sine wave output
- ui_nco<float,float> d_nco;
- double d_amplitude;
-
- public:
- test_usrp_inband_timestamps(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_inband_timestamps();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_receiving();
- void enter_transmitting();
- void build_and_send_ping();
- void build_and_send_next_frame();
- void handle_xmit_response(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_inband_timestamps::test_usrp_inband_timestamps(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_tx_chan(PMT_NIL),
- d_rx_chan(PMT_NIL),
- d_state(INIT), d_nsamples_to_send((long) 40e6),
- d_nsamples_xmitted(0),
- d_nframes_xmitted(0),
- //d_samples_per_frame((long)(126)),
- d_samples_per_frame((long)(126 * 2)), // non-full packet
- //d_samples_per_frame((long)(126 * 3.5)), // non-full packet
- //d_samples_per_frame((long)(126 * 4)), // full packet
- d_done_sending(false),
- d_amplitude(16384)
-{
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Initializing...\n";
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- bool fake_usrp_p = false;
-
- // Test the TX side
-
- pmt_t usrp_dict = pmt_make_dict();
-
- if(fake_usrp_p) {
- pmt_dict_set(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_T);
- }
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(128));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(16));
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
- // initialize NCO
- double freq = 100e3;
- int interp = 32; // 32 -> 4MS/s
- double sample_rate = 128e6 / interp;
- d_nco.set_freq(2*M_PI * freq/sample_rate);
-
-}
-
-test_usrp_inband_timestamps::~test_usrp_inband_timestamps()
-{
-}
-
-void
-test_usrp_inband_timestamps::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_inband_timestamps::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
- pmt_t port_id = msg->port_id();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- //std::cout << msg << std::endl;
-
- switch(d_state){
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
-
- if(pmt_eq(d_tx->port_symbol(), port_id)) {
- status = pmt_nth(1, data);
- d_tx_chan = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T)){
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Received allocation for TX\n";
-
- if(!pmt_eqv(d_rx_chan, PMT_NIL)) {
- enter_receiving();
- enter_transmitting();
- }
- return;
- }
- else {
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- }
-
- if(pmt_eq(d_rx->port_symbol(), port_id)) {
- status = pmt_nth(1, data);
- d_rx_chan = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T)){
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Received allocation for TX\n";
-
- if(!pmt_eqv(d_tx_chan, PMT_NIL)) {
- enter_receiving();
- enter_transmitting();
- }
- return;
- }
- else {
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- }
- }
- goto unhandled;
-
- case TRANSMITTING:
- if (pmt_eq(event, s_response_xmit_raw_frame)){
- handle = pmt_nth(0, data);
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_xmit_response(handle);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
-
- if (pmt_eq(event, s_response_from_control_channel)) {
- std::cout << "ping response!\n";
- }
- goto unhandled;
-
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- unhandled:
- if(verbose && 0)
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_inband_timestamps::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-}
-
-void
-test_usrp_inband_timestamps::close_usrp()
-{
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Closing USRP\n";
-}
-
-void
-test_usrp_inband_timestamps::allocate_channel()
-{
- long capacity = (long) 16e6;
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-}
-
-void
-test_usrp_inband_timestamps::enter_receiving()
-{
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan));
-}
-
-void
-test_usrp_inband_timestamps::enter_transmitting()
-{
- d_state = TRANSMITTING;
- d_nsamples_xmitted = 0;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Beginning transmission\n";
-
- sleep(1);
-
- build_and_send_next_frame();
- build_and_send_next_frame();
- build_and_send_next_frame();
- build_and_send_next_frame();
-
-}
-
-void
-test_usrp_inband_timestamps::build_and_send_ping()
-{
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(PMT_NIL, pmt_list1(pmt_list2(s_op_ping_fixed,
- pmt_list2(pmt_from_long(0),
- pmt_from_long(0))))));
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Ping sent" << std::endl;
-}
-
-void
-test_usrp_inband_timestamps::build_and_send_next_frame()
-{
- // allocate the uniform vector for the samples
- // FIXME perhaps hold on to this between calls
-
-#if 0
- long nsamples_this_frame =
- std::min(d_nsamples_to_send - d_nsamples_xmitted,
- d_samples_per_frame);
-#else
- long nsamples_this_frame = d_samples_per_frame;
-#endif
-
- if (nsamples_this_frame == 0){
- d_done_sending = true;
- return;
- }
-
-
- size_t nshorts = 2 * nsamples_this_frame; // 16-bit I & Q
- pmt_t uvec = pmt_make_s16vector(nshorts, 0);
- size_t ignore;
- int16_t *samples = pmt_s16vector_writable_elements(uvec, ignore);
-
- // fill in the complex sinusoid
-
- for (int i = 0; i < nsamples_this_frame; i++){
-
- if (1){
- gr_complex s;
- d_nco.sincos(&s, 1, d_amplitude);
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- else {
- gr_complex s(d_amplitude, d_amplitude);
-
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- }
-
- pmt_t timestamp;
-
- if(bskip) {
- timestamp = pmt_from_long(0x0); // throw away
- bcurr++;
- if(bcurr == bstep) {
- bskip = false;
- bcurr = 0;
- }
- } else {
- timestamp = pmt_from_long(0xffffffff); // NOW
- timestamp = pmt_from_long(ptime);
- ptime += incr;
- bcurr++;
- if(bcurr == bstep) {
- //bskip = true;
- bcurr = 0;
- }
- }
-
- std::cout << bskip << " -- " << bcurr << std::endl;
-
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_from_long(d_nframes_xmitted), // invocation-handle
- d_tx_chan, // channel
- uvec, // the samples
- timestamp));
-
- d_nsamples_xmitted += nsamples_this_frame;
- d_nframes_xmitted++;
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Transmitted frame\n";
-
- //build_and_send_next_frame();
-}
-
-
-void
-test_usrp_inband_timestamps::handle_xmit_response(pmt_t handle)
-{
- if (d_done_sending &&
- pmt_to_long(handle) == (d_nframes_xmitted - 1)){
- // We're done sending and have received all responses
- enter_closing_channel();
- }
-
- build_and_send_next_frame();
- //build_and_send_ping();
-}
-
-void
-test_usrp_inband_timestamps::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TIMESTAMPS] Closing channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_inband_timestamps);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_inband_timestamps", PMT_F, &result);
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_tx.cc b/usrp/limbo/apps-inband/test_usrp_inband_tx.cc
deleted file mode 100644
index 9f294e770..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_tx.cc
+++ /dev/null
@@ -1,411 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-
-#include <ui_nco.h>
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-
-static bool verbose = true;
-
-class test_usrp_tx : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_cs;
- pmt_t d_tx_chan; // returned tx channel handle
-
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNEL,
- TRANSMITTING,
- CLOSING_CHANNEL,
- CLOSING_USRP,
- };
-
- state_t d_state;
- long d_nsamples_to_send;
- long d_nsamples_xmitted;
- long d_nframes_xmitted;
- long d_samples_per_frame;
- bool d_done_sending;
-
- // for generating sine wave output
- ui_nco<float,float> d_nco;
- double d_amplitude;
-
- public:
- test_usrp_tx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_tx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void open_usrp();
- void close_usrp();
- void allocate_channel();
- void send_packets();
- void enter_transmitting();
- void build_and_send_next_frame();
- void handle_xmit_response(pmt_t invocation_handle);
- void enter_closing_channel();
-};
-
-test_usrp_tx::test_usrp_tx(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_state(INIT), d_nsamples_to_send((long) 80e6),
- d_nsamples_xmitted(0),
- d_nframes_xmitted(0),
- d_samples_per_frame((long)(126 * 4)), // full packet
- d_done_sending(false),
- d_amplitude(16384)
-{
- // std::cout << "[TEST_USRP_TX] Initializing...\n";
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- //bool fake_usrp_p = true;
- bool fake_usrp_p = false;
-
- // Test the TX side
-
- pmt_t usrp_dict = pmt_make_dict();
-
- if(fake_usrp_p) {
- pmt_dict_set(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_T);
- }
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(64));
-
-// If unspecified, chooses center frequency from range
-// pmt_dict_set(usrp_dict,
-// pmt_intern("rf-freq"),
-// pmt_from_long(10e6));
-
- define_component("server", "usrp_server", usrp_dict);
-
- connect("self", "tx0", "server", "tx0");
- connect("self", "cs", "server", "cs");
-
- // initialize NCO
- double freq = 100e3;
- int interp = 32; // 32 -> 4MS/s
- double sample_rate = 128e6 / interp;
- d_nco.set_freq(2*M_PI * freq/sample_rate);
-
- // FIXME need to somehow set the interp rate in the USRP.
- // for now, we'll have the low-level code hardwire it.
-}
-
-test_usrp_tx::~test_usrp_tx()
-{
-}
-
-void
-test_usrp_tx::initial_transition()
-{
- open_usrp();
-}
-
-void
-test_usrp_tx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- std::string error_msg;
-
- //std::cout << msg << std::endl;
-
- switch(d_state){
- case OPENING_USRP:
- if (pmt_eq(event, s_response_open)){
- status = pmt_nth(1, data);
- if (pmt_eq(status, PMT_T)){
- allocate_channel();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
- }
- goto unhandled;
-
- case ALLOCATING_CHANNEL:
- if (pmt_eq(event, s_response_allocate_channel)){
- status = pmt_nth(1, data);
- d_tx_chan = pmt_nth(2, data);
-
- if (pmt_eq(status, PMT_T)){
- enter_transmitting();
- return;
- }
- else {
- error_msg = "failed to allocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- case TRANSMITTING:
- if (pmt_eq(event, s_response_xmit_raw_frame)){
- handle = pmt_nth(0, data);
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_xmit_response(handle);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_CHANNEL:
- if (pmt_eq(event, s_response_deallocate_channel)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- close_usrp();
- return;
- }
- else {
- error_msg = "failed to deallocate channel:";
- goto bail;
- }
- }
- goto unhandled;
-
- case CLOSING_USRP:
- if (pmt_eq(event, s_response_close)){
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- shutdown_all(PMT_T);
- return;
- }
- else {
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
- goto unhandled;
-
- default:
- goto unhandled;
- }
- return;
-
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- unhandled:
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-}
-
-
-void
-test_usrp_tx::open_usrp()
-{
- pmt_t which_usrp = pmt_from_long(0);
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, which_usrp));
- d_state = OPENING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Opening the USRP\n";
-}
-
-void
-test_usrp_tx::close_usrp()
-{
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
- d_state = CLOSING_USRP;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Closing the USRP\n";
-}
-
-void
-test_usrp_tx::allocate_channel()
-{
- long capacity = (long) 16e6;
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_state = ALLOCATING_CHANNEL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Requesting TX channel allocation\n";
-}
-
-void
-test_usrp_tx::enter_transmitting()
-{
- d_state = TRANSMITTING;
- d_nsamples_xmitted = 0;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitting...\n";
-
- build_and_send_next_frame(); // fire off 4 to start pipeline
- build_and_send_next_frame();
- build_and_send_next_frame();
- build_and_send_next_frame();
-}
-
-void
-test_usrp_tx::build_and_send_next_frame()
-{
- // allocate the uniform vector for the samples
- // FIXME perhaps hold on to this between calls
-
-#if 1
- long nsamples_this_frame =
- std::min(d_nsamples_to_send - d_nsamples_xmitted,
- d_samples_per_frame);
-#else
- long nsamples_this_frame = d_samples_per_frame;
-#endif
-
- if (nsamples_this_frame == 0){
- d_done_sending = true;
- return;
- }
-
-
- size_t nshorts = 2 * nsamples_this_frame; // 16-bit I & Q
- pmt_t uvec = pmt_make_s16vector(nshorts, 0);
- size_t ignore;
- int16_t *samples = pmt_s16vector_writable_elements(uvec, ignore);
-
- // fill in the complex sinusoid
-
- for (int i = 0; i < nsamples_this_frame; i++){
-
- if (1){
- gr_complex s;
- d_nco.sincos(&s, 1, d_amplitude);
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- else {
- gr_complex s(d_amplitude, d_amplitude);
-
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- }
-
- pmt_t tx_properties = pmt_make_dict();
-
- pmt_t timestamp = pmt_from_long(0xffffffff); // NOW
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list5(pmt_from_long(d_nframes_xmitted), // invocation-handle
- d_tx_chan, // channel
- uvec, // the samples
- timestamp,
- tx_properties));
-
- d_nsamples_xmitted += nsamples_this_frame;
- d_nframes_xmitted++;
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitted frame\n";
-}
-
-
-void
-test_usrp_tx::handle_xmit_response(pmt_t handle)
-{
- if (d_done_sending &&
- pmt_to_long(handle) == (d_nframes_xmitted - 1)){
- // We're done sending and have received all responses
- enter_closing_channel();
- }
-
- build_and_send_next_frame();
-}
-
-void
-test_usrp_tx::enter_closing_channel()
-{
- d_state = CLOSING_CHANNEL;
-
- d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_tX] Deallocating TX channel\n";
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_tx);
-
-
-// ----------------------------------------------------------------
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_tx", PMT_F, &result);
-}
diff --git a/usrp/limbo/apps-inband/test_usrp_inband_underrun.cc b/usrp/limbo/apps-inband/test_usrp_inband_underrun.cc
deleted file mode 100644
index 11babb048..000000000
--- a/usrp/limbo/apps-inband/test_usrp_inband_underrun.cc
+++ /dev/null
@@ -1,674 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/exception.h>
-#include <mblock/msg_queue.h>
-#include <mblock/message.h>
-#include <mblock/msg_accepter.h>
-#include <mblock/class_registry.h>
-#include <pmt.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <iostream>
-#include <ui_nco.h>
-
-// Include the symbols needed for communication with USRP server
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-
-static bool verbose = true;
-
-class test_usrp_inband_underrun : public mb_mblock
-{
-
- mb_port_sptr d_tx; // Ports connected to the USRP server
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- pmt_t d_tx_chan; // Returned channel from TX allocation
- pmt_t d_rx_chan; // Returned channel from RX allocation
-
- pmt_t d_which_usrp; // The USRP to use for the test
-
- long d_warm_msgs; // The number of messages to 'warm' the USRP
- long d_warm_recvd; // The number of msgs received in the 'warm' state
-
- // Keep track of current state
- enum state_t {
- INIT,
- OPENING_USRP,
- ALLOCATING_CHANNELS,
- WRITE_REGISTER,
- READ_REGISTER,
- TRANSMITTING,
- CLOSING_CHANNELS,
- CLOSING_USRP,
- };
- state_t d_state;
-
- long d_nsamples_to_send;
- long d_nsamples_xmitted;
- long d_nframes_xmitted;
- long d_samples_per_frame;
- bool d_done_sending;
-
- // for generating sine wave output
- ui_nco<float,float> d_nco;
- double d_amplitude;
-
- long d_n_underruns;
-
- public:
- test_usrp_inband_underrun(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~test_usrp_inband_underrun();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void opening_usrp();
- void allocating_channels();
- void write_register();
- void read_register();
- void closing_channels();
- void closing_usrp();
- void enter_receiving();
- void enter_transmitting();
- void build_and_send_ping();
- void build_and_send_next_frame();
- void handle_xmit_response(pmt_t handle);
- void handle_recv_response(pmt_t dict);
-};
-
-
-int
-main (int argc, char **argv)
-{
- // handle any command line args here
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_NIL;
-
- rt->run("top", "test_usrp_inband_underrun", PMT_F, &result);
-}
-
-
-test_usrp_inband_underrun::test_usrp_inband_underrun(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_tx_chan(PMT_NIL),
- d_rx_chan(PMT_NIL),
- d_which_usrp(pmt_from_long(0)),
- d_state(INIT),
- d_nsamples_to_send((long) 27e6),
- d_nsamples_xmitted(0),
- d_nframes_xmitted(0),
- d_samples_per_frame(d_nsamples_to_send), // full packet
-
- d_done_sending(false),
- d_amplitude(16384),
- d_n_underruns(0)
-{
-
- // A dictionary is used to pass parameters to the USRP
- pmt_t usrp_dict = pmt_make_dict();
-
- // Specify the RBF to use
- pmt_dict_set(usrp_dict,
- pmt_intern("rbf"),
- pmt_intern("inband_1rxhb_1tx.rbf"));
-
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("interp-tx"),
- pmt_from_long(64));
-
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(128));
-
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Create an instance of USRP server and connect ports
- define_component("server", "usrp_server", usrp_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
- // initialize NCO
- double freq = 100e3;
- int interp = 32; // 32 -> 4MS/s
- double sample_rate = 128e6 / interp;
- d_nco.set_freq(2*M_PI * freq/sample_rate);
-}
-
-test_usrp_inband_underrun::~test_usrp_inband_underrun()
-{
-}
-
-void
-test_usrp_inband_underrun::initial_transition()
-{
- opening_usrp();
-}
-
-// Handle message reads all incoming messages from USRP server which will be
-// initialization and ping responses. We perform actions based on the current
-// state and the event (ie, ping response)
-void
-test_usrp_inband_underrun::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t data = msg->data();
- pmt_t port_id = msg->port_id();
-
- pmt_t handle = PMT_F;
- pmt_t status = PMT_F;
- pmt_t dict = PMT_NIL;
- std::string error_msg;
-
- // Check the recv sample responses for underruns and count
- if(pmt_eq(event, s_response_recv_raw_samples)) {
- handle = pmt_nth(0, data);
- status = pmt_nth(1, data);
- dict = pmt_nth(4, data);
-
- if(pmt_eq(status, PMT_T)) {
- handle_recv_response(dict);
- return;
- }
- else {
- error_msg = "error while receiving samples:";
- goto bail;
- }
- }
-
-
- // Dispatch based on state
- switch(d_state) {
-
- //----------------------------- OPENING_USRP ----------------------------//
- // We only expect a response from opening the USRP which should be succesful
- // or failed.
- case OPENING_USRP:
-
- if(pmt_eq(event, s_response_open)) {
-
- status = pmt_nth(1, data); // failed/succes
-
- if(pmt_eq(status, PMT_T)) {
- allocating_channels();
- return;
- }
- else {
- error_msg = "failed to open usrp:";
- goto bail;
- }
-
- }
-
- goto unhandled; // all other messages not handled in this state
-
-
- //----------------------- ALLOCATING CHANNELS --------------------//
- // When allocating channels, we need to wait for 2 responses from
- // USRP server: one for TX and one for RX. Both are initialized to
- // NIL so we know to continue to the next state once both are set.
- case ALLOCATING_CHANNELS:
-
- // A TX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_tx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_tx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Received TX allocation"
- << " on channel " << d_tx_chan << std::endl;
-
- // If the RX has also been allocated already, we can continue
- if(!pmt_eqv(d_rx_chan, PMT_NIL)) {
- enter_receiving();
- enter_transmitting();
- }
-
- return;
- }
- else { // TX allocation failed
- error_msg = "failed to allocate TX channel:";
- goto bail;
- }
- }
-
- // A RX allocation response
- if(pmt_eq(event, s_response_allocate_channel)
- && pmt_eq(d_rx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful response, extract the channel
- if(pmt_eq(status, PMT_T)) {
-
- d_rx_chan = pmt_nth(2, data);
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Received RX allocation"
- << " on channel " << d_rx_chan << std::endl;
-
- // If the TX has also been allocated already, we can continue
- if(!pmt_eqv(d_tx_chan, PMT_NIL)) {
- enter_receiving();
- enter_transmitting();
- }
-
- return;
- }
- else { // RX allocation failed
- error_msg = "failed to allocate RX channel:";
- goto bail;
- }
- }
-
- goto unhandled;
-
- case WRITE_REGISTER:
- goto unhandled;
-
- case READ_REGISTER:
- goto unhandled;
-
- //-------------------------- TRANSMITTING ----------------------------//
- // In the transmit state we count the number of underruns received and
- // ballpark the number with an expected count (something >1 for starters)
- case TRANSMITTING:
-
- // Check that the transmits are OK
- if (pmt_eq(event, s_response_xmit_raw_frame)){
- handle = pmt_nth(0, data);
- status = pmt_nth(1, data);
-
- if (pmt_eq(status, PMT_T)){
- handle_xmit_response(handle);
- return;
- }
- else {
- error_msg = "bad response-xmit-raw-frame:";
- goto bail;
- }
- }
-
- goto unhandled;
-
- //------------------------- CLOSING CHANNELS ----------------------------//
- // Check deallocation responses, once the TX and RX channels are both
- // deallocated then we close the USRP.
- case CLOSING_CHANNELS:
-
- if (pmt_eq(event, s_response_deallocate_channel)
- && pmt_eq(d_tx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful, set the port to NIL
- if(pmt_eq(status, PMT_T)) {
- d_tx_chan = PMT_NIL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Received TX deallocation\n";
-
- // If the RX is also deallocated, we can close the USRP
- if(pmt_eq(d_rx_chan, PMT_NIL))
- closing_usrp();
-
- return;
-
- } else {
-
- error_msg = "failed to deallocate TX channel:";
- goto bail;
-
- }
- }
-
- if (pmt_eq(event, s_response_deallocate_channel)
- && pmt_eq(d_rx->port_symbol(), port_id))
- {
- status = pmt_nth(1, data);
-
- // If successful, set the port to NIL
- if(pmt_eq(status, PMT_T)) {
- d_rx_chan = PMT_NIL;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Received RX deallocation\n";
-
- // If the TX is also deallocated, we can close the USRP
- if(pmt_eq(d_tx_chan, PMT_NIL))
- closing_usrp();
-
- return;
-
- } else {
-
- error_msg = "failed to deallocate RX channel:";
- goto bail;
-
- }
- }
-
- goto unhandled;
-
- //--------------------------- CLOSING USRP ------------------------------//
- // Once we have received a successful USRP close response, we shutdown all
- // mblocks and exit.
- case CLOSING_USRP:
-
- if (pmt_eq(event, s_response_close)) {
-
- status = pmt_nth(1, data);
-
- if(pmt_eq(status, PMT_T)) {
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Successfully closed USRP\n";
-
- std::cout << "\nUnderruns: " << d_n_underruns << std::endl;
- fflush(stdout);
-
- shutdown_all(PMT_T);
- return;
-
- } else {
-
- error_msg = "failed to close USRP:";
- goto bail;
- }
- }
-
- goto unhandled;
-
- case INIT:
- goto unhandled;
-
- }
-
- // An error occured, print it, and shutdown all m-blocks
- bail:
- std::cerr << error_msg << data
- << "status = " << status << std::endl;
- shutdown_all(PMT_F);
- return;
-
- // Received an unhandled message for a specific state
- unhandled:
- if(verbose && !pmt_eq(event, pmt_intern("%shutdown")))
- std::cout << "test_usrp_inband_tx: unhandled msg: " << msg
- << "in state "<< d_state << std::endl;
-
-}
-
-
-// Sends a command to USRP server to open up a connection to the
-// specified USRP, which is defaulted to USRP 0 on the system
-void
-test_usrp_inband_underrun::opening_usrp()
-{
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Opening USRP "
- << d_which_usrp << std::endl;
-
- d_cs->send(s_cmd_open, pmt_list2(PMT_NIL, d_which_usrp));
- d_state = OPENING_USRP;
-}
-
-// RX and TX channels must be allocated so that the USRP server can
-// properly share bandwidth across multiple USRPs. No commands will be
-// successful to the USRP through the USRP server on the TX or RX channels until
-// a bandwidth allocation has been received.
-void
-test_usrp_inband_underrun::allocating_channels()
-{
- d_state = ALLOCATING_CHANNELS;
-
- long capacity = (long) 16e6;
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(capacity)));
-}
-
-// After allocating the channels, a write register command will be sent to the
-// USRP.
-void
-test_usrp_inband_underrun::write_register()
-{
- d_state = WRITE_REGISTER;
-
- long reg = 0;
-
- d_tx->send(s_cmd_to_control_channel, // C/S packet
- pmt_list2(PMT_NIL, // invoc handle
- pmt_list1(
- pmt_list2(s_op_write_reg,
- pmt_list2(
- pmt_from_long(reg),
- pmt_from_long(0xbeef))))));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_REGISTERS] Writing 0xbeef to "
- << reg << std::endl;
-
- read_register(); // immediately transition to read the register
-}
-
-// Temporary: for testing pings
-void
-test_usrp_inband_underrun::build_and_send_ping()
-{
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(PMT_NIL, pmt_list1(pmt_list2(s_op_ping_fixed,
- pmt_list2(pmt_from_long(0),
- pmt_from_long(0))))));
-
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Ping sent" << std::endl;
-}
-
-// After writing to the register, we want to read the value back and ensure that
-// it is the same value that we wrote.
-void
-test_usrp_inband_underrun::read_register()
-{
- d_state = READ_REGISTER;
-
- long reg = 9;
-
- d_tx->send(s_cmd_to_control_channel, // C/S packet
- pmt_list2(PMT_NIL, // invoc handle
- pmt_list1(
- pmt_list2(s_op_read_reg,
- pmt_list2(
- pmt_from_long(0), // rid
- pmt_from_long(reg))))));
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Reading from register "
- << reg << std::endl;
-}
-
-// Used to enter the receiving state
-void
-test_usrp_inband_underrun::enter_receiving()
-{
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_F,
- d_rx_chan));
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Started RX sample stream\n";
-}
-
-void
-test_usrp_inband_underrun::enter_transmitting()
-{
- d_state = TRANSMITTING;
- d_nsamples_xmitted = 0;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Entering transmit state...\n";
-
- build_and_send_next_frame(); // fire off 4 to start pipeline
- build_and_send_next_frame();
- build_and_send_next_frame();
- build_and_send_next_frame();
-}
-
-void
-test_usrp_inband_underrun::build_and_send_next_frame()
-{
-
- long nsamples_this_frame =
- std::min(d_nsamples_to_send - d_nsamples_xmitted,
- d_samples_per_frame);
-
- if (nsamples_this_frame == 0){
- d_done_sending = true;
- return;
- }
-
- size_t nshorts = 2 * nsamples_this_frame; // 16-bit I & Q
- pmt_t uvec = pmt_make_s16vector(nshorts, 0);
- size_t ignore;
- int16_t *samples = pmt_s16vector_writable_elements(uvec, ignore);
-
- // fill in the complex sinusoid
-
- for (int i = 0; i < nsamples_this_frame; i++){
-
- if (1){
- gr_complex s;
- d_nco.sincos(&s, 1, d_amplitude);
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- else {
- gr_complex s(d_amplitude, d_amplitude);
-
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- }
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitting frame...\n";
-
- pmt_t timestamp = pmt_from_long(0xffffffff); // NOW
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_from_long(d_nframes_xmitted), // invocation-handle
- d_tx_chan, // channel
- uvec, // the samples
- timestamp));
-
- d_nsamples_xmitted += nsamples_this_frame;
- d_nframes_xmitted++;
-
- if(verbose)
- std::cout << "[TEST_USRP_INBAND_TX] Transmitted frame\n";
-
-}
-
-void
-test_usrp_inband_underrun::handle_xmit_response(pmt_t handle)
-{
- if (d_done_sending &&
- pmt_to_long(handle) == (d_nframes_xmitted - 1)){
- // We're done sending and have received all responses
- closing_channels();
- return;
- }
-
- build_and_send_next_frame();
-}
-
-void
-test_usrp_inband_underrun::handle_recv_response(pmt_t dict)
-{
- if(!pmt_is_dict(dict)) {
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Recv samples dictionary is improper\n";
- return;
- }
-
- // Read the TX interpolations
- if(pmt_t underrun = pmt_dict_ref(dict,
- pmt_intern("underrun"),
- PMT_NIL)) {
- if(pmt_eqv(underrun, PMT_T)) {
- d_n_underruns++;
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] Underrun\n";
- }
- else {
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] No underrun\n" << underrun <<std::endl;
- }
- } else {
-
- if(verbose && 0)
- std::cout << "[TEST_USRP_INBAND_UNDERRUN] No underrun\n";
- }
-
-}
-
-void
-test_usrp_inband_underrun::closing_channels()
-{
- d_state = CLOSING_CHANNELS;
-
- d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan));
- d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
-}
-
-void
-test_usrp_inband_underrun::closing_usrp()
-{
- d_state = CLOSING_USRP;
-
- d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
-}
-
-REGISTER_MBLOCK_CLASS(test_usrp_inband_underrun);
diff --git a/usrp/limbo/apps-inband/ui_nco.h b/usrp/limbo/apps-inband/ui_nco.h
deleted file mode 100644
index e6d7814ab..000000000
--- a/usrp/limbo/apps-inband/ui_nco.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * 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.
- */
-#ifndef INCLUDED_UI_NCO_H
-#define INCLUDED_UI_NCO_H
-
-
-#include <vector>
-#include <ui_sincos.h>
-#include <cmath>
-
-#include <complex>
-typedef std::complex<float> gr_complex;
-
-
-/*!
- * \brief base class template for Numerically Controlled Oscillator (NCO)
- */
-
-
-//FIXME Eventually generalize this to fixed point
-
-template<class o_type, class i_type>
-class ui_nco {
-public:
- ui_nco () : phase (0), phase_inc(0) {}
-
- virtual ~ui_nco () {}
-
- // radians
- void set_phase (double angle) {
- phase = angle;
- }
-
- void adjust_phase (double delta_phase) {
- phase += delta_phase;
- }
-
-
- // angle_rate is in radians / step
- void set_freq (double angle_rate){
- phase_inc = angle_rate;
- }
-
- // angle_rate is a delta in radians / step
- void adjust_freq (double delta_angle_rate)
- {
- phase_inc += delta_angle_rate;
- }
-
- // increment current phase angle
-
- void step ()
- {
- phase += phase_inc;
- if (fabs (phase) > M_PI){
-
- while (phase > M_PI)
- phase -= 2*M_PI;
-
- while (phase < -M_PI)
- phase += 2*M_PI;
- }
- }
-
- void step (int n)
- {
- phase += phase_inc * n;
- if (fabs (phase) > M_PI){
-
- while (phase > M_PI)
- phase -= 2*M_PI;
-
- while (phase < -M_PI)
- phase += 2*M_PI;
- }
- }
-
- // units are radians / step
- double get_phase () const { return phase; }
- double get_freq () const { return phase_inc; }
-
- // compute sin and cos for current phase angle
- void sincos (float *sinx, float *cosx) const;
-
- // compute cos or sin for current phase angle
- float cos () const { return std::cos (phase); }
- float sin () const { return std::sin (phase); }
-
- // compute a block at a time
- void sin (float *output, int noutput_items, double ampl = 1.0);
- void cos (float *output, int noutput_items, double ampl = 1.0);
- void sincos (gr_complex *output, int noutput_items, double ampl = 1.0);
- void sin (short *output, int noutput_items, double ampl = 1.0);
- void cos (short *output, int noutput_items, double ampl = 1.0);
- void sin (int *output, int noutput_items, double ampl = 1.0);
- void cos (int *output, int noutput_items, double ampl = 1.0);
-
-protected:
- double phase;
- double phase_inc;
-};
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::sincos (float *sinx, float *cosx) const
-{
- ui_sincosf (phase, sinx, cosx);
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::sin (float *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (float)(sin () * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::cos (float *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (float)(cos () * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::sin (short *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (short)(sin() * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::cos (short *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (short)(cos () * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::sin (int *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (int)(sin () * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::cos (int *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- output[i] = (int)(cos () * ampl);
- step ();
- }
-}
-
-template<class o_type, class i_type>
-void
-ui_nco<o_type,i_type>::sincos (gr_complex *output, int noutput_items, double ampl)
-{
- for (int i = 0; i < noutput_items; i++){
- float cosx, sinx;
- sincos (&sinx, &cosx);
- output[i] = gr_complex(cosx * ampl, sinx * ampl);
- step ();
- }
-}
-
-#endif /* INCLUDED_UI_NCO_H */
-
diff --git a/usrp/limbo/apps-inband/ui_sincos.c b/usrp/limbo/apps-inband/ui_sincos.c
deleted file mode 100644
index 27841f010..000000000
--- a/usrp/limbo/apps-inband/ui_sincos.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 Free Software Foundation, Inc.
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define _GNU_SOURCE // ask for GNU extensions if available
-
-#include "ui_sincos.h"
-#include <math.h>
-
-// ----------------------------------------------------------------
-
-#if defined (HAVE_SINCOS)
-
-void
-ui_sincos (double x, double *sinx, double *cosx)
-{
- sincos (x, sinx, cosx);
-}
-
-#else
-
-void
-ui_sincos (double x, double *sinx, double *cosx)
-{
- *sinx = sin (x);
- *cosx = cos (x);
-}
-
-#endif
-
-// ----------------------------------------------------------------
-
-#if defined (HAVE_SINCOSF)
-
-void
-ui_sincosf (float x, float *sinx, float *cosx)
-{
- sincosf (x, sinx, cosx);
-}
-
-#elif defined (HAVE_SINF) && defined (HAVE_COSF)
-
-void
-ui_sincosf (float x, float *sinx, float *cosx)
-{
- *sinx = sinf (x);
- *cosx = cosf (x);
-}
-
-#else
-
-void
-ui_sincosf (float x, float *sinx, float *cosx)
-{
- *sinx = sin (x);
- *cosx = cos (x);
-}
-
-#endif
diff --git a/usrp/limbo/apps-inband/ui_sincos.h b/usrp/limbo/apps-inband/ui_sincos.h
deleted file mode 100644
index d2d6e4b76..000000000
--- a/usrp/limbo/apps-inband/ui_sincos.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004 Free Software Foundation, Inc.
- *
- * 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.
- */
-
-#ifndef INCLUDED_UI_SINCOS_H
-#define INCLUDED_UI_SINCOS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// compute sine and cosine at the same time
-
-void ui_sincos (double x, double *sin, double *cos);
-void ui_sincosf (float x, float *sin, float *cos);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* INCLUDED_UI_SINCOS_H */
diff --git a/usrp/limbo/inband/.gitignore b/usrp/limbo/inband/.gitignore
deleted file mode 100644
index a228dcdc1..000000000
--- a/usrp/limbo/inband/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
-/*.swp
-/*.dat
-/test_fusb
-/std_paths.h
-/usrp_dbid.py
-/usrp_dbid.h
-/usrp_dbid.cc
-/usrp_server_mbh.cc
-/test_inband
-/test_usrp_inband
-/test_usrp_tx
-/*_mbh.cc
diff --git a/usrp/limbo/inband/Makefile.am b/usrp/limbo/inband/Makefile.am
deleted file mode 100644
index 650a25ff9..000000000
--- a/usrp/limbo/inband/Makefile.am
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# Copyright 2007,2008 Free Software Foundation, Inc.
-#
-# 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-AM_CPPFLAGS = \
- $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
- $(USRP_INCLUDES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) \
- -I$(srcdir)/../../apps-inband $(WITH_INCLUDES)
-
-TESTS = test_inband
-
-EXTRA_DIST = \
- usrp_server.mbh \
- usrp_interface.mbh
-
-lib_LTLIBRARIES = \
- libusrp-inband.la \
- libusrp-inband-qa.la
-
-# ------------------------------------------------------------------------
-# Build the inband library
-
-BUILT_SOURCES = \
- usrp_server_mbh.cc \
- usrp_interface_mbh.cc
-
-usrp_server_mbh.cc : usrp_server.mbh
- $(COMPILE_MBH) $(srcdir)/usrp_server.mbh usrp_server_mbh.cc
-
-usrp_interface_mbh.cc : usrp_interface.mbh
- $(COMPILE_MBH) $(srcdir)/usrp_interface.mbh usrp_interface_mbh.cc
-
-libusrp_inband_la_SOURCES = \
- $(BUILT_SOURCES) \
- $(srcdir)/../../apps-inband/ui_sincos.c \
- usrp_inband_usb_packet.cc \
- usrp_rx.cc \
- usrp_rx_stub.cc \
- usrp_server.cc \
- usrp_tx.cc \
- usrp_tx_stub.cc \
- usrp_usb_interface.cc
-
-libusrp_inband_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
-
-libusrp_inband_la_LIBADD = \
- $(MBLOCK_LA) \
- $(USRP_LA) \
- -lstdc++
-
-include_HEADERS = \
- usrp_inband_usb_packet.h \
- usrp_rx.h \
- usrp_rx_stub.h \
- usrp_server.h \
- usrp_tx.h \
- usrp_tx_stub.h \
- usrp_usb_interface.h
-
-noinst_HEADERS = \
- qa_inband.h \
- qa_inband_packet_prims.h \
- qa_inband_usrp_server.h \
- symbols_usrp_channel.h \
- symbols_usrp_interface_cs.h \
- symbols_usrp_low_level_cs.h \
- symbols_usrp_rx.h \
- symbols_usrp_rx_cs.h \
- symbols_usrp_server_cs.h \
- symbols_usrp_tx.h \
- symbols_usrp_tx_cs.h
-
-# ------------------------------------------------------------------------
-# Build the qa code in its own library
-
-libusrp_inband_qa_la_SOURCES = \
- qa_inband.cc \
- qa_inband_packet_prims.cc \
- qa_inband_usrp_server.cc
-
-# magic flags
-libusrp_inband_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid-version
-
-libusrp_inband_qa_la_LIBADD = \
- libusrp-inband.la \
- $(PMT_LA) \
- $(CPPUNIT_LIBS) \
- -lstdc++
-
-# ------------------------------------------------------------------------
-
-noinst_PROGRAMS = \
- test_inband
-
-test_inband_SOURCES = test_inband.cc
-test_inband_LDADD = libusrp-inband-qa.la
diff --git a/usrp/limbo/inband/dump_packets.py b/usrp/limbo/inband/dump_packets.py
deleted file mode 100755
index 237362406..000000000
--- a/usrp/limbo/inband/dump_packets.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007 Free Software Foundation, Inc.
-#
-# 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-import sys
-import struct
-from optparse import OptionParser
-
-from usb_packet import *
-
-def dump_packet(raw_pkt, outfile, dump_payload):
- pkt = usb_packet(raw_pkt)
- outfile.write(pkt.decoded_flags())
- outfile.write(' chan= %2d len= %3d timestamp= 0x%08x rssi= % 2d tag= %2d\n' % (
- pkt.chan(), pkt.payload_len(), pkt.timestamp(), pkt.rssi(), pkt.tag()))
- if dump_payload:
- assert pkt.payload_len() % 4 == 0
- shorts = struct.unpack('<%dh' % (pkt.payload_len() // 2), pkt.payload())
- for i in range(0, len(shorts), 2):
- outfile.write(' %6d, %6d\n' % (shorts[i], shorts[i+1]))
-
-
-def dump_packets(infile, outfile, dump_payload):
- raw_pkt = infile.read(512)
- while raw_pkt:
- if len(raw_pkt) != 512:
- sys.stderr.write("File length is not a multiple of 512 bytes")
- raise SystemExit, 1
-
- dump_packet(raw_pkt, outfile, dump_payload)
- raw_pkt = infile.read(512)
-
-
-def main():
- parser = OptionParser()
- parser.add_option('-p', '--dump-payload', action='store_true', default=False,
- help='dump payload in decimal and hex')
-
- (options, files) = parser.parse_args()
- if len(files) == 0:
- dump_packets(sys.stdin, sys.stdout, options.dump_payload)
- else:
- for f in files:
- dump_packets(open(f, "r"), sys.stdout, options.dump_payload)
-
-
-if __name__ == '__main__':
- main()
diff --git a/usrp/limbo/inband/gen_test_packets.py b/usrp/limbo/inband/gen_test_packets.py
deleted file mode 100755
index 2ee646384..000000000
--- a/usrp/limbo/inband/gen_test_packets.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-
-import random
-import struct
-from pprint import pprint
-from usb_packet import *
-
-MAX_PAYLOAD = 504
-TIME_NOW = 0xffffffff
-
-
-class sequence_generator(object):
- def __init__(self):
- self.i = 0
-
- def __call__(self):
- t = self.i
- self.i += 1
- return t
-
-def gen_shuffled_lengths():
- valid_lengths = range(0, MAX_PAYLOAD+1, 4) # [0, 4, 8, ... 504]
- random.shuffle(valid_lengths)
- return valid_lengths
-
-
-class packet_sequence_generator(object):
- def __init__(self, channel, lengths):
- self.next = sequence_generator()
- self.channel = channel
- self.lengths = lengths
-
- def __call__(self, output_file):
- gen_packet(output_file, self.channel, self.next, self.lengths[0])
- del self.lengths[0]
-
-
-def gen_packet(output_file, channel, content_generator, payload_len):
- assert (payload_len % 4) == 0
- payload = []
- n_iq = payload_len // 4
- for n in range(n_iq):
- payload.append(content_generator()) # I
- payload.append(content_generator()) # Q
- for n in range(MAX_PAYLOAD // 4 - n_iq):
- payload.append(0x0000)
- payload.append(0xffff)
-
- assert (len(payload) == MAX_PAYLOAD // 2)
-
- #print "\npayload_len =", payload_len
- #pprint(payload)
-
- output_file.write(make_header(FL_START_OF_BURST|FL_END_OF_BURST,
- channel, payload_len, TIME_NOW))
- output_file.write(struct.pack('<252h', *payload))
-
-
-def gen_all_valid_packet_lengths_1_channel(output_file):
- lengths = gen_shuffled_lengths()
- npkts = len(lengths) # number of packets we'll generator on each stream
- pkt_gen_0 = packet_sequence_generator(0, lengths)
- for i in range(npkts):
- pkt_gen_0(output_file)
-
- assert pkt_gen_0.next() == 16002 # 2*sum(1, 2, ..., 126) == 126 * 127
-
-
-def gen_all_valid_packet_lengths_2_channels(output_file):
- lengths = gen_shuffled_lengths()
- npkts = len(lengths) # number of packets we'll generator on each stream
- pkt_gen_0 = packet_sequence_generator(0, lengths)
- pkt_gen_1 = packet_sequence_generator(0x1f, gen_shuffled_lengths())
- pkt_gen = (pkt_gen_0, pkt_gen_1)
-
- which_gen = (npkts * [0]) + (npkts * [1])
- random.shuffle(which_gen)
-
- for i in which_gen:
- pkt_gen[i](output_file)
-
- assert pkt_gen_0.next() == 16002 # 2*sum(1, 2, ..., 126) == 126 * 127
- assert pkt_gen_1.next() == 16002 # 2*sum(1, 2, ..., 126) == 126 * 127
-
-if __name__ == '__main__':
- random.seed(0)
- gen_all_valid_packet_lengths_1_channel(open("all_valid_packet_lengths_1_channel.dat", "w"))
- gen_all_valid_packet_lengths_2_channels(open("all_valid_packet_lengths_2_channels.dat", "w"))
diff --git a/usrp/limbo/inband/qa_inband.cc b/usrp/limbo/inband/qa_inband.cc
deleted file mode 100644
index 6f33a6ead..000000000
--- a/usrp/limbo/inband/qa_inband.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <qa_inband.h>
-#include <qa_inband_packet_prims.h>
-#include <qa_inband_usrp_server.h>
-
-CppUnit::TestSuite *
-qa_inband::suite()
-{
- CppUnit::TestSuite *s = new CppUnit::TestSuite("inband");
-
- s->addTest (qa_inband_packet_prims::suite());
- s->addTest (qa_inband_usrp_server::suite());
-
- return s;
-}
diff --git a/usrp/limbo/inband/qa_inband.h b/usrp/limbo/inband/qa_inband.h
deleted file mode 100644
index ab8f7f250..000000000
--- a/usrp/limbo/inband/qa_inband.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_QA_INBAND_H
-#define INCLUDED_QA_INBAND_H
-
-#include <cppunit/TestSuite.h>
-
-//! collect all the tests for the user server
-
-class qa_inband {
- public:
- //! return suite of tests for all of usrp server
- static CppUnit::TestSuite *suite();
-};
-
-#endif /* INCLUDED_QA_INBAND_H */
diff --git a/usrp/limbo/inband/qa_inband_packet_prims.cc b/usrp/limbo/inband/qa_inband_packet_prims.cc
deleted file mode 100644
index d9bbbec22..000000000
--- a/usrp/limbo/inband/qa_inband_packet_prims.cc
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <qa_inband_packet_prims.h>
-#include <cppunit/TestAssert.h>
-#include <stdio.h>
-#include <string.h>
-#include <usrp_inband_usb_packet.h> // will change on gigabit crossover
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-void
-qa_inband_packet_prims::test_flags()
-{
- transport_pkt pkt;
-
- // Test each one of the flags while ensuring no other fields become set in the process
- pkt.set_header(pkt.FL_START_OF_BURST,0,0,0);
- CPPUNIT_ASSERT_EQUAL(1, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- pkt.set_header(pkt.FL_END_OF_BURST,0,0,0);
- CPPUNIT_ASSERT_EQUAL(0, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(1, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- pkt.set_header(pkt.FL_OVERRUN,0,0,0);
- CPPUNIT_ASSERT_EQUAL(0, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(1, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- pkt.set_header(pkt.FL_UNDERRUN,0,0,0);
- CPPUNIT_ASSERT_EQUAL(0, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(1, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- pkt.set_header(pkt.FL_DROPPED,0,0,0);
- CPPUNIT_ASSERT_EQUAL(0, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(1, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- // test of all fields set
- pkt.set_header(
- pkt.FL_START_OF_BURST |
- pkt.FL_END_OF_BURST |
- pkt.FL_UNDERRUN |
- pkt.FL_OVERRUN |
- pkt.FL_DROPPED
- ,0,0,0);
- CPPUNIT_ASSERT_EQUAL(1, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(1, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(1, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(1, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(1, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
-
-}
-//////////////////////////////////////////////////////////////////////
-
-void
-qa_inband_packet_prims::test_fields()
-{
- transport_pkt pkt;
- void * payload;
-
- // test word0 field exclusiveness
- //
- // I want to test max values of each field to ensure field boundaries
- // but these max values could change based on technology? The
- // max payload is returned by a private method so the code is not
- // technology dependent
- pkt.set_header(0,16,0,0);
- CPPUNIT_ASSERT_EQUAL(16, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
-
- pkt.set_header(0,0,8,0);
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(8, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0,pkt.payload_len());
-
- pkt.set_header(0,0,0,pkt.max_payload());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(pkt.max_payload(), pkt.payload_len());
-
- // test timestamp, shouldn't have to test other fields since
- // setting the timestamp only has the ability to affect one word
- pkt.set_timestamp(54);
- CPPUNIT_ASSERT_EQUAL(uint32_t(54), pkt.timestamp());
-
- // test the payload, ensure no other fields overwritten
- //
- // is there a better test for this?
- pkt.set_header(0,0,0,0);
- payload = malloc(pkt.payload_len());
- memset(payload, 'f', pkt.payload_len());
- memcpy(pkt.payload(), payload, pkt.payload_len());
- CPPUNIT_ASSERT_EQUAL(0, memcmp(pkt.payload(), payload, pkt.payload_len()));
- CPPUNIT_ASSERT_EQUAL(0, pkt.start_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.end_of_burst());
- CPPUNIT_ASSERT_EQUAL(0, pkt.overrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.underrun());
- CPPUNIT_ASSERT_EQUAL(0, pkt.dropped());
- CPPUNIT_ASSERT_EQUAL(0, pkt.chan());
- CPPUNIT_ASSERT_EQUAL(0, pkt.tag());
- CPPUNIT_ASSERT_EQUAL(0, pkt.payload_len());
- free(payload);
-
-}
-//////////////////////////////////////////////////////////////////////
diff --git a/usrp/limbo/inband/qa_inband_packet_prims.h b/usrp/limbo/inband/qa_inband_packet_prims.h
deleted file mode 100644
index 71c0d737d..000000000
--- a/usrp/limbo/inband/qa_inband_packet_prims.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef QA_INBAND_PACKET_PRIMS_H
-#define QA_INBAND_PACKET_PRIMS_H
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class qa_inband_packet_prims : public CppUnit::TestCase {
-
- CPPUNIT_TEST_SUITE(qa_inband_packet_prims);
- CPPUNIT_TEST(test_flags);
- CPPUNIT_TEST(test_fields);
- CPPUNIT_TEST_SUITE_END();
-
- private:
- void test_flags();
- void test_fields();
-
-};
-
-#endif /* INCLUDED_QA_INBAND_PACKET_PRIMS_H */
diff --git a/usrp/limbo/inband/qa_inband_usrp_server.cc b/usrp/limbo/inband/qa_inband_usrp_server.cc
deleted file mode 100644
index 6049a8a87..000000000
--- a/usrp/limbo/inband/qa_inband_usrp_server.cc
+++ /dev/null
@@ -1,1575 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_inband_usb_packet.h>
-#include <qa_inband_usrp_server.h>
-#include <cppunit/TestAssert.h>
-#include <stdio.h>
-#include <usrp_server.h>
-#include <mblock/mblock.h>
-#include <mblock/runtime.h>
-#include <mblock/protocol_class.h>
-#include <mblock/class_registry.h>
-#include <vector>
-#include <iostream>
-#include <pmt.h>
-
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_low_level_cs.h>
-
-typedef usrp_inband_usb_packet transport_pkt; // makes conversion to gigabit easy
-
-static bool verbose = false;
-
-static pmt_t s_timeout = pmt_intern("%timeout");
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_alloc_top : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_nmsgs_to_recv;
- long d_nrecvd;
-
- long d_max_capacity;
- long d_ntx_chan, d_nrx_chan;
-
- long d_nstatus;
- long d_nstatus_to_recv;
-
- public:
- qa_alloc_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_alloc_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_message(mb_message_sptr msg);
- void run_tests();
-};
-
-qa_alloc_top::qa_alloc_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
- d_nrecvd=0;
- d_nmsgs_to_recv = 6;
- d_nstatus=0;
- d_nstatus_to_recv = 50;
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-qa_alloc_top::~qa_alloc_top(){}
-
-void
-qa_alloc_top::initial_transition()
-{
- // Allocations should fail before open
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel,
- s_err_usrp_not_opened),
- pmt_from_long(1)));
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel,
- s_err_usrp_not_opened),
- pmt_from_long(1)));
-
- // Retrieve information about the USRP, then run tests
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open, PMT_T),
- pmt_from_long(0)));
-
- d_cs->send(s_cmd_max_capacity,
- pmt_list1(pmt_list2(s_response_max_capacity, PMT_T)));
-
- d_cs->send(s_cmd_ntx_chan,
- pmt_list1(pmt_list2(s_response_ntx_chan, PMT_T)));
-
- d_cs->send(s_cmd_nrx_chan,
- pmt_list1(pmt_list2(s_response_nrx_chan,PMT_T)));
-}
-
-void
-qa_alloc_top::run_tests()
-{
- if(verbose)
- std::cout << "[qa_alloc_top] Starting tests...\n";
-
- // should be able to allocate 1 byte
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(PMT_T, pmt_from_long(1)));
-
- // should not be able to allocate max capacity after 100 bytes were allocated
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(s_err_requested_capacity_unavailable,
- pmt_from_long(d_max_capacity)));
-
- // keep allocating a little more until all of the channels are used and test
- // the error response we start at 1 since we've already allocated 1 channel
- for(int i=1; i < d_ntx_chan; i++) {
-
- if(verbose)
- std::cout << "[qa_alloc_top] Sent allocation request...\n";
-
- d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(1)));
-
- d_nmsgs_to_recv++;
- }
-
- // No more channels after allocating all of them is expected
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(s_err_channel_unavailable,
- pmt_from_long(1)));
-
- // test out the same on the RX side
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(1)));
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(s_err_requested_capacity_unavailable,
- pmt_from_long(d_max_capacity)));
-
- for(int i=1; i < d_nrx_chan; i++) {
-
- d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_T, pmt_from_long(1)));
-
- d_nmsgs_to_recv++;
- }
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(s_err_channel_unavailable,
- pmt_from_long(1)));
-
- // when all is said and done, there should be d_ntx_chan+d_ntx_chan bytes
- // allocated
- d_cs->send(s_cmd_current_capacity_allocation,
- pmt_list1(pmt_from_long(d_ntx_chan+d_nrx_chan)));
-}
-
-void
-qa_alloc_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
-
- if ((pmt_eq(msg->port_id(), d_tx->port_symbol())
- || pmt_eq(msg->port_id(), d_rx->port_symbol()))
- && pmt_eq(msg->signal(), s_response_allocate_channel))
- check_message(msg);
-
- if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_max_capacity)) {
- d_max_capacity = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_alloc_top] USRP has max capacity of "
- << d_max_capacity << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_ntx_chan)) {
- d_ntx_chan = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_alloc_top] USRP tx channels: "
- << d_ntx_chan << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_nrx_chan)) {
- d_nrx_chan = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_alloc_top] USRP rx channels: "
- << d_nrx_chan << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_current_capacity_allocation)) {
- check_message(msg);
- }
-
- d_nstatus++;
-
- check_message(msg);
-
- if(d_nstatus==d_nstatus_to_recv)
- run_tests();
- }
-}
-
-void
-qa_alloc_top::check_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- d_nrecvd++;
-
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- if(verbose)
- std::cout << "Got: " << status << " Expected: " << e_status << "\n";
- shutdown_all(PMT_F);
- return;
- } else {
- if(verbose)
- std::cout << "[qa_alloc_top] Received expected response for message "
- << d_nrecvd << " (" << event << ")\n";
- }
-
- if(d_nrecvd == d_nmsgs_to_recv)
- shutdown_all(PMT_T);
-}
-
-REGISTER_MBLOCK_CLASS(qa_alloc_top);
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_dealloc_top : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_max_capacity;
- long d_ntx_chan, d_nrx_chan;
-
- long d_nstatus;
- long d_nstatus_to_recv;
-
- long d_nalloc_to_recv;
- long d_nalloc_recvd;
-
- long d_ndealloc_to_recv;
- long d_ndealloc_recvd;
-
- std::vector<long> d_tx_chans;
- std::vector<long> d_rx_chans;
-
- public:
- qa_dealloc_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_dealloc_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_allocation(mb_message_sptr msg);
- void check_deallocation(mb_message_sptr msg);
- void allocate_max();
- void deallocate_all();
-};
-
-qa_dealloc_top::qa_dealloc_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
- d_ndealloc_recvd=0;
- d_ndealloc_to_recv = 0;
- d_nalloc_recvd=0;
- d_nalloc_to_recv = 0; // auto-set
- d_nstatus=0;
- d_nstatus_to_recv = 4;
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-}
-
-qa_dealloc_top::~qa_dealloc_top(){}
-
-void
-qa_dealloc_top::initial_transition()
-{
-
- if(verbose)
- std::cout << "[qa_dealloc_top] Initializing...\n";
-
- // Retrieve information about the USRP, then run tests
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
-
- d_cs->send(s_cmd_max_capacity,
- pmt_list1(pmt_list2(s_response_max_capacity,PMT_T)));
-
- d_cs->send(s_cmd_ntx_chan,
- pmt_list1(pmt_list2(s_response_ntx_chan,PMT_T)));
-
- d_cs->send(s_cmd_nrx_chan,
- pmt_list1(pmt_list2(s_response_nrx_chan,PMT_T)));
-}
-
-void
-qa_dealloc_top::allocate_max()
-{
-
- // Keep allocating until we hit the maximum number of channels
- for(int i=0; i < d_ntx_chan; i++) {
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel,PMT_T),
- pmt_from_long(1))); // 1 byte is good enough
-
- d_nalloc_to_recv++;
- }
-
- for(int i=0; i < d_nrx_chan; i++) {
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel,PMT_T),
- pmt_from_long(1)));
-
- d_nalloc_to_recv++;
- }
-
-}
-
-void
-qa_dealloc_top::deallocate_all() {
-
- // Deallocate all of the channels that were allocated from allocate_max()
- for(int i=0; i < (int)d_tx_chans.size(); i++) {
-
- if(verbose)
- std::cout << "[qa_dealloc_top] Trying to dealloc TX "
- << d_tx_chans[i] << std::endl;
-
- d_tx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,PMT_T),
- pmt_from_long(d_tx_chans[i])));
-
- d_ndealloc_to_recv++;
- }
-
- // Deallocate the RX side now
- for(int i=0; i < (int)d_rx_chans.size(); i++) {
-
- if(verbose)
- std::cout << "[qa_dealloc_top] Trying to dealloc RX "
- << d_tx_chans[i] << std::endl;
-
- d_rx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,PMT_T),
- pmt_from_long(d_rx_chans[i])));
-
- d_ndealloc_to_recv++;
- }
-
- // Should get permission denied errors trying to re-dealloc the channels, as
- // we no longer have permission to them after deallocating
- for(int i=0; i < (int)d_tx_chans.size(); i++) {
-
- d_tx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,
- s_err_channel_permission_denied),
- pmt_from_long(d_tx_chans[i])));
-
- d_ndealloc_to_recv++;
- }
-
- // Same for RX
- for(int i=0; i < (int)d_rx_chans.size(); i++) {
-
- d_rx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,
- s_err_channel_permission_denied),
- pmt_from_long(d_rx_chans[i])));
-
- d_ndealloc_to_recv++;
- }
-
- // Try to deallocate a channel that doesn't exist on both sides, the last
- // element in the vectors is the highest channel number, so we take that plus
- // 1
- d_ndealloc_to_recv+=2;
- d_tx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,
- s_err_channel_invalid),
- pmt_from_long(d_rx_chans.back()+1)));
-
- d_rx->send(s_cmd_deallocate_channel,
- pmt_list2(pmt_list2(s_response_deallocate_channel,
- s_err_channel_invalid),
- pmt_from_long(d_rx_chans.back()+1)));
-
-
- // The used capacity should be back to 0 now that we've deallocated everything
- d_cs->send(s_cmd_current_capacity_allocation,
- pmt_list1(pmt_list2(s_response_current_capacity_allocation,
- PMT_T)));
-}
-
-void
-qa_dealloc_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- if(pmt_eq(event, pmt_intern("%shutdown")))
- return;
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- if(verbose)
- std::cout << "Got: " << status << " Expected: " << e_status << "\n";
- shutdown_all(PMT_F);
- return;
- } else {
- if(verbose)
- std::cout << "[qa_alloc_top] Received expected response for message "
- << d_ndealloc_recvd
- << " (" << event << ")\n";
- }
-
- if (pmt_eq(msg->port_id(), d_tx->port_symbol())
- || pmt_eq(msg->port_id(), d_rx->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_allocate_channel)) {
- check_allocation(msg);
- }
-
- }
-
- if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_max_capacity)) {
- d_max_capacity = pmt_to_long(pmt_nth(2, data));
- }
- else if(pmt_eq(msg->signal(), s_response_ntx_chan)) {
- d_ntx_chan = pmt_to_long(pmt_nth(2, data));
- }
- else if(pmt_eq(msg->signal(), s_response_nrx_chan)) {
- d_nrx_chan = pmt_to_long(pmt_nth(2, data));
- }
- else if(pmt_eq(msg->signal(), s_response_current_capacity_allocation)) {
- // the final command is a capacity check which should be 0, then we
- // shutdown
- pmt_t expected_result = pmt_from_long(0);
- pmt_t result = pmt_nth(2, data);
-
- if(pmt_eqv(expected_result, result)) {
- shutdown_all(PMT_T);
- return;
- } else {
- shutdown_all(PMT_F);
- return;
- }
- }
-
- d_nstatus++;
-
- if(d_nstatus==d_nstatus_to_recv)
- allocate_max();
- }
-}
-
-
-void
-qa_dealloc_top::check_allocation(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t channel = pmt_nth(2, data);
-
- d_nalloc_recvd++;
-
- if(!pmt_eqv(status, PMT_T)) {
- shutdown_all(PMT_F);
- return;
- } else {
- // store all of the allocate channel numbers
- if(pmt_eq(msg->port_id(), d_tx->port_symbol()))
- d_tx_chans.push_back(pmt_to_long(channel));
- if(pmt_eq(msg->port_id(), d_rx->port_symbol()))
- d_rx_chans.push_back(pmt_to_long(channel));
- }
-
- if(d_nalloc_recvd == d_nalloc_to_recv) {
-
- if(verbose) {
- std::cout << "[qa_dealloc_top] Allocated TX channels: ";
- for(int i=0; i < (int)d_tx_chans.size(); i++)
- std::cout << d_tx_chans[i] << " ";
-
- std::cout << "\n[qa_dealloc_top] Allocated RX channels: ";
- for(int i=0; i < (int)d_rx_chans.size(); i++)
- std::cout << d_rx_chans[i] << " ";
- std::cout << "\n";
- }
-
- deallocate_all(); // once we've allocated all of our channels, try to
- // dealloc them
- }
-}
-
-REGISTER_MBLOCK_CLASS(qa_dealloc_top);
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_open_close_top : public mb_mblock
-{
- mb_port_sptr d_cs;
-
- long d_max_capacity;
-
- long d_nmsg_to_recv;
- long d_nmsg_recvd;
-
- public:
- qa_open_close_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_open_close_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_cs(mb_message_sptr msg);
- void run_tests();
-};
-
-qa_open_close_top::qa_open_close_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
-
- d_nmsg_to_recv=7;
- d_nmsg_recvd=0;
-
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "cs", "server", "cs");
-}
-
-qa_open_close_top::~qa_open_close_top(){}
-
-void
-qa_open_close_top::initial_transition()
-{
- run_tests();
-}
-
-void
-qa_open_close_top::run_tests()
-{
- // std::cout << "[qa_open_close_top] Starting tests\n";
-
- // A close before an open should fail
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,
- s_err_usrp_already_closed)));
-
- // Perform an open, and a second open which should fail
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
-
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open,
- s_err_usrp_already_opened),
- pmt_from_long(0)));
-
- // A close should now be successful since the interface is open
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
-
- // But, a second close should fail
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,
- s_err_usrp_already_closed)));
-
- // Just to be thorough, try an open and close again
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
-
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
-
-}
-
-
-void
-qa_open_close_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
-
- if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
- check_cs(msg);
- }
-
- d_nmsg_recvd++;
-
- if(d_nmsg_to_recv == d_nmsg_recvd)
- shutdown_all(PMT_T);
-}
-
-void
-qa_open_close_top::check_cs(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
-
- if(verbose)
- std::cout << "[qa_open_close_top] FAILED check_cs... Got: " << status
- << " Expected: " << e_status
- << " for event " << event << "\n";
-
- shutdown_all(PMT_F);
- } else {
- if(verbose)
- std::cout << "[qa_open_close_top] Received expected CS response ("
- << event << ")\n";
- }
-
-}
-
-REGISTER_MBLOCK_CLASS(qa_open_close_top);
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_tx_top : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_max_capacity;
- long d_ntx_chan, d_nrx_chan;
-
- long d_tx_chan;
- long d_rx_chan;
-
- long d_nmsg_to_recv;
- long d_nmsg_recvd;
-
- public:
- qa_tx_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_tx_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_allocation(mb_message_sptr msg);
- void check_deallocation(mb_message_sptr msg);
- void check_xmit(mb_message_sptr msg);
- void check_cs(mb_message_sptr msg);
- void run_tests();
-};
-
-qa_tx_top::qa_tx_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
-
- d_nmsg_to_recv=10;
- d_nmsg_recvd=0;
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-}
-
-qa_tx_top::~qa_tx_top(){}
-
-void
-qa_tx_top::initial_transition()
-{
- run_tests();
-}
-
-void
-qa_tx_top::run_tests()
-{
- if(verbose)
- std::cout << "[qa_tx_top] Starting tests\n";
-
- // A transmit before an open should fail
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame,
- s_err_usrp_not_opened),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- // Now open
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
-
- // Try to transmit on a channel that we have no allocation for
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame,
- s_err_channel_permission_denied),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- // Get a channel allocation and send on it, we assume 0 (FIXME) until 'defer'
- // is implemented for simplicity
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame, PMT_T),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- // Close should be successful
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
-
- // After closing, a new transmit raw frame should fail again
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame,
- s_err_usrp_not_opened),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- // Reopen and retry before getting an allocation, the first xmit should fail,
- // after we allocate it should work again
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open, PMT_T),
- pmt_from_long(0)));
-
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame,
- s_err_channel_permission_denied),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- d_tx->send(s_cmd_xmit_raw_frame,
- pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_T),
- pmt_from_long(0),
- pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
- pmt_from_long(0)));
-
- // A final close which should be successful
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
-
-}
-
-
-void
-qa_tx_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- if(pmt_eq(event, pmt_intern("%shutdown")))
- return;
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- if(verbose)
- std::cout << "[qa_xmit_top] Got: " << status
- << " Expected: " << e_status
- << "For signal: " << event << "\n";
- shutdown_all(PMT_F);
- return;
- } else {
- if(verbose)
- std::cout << "[qa_xmit_top] Received expected response for message "
- << d_nmsg_recvd
- << " (" << event << ")\n";
- }
-
- if (pmt_eq(msg->port_id(), d_tx->port_symbol())
- || pmt_eq(msg->port_id(), d_rx->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_allocate_channel))
- check_allocation(msg);
-
- }
-
- d_nmsg_recvd++;
-
- if(d_nmsg_to_recv == d_nmsg_recvd){
- shutdown_all(PMT_T);
- return;
- }
-}
-
-void
-qa_tx_top::check_allocation(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t channel = pmt_nth(2, data);
-
- if(pmt_eqv(status, PMT_T)) {
- // store all of the allocate channel numbers
- if(pmt_eq(msg->port_id(), d_tx->port_symbol()))
- d_tx_chan = pmt_to_long(channel);
- if(pmt_eq(msg->port_id(), d_rx->port_symbol()))
- d_rx_chan = pmt_to_long(channel);
- }
-}
-
-REGISTER_MBLOCK_CLASS(qa_tx_top);
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_rx_top : public mb_mblock
-{
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_max_capacity;
- long d_ntx_chan, d_nrx_chan;
-
- long d_rx_chan;
-
- bool d_got_response_recv;
-
- mb_time d_t0;
- double d_delta_t;
-
- public:
- qa_rx_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_rx_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_allocation(mb_message_sptr msg);
- void check_deallocation(mb_message_sptr msg);
- void check_xmit(mb_message_sptr msg);
- void check_cs(mb_message_sptr msg);
- void run_tests();
-};
-
-qa_rx_top::qa_rx_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg),
- d_got_response_recv(false)
-{
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_dict = pmt_make_dict();
- // Set TX and RX interpolations
- pmt_dict_set(usrp_dict,
- pmt_intern("decim-rx"),
- pmt_from_long(128));
- pmt_dict_set(usrp_dict, pmt_intern("fake-usrp"), PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_dict);
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-}
-
-qa_rx_top::~qa_rx_top(){}
-
-void
-qa_rx_top::initial_transition()
-{
- run_tests();
-}
-
-void
-qa_rx_top::run_tests()
-{
- if(verbose)
- std::cout << "[qa_rx_top] Starting tests\n";
-
- d_cs->send(s_cmd_open, pmt_list2(pmt_list2(s_response_open,PMT_T), pmt_from_long(0)));
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel,PMT_T),
- pmt_from_long(1)));
-
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_NIL,
- pmt_from_long(0)));
-
- // Schedule a small timeout in which we expect to have received at least one
- // packet worth of samples from the stub
- d_t0 = mb_time::time();
- schedule_one_shot_timeout(d_t0 + 0.01, PMT_NIL);
-}
-
-
-void
-qa_rx_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- if(pmt_eq(event, pmt_intern("%shutdown")))
- return;
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- // If we get a timeout we shutdown
- if(pmt_eq(event, s_timeout)) {
- if(verbose)
- std::cout << "[qa_rx_top] Got timeout\n";
- d_rx->send(s_cmd_stop_recv_raw_samples,
- pmt_list2(PMT_NIL,
- pmt_from_long(0)));
-
- d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
- return;
- }
-
- // For testing RX, an invocation handle is not generated by the stub,
- // therefore the same approach for testing is not used. We simply
- // expect all responses to be true.
- if(pmt_eq(event, s_response_recv_raw_samples)) {
- if(pmt_eqv(status, PMT_T)) {
-
- if(verbose)
- std::cout << "[qa_rx_top] Received expected response for message "
- << " (" << event << ")\n";
-
- // All we want is 1 response receive! Can't guarantee exact numbers
- d_got_response_recv = true;
- }
- else {
- if(verbose)
- std::cout << "Got: " << status << " Expected: " << PMT_T << "\n";
- shutdown_all(PMT_F);
- }
- return;
- }
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- if(verbose)
- std::cout << "Got: " << status << " Expected: " << e_status << "\n";
- shutdown_all(PMT_F);
- return;
- } else {
- if(verbose)
- std::cout << "[qa_rx_top] Received expected response for message "
- << " (" << event << ")\n";
- }
-
- if (pmt_eq(msg->port_id(), d_rx->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_allocate_channel))
- check_allocation(msg);
-
- }
-
- // We stop when we get a close, we are successful if we
- // got a response from recv, fail if we never got a recv response
- if(pmt_eq(msg->signal(), s_response_close)) {
-
- if(d_got_response_recv) {
- shutdown_all(PMT_T);
- return;
- }
- else {
- shutdown_all(PMT_F);
- if(verbose)
- std::cout << "[qa_rx_top] No response message before close\n";
- return;
- }
- }
-}
-
-
-void
-qa_rx_top::check_allocation(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t channel = pmt_nth(2, data);
-
- if(pmt_eqv(status, PMT_T)) {
- // store all of the allocate channel numbers
- if(pmt_eq(msg->port_id(), d_rx->port_symbol()))
- d_rx_chan = pmt_to_long(channel);
- }
-}
-
-REGISTER_MBLOCK_CLASS(qa_rx_top);
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_rid_top : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_npongs;
- long d_tcycles;
- long d_cycles;
- long d_max_rid;
-
- mb_time d_t0;
- double d_delta_t;
-
- public:
- qa_rid_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_rid_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void run_tests();
- void send_max_pings();
-};
-
-qa_rid_top::qa_rid_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
- d_npongs = 0;
- d_tcycles = 3;
- d_cycles = d_tcycles;
- d_max_rid = usrp_server::D_MAX_RID;
- d_delta_t = 0.1;
-
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-qa_rid_top::~qa_rid_top(){}
-
-void
-qa_rid_top::initial_transition()
-{
- run_tests();
-}
-
-void
-qa_rid_top::run_tests()
-{
- if(verbose)
- std::cout << "[qa_rid_top] Starting tests...\n";
-
- // Retrieve information about the USRP, then run tests
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open, PMT_T),
- pmt_from_long(0)));
-
- // should be able to allocate 1 byte
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- // Need to start receiving to read from the USRP to get C/S responses
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_NIL,
- pmt_from_long(0)));
-
- // Build a subpacket of MAX_RID pings and wait a small amount for all of the
- // responses and fire off another MAX_RID. If MAX_RID*2 responses are
- // received, the RID recycling is working correctly.
- // Schedule a timer in which we expect to have received all of the responses,
- // which will send off another MAX_RID worth.
- send_max_pings();
- d_t0 = mb_time::time();
- schedule_one_shot_timeout(d_t0 + d_delta_t, PMT_NIL);
-}
-
-void
-qa_rid_top::send_max_pings()
-{
- pmt_t ping = pmt_list2(s_op_ping_fixed,
- pmt_list2(pmt_from_long(0),
- pmt_from_long(0)));
-
- pmt_t sub_packets = PMT_NIL;
-
- for(int i=0; i<d_max_rid; i++)
- sub_packets = pmt_list_add(sub_packets, ping);
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- sub_packets));
-}
-
-void
-qa_rid_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- // If we get a timeout we ensure we got a maximum RID number of responses.
- if(pmt_eq(event, s_timeout)) {
- if(verbose)
- std::cout << "[qa_rid_top] Got timeout, received so far: "
- << d_npongs << "\n";
-
- d_cycles--;
-
- if(d_cycles==0 && d_npongs == d_max_rid*d_tcycles) {
- shutdown_all(PMT_T);
- }
- else if(d_cycles==0) {
-
- std::cout << "[qa_rid_top] d_npongs: " << d_npongs
- << " expected: " << d_max_rid*d_tcycles
- << std::endl;
-
- shutdown_all(PMT_F);
- }
- else {
- send_max_pings();
- d_t0 = mb_time::time();
- schedule_one_shot_timeout(d_t0 + d_delta_t, PMT_NIL);
- }
-
- }
- else if(pmt_eq(event, s_response_from_control_channel))
- {
- d_npongs++;
- }
-
-}
-
-REGISTER_MBLOCK_CLASS(qa_rid_top);
-
-
-// ----------------------------------------------------------------------------------------------
-
-class qa_cs_top : public mb_mblock
-{
- mb_port_sptr d_tx;
- mb_port_sptr d_rx;
- mb_port_sptr d_cs;
-
- long d_nmsgs_to_recv;
- long d_nrecvd;
-
- long d_max_capacity;
- long d_ntx_chan, d_nrx_chan;
-
- long d_nstatus;
- long d_nstatus_to_recv;
-
- public:
- qa_cs_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg);
- ~qa_cs_top();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- protected:
- void check_message(mb_message_sptr msg);
- void run_tests();
-};
-
-qa_cs_top::qa_cs_top(mb_runtime *runtime, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(runtime, instance_name, user_arg)
-{
- d_nrecvd=0;
- d_nmsgs_to_recv = 8;
- d_nstatus=0;
- d_nstatus_to_recv = 50;
-
- d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
- d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
- d_cs = define_port("cs", "usrp-server-cs", false, mb_port::INTERNAL);
-
- // Use the stub with the usrp_server
- pmt_t usrp_server_dict = pmt_make_dict();
- pmt_dict_set(usrp_server_dict, pmt_intern("fake-usrp"),PMT_T);
-
- // Test the TX side
- define_component("server", "usrp_server", usrp_server_dict);
- connect("self", "tx0", "server", "tx0");
- connect("self", "rx0", "server", "rx0");
- connect("self", "cs", "server", "cs");
-
-}
-
-qa_cs_top::~qa_cs_top(){}
-
-void
-qa_cs_top::initial_transition()
-{
- run_tests();
-}
-
-void
-qa_cs_top::run_tests()
-{
- if(verbose)
- std::cout << "[qa_cs_top] Starting tests...\n";
-
- // Retrieve information about the USRP, then run tests
- d_cs->send(s_cmd_open,
- pmt_list2(pmt_list2(s_response_open, PMT_T),
- pmt_from_long(0)));
-
- // should be able to allocate 1 byte
- d_tx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- d_rx->send(s_cmd_allocate_channel,
- pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
- pmt_from_long(1)));
-
- // Need to start receiving to read from the USRP to get C/S responses
- d_rx->send(s_cmd_start_recv_raw_samples,
- pmt_list2(PMT_NIL,
- pmt_from_long(0)));
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- pmt_list1(
- pmt_list2(s_op_ping_fixed,
- pmt_list2(pmt_from_long(3),
- pmt_from_long(0))))));
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- pmt_list1(
- pmt_list2(s_op_write_reg,
- pmt_list2(
- pmt_from_long(0x3),
- pmt_from_long(0x4))))));
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- pmt_list1(
- pmt_list2(s_op_write_reg_masked,
- pmt_list3(
- pmt_from_long(0x3),
- pmt_from_long(0x4),
- pmt_from_long(0x5))))));
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- pmt_list1(
- pmt_list2(s_op_read_reg,
- pmt_list2(pmt_from_long(0),
- pmt_from_long(0x6))))));
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- pmt_list1(
- pmt_list2(s_op_delay,
- pmt_list1(pmt_from_long(0x7))))));
-
- pmt_t subpackets = pmt_list5(
- pmt_list2(s_op_ping_fixed, pmt_list2(pmt_from_long(0), pmt_from_long(0))),
- pmt_list2(s_op_delay, pmt_list1(pmt_from_long(0x7))),
- pmt_list2(s_op_write_reg_masked, pmt_list3(pmt_from_long(3),
- pmt_from_long(4),
- pmt_from_long(5))),
- pmt_list2(s_op_write_reg, pmt_list2(pmt_from_long(3),
- pmt_from_long(4))),
- pmt_list2(s_op_read_reg, pmt_list2(pmt_from_long(0),
- pmt_from_long(6)))
- );
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- subpackets));
-
- pmt_t i2c_data = pmt_make_u8vector(8, 0xff);
-
- subpackets = pmt_list2(
- pmt_list2(s_op_i2c_write,
- pmt_list2(pmt_from_long(8), i2c_data)),
- pmt_list2(s_op_i2c_read,
- pmt_list3(pmt_from_long(0), pmt_from_long(9), pmt_from_long(1)))
-
- );
-
- d_tx->send(s_cmd_to_control_channel,
- pmt_list2(pmt_list2(s_response_from_control_channel, PMT_T),
- subpackets));
-
-}
-
-void
-qa_cs_top::handle_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
-
- if ((pmt_eq(msg->port_id(), d_tx->port_symbol())
- || pmt_eq(msg->port_id(), d_rx->port_symbol()))
- && pmt_eq(msg->signal(), s_response_allocate_channel))
- check_message(msg);
-
- if (pmt_eq(msg->port_id(), d_tx->port_symbol())
- && pmt_eq(msg->signal(), s_response_from_control_channel))
- check_message(msg);
-
- if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
-
- if(pmt_eq(msg->signal(), s_response_max_capacity)) {
- d_max_capacity = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_cs_top] USRP has max capacity of "
- << d_max_capacity << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_ntx_chan)) {
- d_ntx_chan = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_cs_top] USRP tx channels: "
- << d_ntx_chan << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_nrx_chan)) {
- d_nrx_chan = pmt_to_long(pmt_nth(2, data));
- if(verbose)
- std::cout << "[qa_cs_top] USRP rx channels: "
- << d_nrx_chan << "\n";
- }
- else if(pmt_eq(msg->signal(), s_response_current_capacity_allocation)) {
- check_message(msg);
- }
-
- d_nstatus++;
-
- check_message(msg);
-
- if(d_nstatus==d_nstatus_to_recv)
- run_tests();
- }
-}
-
-void
-qa_cs_top::check_message(mb_message_sptr msg)
-{
- pmt_t data = msg->data();
- pmt_t event = msg->signal();
-
- pmt_t expected = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
-
- pmt_t e_event = pmt_nth(0, expected);
- pmt_t e_status = pmt_nth(1, expected);
-
- d_nrecvd++;
-
-
- if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- if(verbose)
- std::cout << "[qa_cs_top] Got: " << status << " Expected: " << e_status << "\n";
- shutdown_all(PMT_F);
- return;
- } else {
- if(verbose)
- std::cout << "[qa_cs_top] Received expected response for message "
- << d_nrecvd << " (" << event << ")\n";
- }
-
- if(d_nrecvd == d_nmsgs_to_recv)
- shutdown_all(PMT_T);
-}
-
-REGISTER_MBLOCK_CLASS(qa_cs_top);
-
-// ----------------------------------------------------------------------------------------------
-
-void
-qa_inband_usrp_server::test_open_close()
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n----------------------------\n";
- // std::cout << " RUNNING OPEN/CLOSE TESTS \n";
-
- rt->run("top", "qa_open_close_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_chan_allocation()
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n----------------------------\n";
- // std::cout << " RUNNING ALLOCATION TESTS \n";
-
- rt->run("qa_alloc_top", "qa_alloc_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_chan_deallocation()
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n----------------------------\n";
- // std::cout << " RUNNING DEALLOCATION TESTS \n";
-
- rt->run("qa_dealloc_top", "qa_dealloc_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_tx()
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n-----------------\n";
- // std::cout << " RUNNING TX TESTS \n";
-
- rt->run("top", "qa_tx_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_rx()
-{
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n-----------------\n";
- // std::cout << " RUNNING RX TESTS \n";
-
- rt->run("top", "qa_rx_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_cs()
-{
- // FIXME This test is disabled because it hangs with the change to use usrp_standard_*_sptr's
- return;
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n-----------------\n";
- // std::cout << " RUNNING CS TESTS \n";
-
- rt->run("top", "qa_cs_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
-
-void
-qa_inband_usrp_server::test_rid()
-{
- // FIXME This test is disabled because it hangs with the change to use usrp_standard_*_sptr's
- return;
-
- mb_runtime_sptr rt = mb_make_runtime();
- pmt_t result = PMT_T;
-
- // std::cout << "\n\n-----------------\n";
- // std::cout << " RUNNING RID TESTS \n";
-
- rt->run("top", "qa_rid_top", PMT_F, &result);
-
- CPPUNIT_ASSERT(pmt_equal(PMT_T, result));
-}
diff --git a/usrp/limbo/inband/qa_inband_usrp_server.h b/usrp/limbo/inband/qa_inband_usrp_server.h
deleted file mode 100644
index 52a4a0b06..000000000
--- a/usrp/limbo/inband/qa_inband_usrp_server.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef QA_INBAND_USRP_SERVER_H
-#define QA_INBAND_USRP_SERVER_H
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class qa_inband_usrp_server : public CppUnit::TestCase {
-
- CPPUNIT_TEST_SUITE(qa_inband_usrp_server);
- CPPUNIT_TEST(test_open_close);
- CPPUNIT_TEST(test_chan_allocation);
- CPPUNIT_TEST(test_chan_deallocation);
- CPPUNIT_TEST(test_tx);
- CPPUNIT_TEST(test_rx);
- CPPUNIT_TEST(test_cs);
- CPPUNIT_TEST(test_rid);
- CPPUNIT_TEST_SUITE_END();
-
- private:
- void test_chan_allocation();
- void test_chan_deallocation();
- void test_open_close();
- void test_tx();
- void test_rx();
- void test_cs();
- void test_rid();
-};
-
-#endif /* INCLUDED_QA_INBAND_USRP_SERVER_H */
diff --git a/usrp/limbo/inband/symbols_usrp_channel.h b/usrp/limbo/inband/symbols_usrp_channel.h
deleted file mode 100644
index a0114cf3c..000000000
--- a/usrp/limbo/inband/symbols_usrp_channel.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_CHANNEL_H
-#define INCLUDED_SYMBOLS_USRP_CHANNEL_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_allocate_channel = pmt_intern("cmd-allocate-channel");
-static pmt_t s_cmd_deallocate_channel = pmt_intern("cmd-deallocate-channel");
-
-// Incoming
-static pmt_t s_response_allocate_channel = pmt_intern("response-allocate-channel");
-static pmt_t s_response_deallocate_channel = pmt_intern("response-deallocate-channel");
-
-// Errors
-static pmt_t s_err_requested_capacity_unavailable = pmt_intern("err-requested-capacity-unavailable");
-static pmt_t s_err_channel_unavailable = pmt_intern("err-channel-unavailable");
-static pmt_t s_err_channel_invalid = pmt_intern("err-channel-invalid");
-static pmt_t s_err_channel_permission_denied = pmt_intern("err-channel-permission-denied");
-
-#endif /* INCLUDED_SYMBOLS_USRP_CHANNEL_H */
diff --git a/usrp/limbo/inband/symbols_usrp_interface_cs.h b/usrp/limbo/inband/symbols_usrp_interface_cs.h
deleted file mode 100644
index 72c8fcc91..000000000
--- a/usrp/limbo/inband/symbols_usrp_interface_cs.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_INTERFACE_CS_H
-#define INCLUDED_SYMBOLS_USRP_INTERFACE_CS_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_usrp_open = pmt_intern("cmd-usrp-open");
-static pmt_t s_cmd_usrp_close = pmt_intern("cmd-usrp-close");
-static pmt_t s_cmd_usrp_ntx_chan = pmt_intern("cmd-usrp-ntx-chan");
-static pmt_t s_cmd_usrp_nrx_chan = pmt_intern("cmd-usrp-nrx-chan");
-static pmt_t s_cmd_usrp_write = pmt_intern("cmd-usrp-write");
-static pmt_t s_cmd_usrp_start_reading = pmt_intern("cmd-usrp-start-reading");
-static pmt_t s_cmd_usrp_stop_reading = pmt_intern("cmd-usrp-stop-reading");
-
-// Incoming
-static pmt_t s_response_usrp_open = pmt_intern("response-usrp-open");
-static pmt_t s_response_usrp_close = pmt_intern("response-usrp-close");
-static pmt_t s_response_usrp_ntx_chan = pmt_intern("response-usrp-ntx-chan");
-static pmt_t s_response_usrp_nrx_chan = pmt_intern("response-usrp-nrx-chan");
-static pmt_t s_response_usrp_write = pmt_intern("response-usrp-write");
-static pmt_t s_response_usrp_read = pmt_intern("response-usrp-read");
-
-#endif /* INCLUDED_SYMBOLS_USRP_INTERFACE_CS_H */
diff --git a/usrp/limbo/inband/symbols_usrp_low_level_cs.h b/usrp/limbo/inband/symbols_usrp_low_level_cs.h
deleted file mode 100644
index a7260603a..000000000
--- a/usrp/limbo/inband/symbols_usrp_low_level_cs.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_LOW_LEVEL_CS_H
-#define INCLUDED_SYMBOLS_USRP_LOW_LEVEL_CS_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_to_control_channel = pmt_intern("cmd-to-control-channel");
-
-// Incoming
-static pmt_t s_response_from_control_channel = pmt_intern("response-from-control-channel");
-
-// Subpackets
-static pmt_t s_op_ping_fixed = pmt_intern("op-ping-fixed");
-static pmt_t s_op_ping_fixed_reply = pmt_intern("op-ping-fixed-reply");
-static pmt_t s_op_write_reg = pmt_intern("op-write-reg");
-static pmt_t s_op_write_reg_masked = pmt_intern("op-write-reg-masked");
-static pmt_t s_op_read_reg = pmt_intern("op-read-reg");
-static pmt_t s_op_read_reg_reply = pmt_intern("op-read-reg-reply");
-static pmt_t s_op_i2c_write = pmt_intern("op-i2c-write");
-static pmt_t s_op_i2c_read = pmt_intern("op-i2c-read");
-static pmt_t s_op_i2c_read_reply = pmt_intern("op-i2c-read-reply");
-static pmt_t s_op_spi_write = pmt_intern("op-spi-write");
-static pmt_t s_op_spi_read = pmt_intern("op-spi-read");
-static pmt_t s_op_spi_read_reply = pmt_intern("op-spi-read-reply");
-static pmt_t s_op_delay = pmt_intern("op-delay");
-
-#endif /* INCLUDED_SYMBOLS_USRP_LOW_LEVEL_CS_H */
diff --git a/usrp/limbo/inband/symbols_usrp_rx.h b/usrp/limbo/inband/symbols_usrp_rx.h
deleted file mode 100644
index 07d58a3f5..000000000
--- a/usrp/limbo/inband/symbols_usrp_rx.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_RX_H
-#define INCLUDED_SYMBOLS_USRP_RX_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_start_recv_raw_samples = pmt_intern("cmd-start-recv-raw-samples");
-static pmt_t s_cmd_stop_recv_raw_samples = pmt_intern("cmd-stop-recv-raw-samples");
-
-// Incoming
-static pmt_t s_response_recv_raw_samples = pmt_intern("response-recv-raw-samples");
-
-// Errors
-static pmt_t s_err_already_receiving = pmt_intern("err-already-receiving");
-
-#endif /* INCLUDED_SYMBOLS_USRP_RX_H */
diff --git a/usrp/limbo/inband/symbols_usrp_rx_cs.h b/usrp/limbo/inband/symbols_usrp_rx_cs.h
deleted file mode 100644
index bf4f0338b..000000000
--- a/usrp/limbo/inband/symbols_usrp_rx_cs.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_RX_CS_H
-#define INCLUDED_SYMBOLS_USRP_RX_CS_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_usrp_rx_start_reading = pmt_intern("cmd-usrp-rx-start-reading");
-
-// Incoming
-static pmt_t s_response_usrp_rx_read = pmt_intern("response-usrp-rx-read");
-
-#endif /* INCLUDED_SYMBOLS_USRP_RX_CS_H */
diff --git a/usrp/limbo/inband/symbols_usrp_server_cs.h b/usrp/limbo/inband/symbols_usrp_server_cs.h
deleted file mode 100644
index e612e24ea..000000000
--- a/usrp/limbo/inband/symbols_usrp_server_cs.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_SERVER_CS_H
-#define INCLUDED_SYMBOLS_USRP_SERVER_CS_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_open = pmt_intern("cmd-open");
-static pmt_t s_cmd_close = pmt_intern("cmd-close");
-static pmt_t s_cmd_max_capacity = pmt_intern("cmd-max-capacity");
-static pmt_t s_cmd_ntx_chan = pmt_intern("cmd-ntx-chan");
-static pmt_t s_cmd_nrx_chan = pmt_intern("cmd-nrx-chan");
-static pmt_t s_cmd_current_capacity_allocation = pmt_intern("cmd-current-capacity-allocation");
-
-// Incoming
-static pmt_t s_response_open = pmt_intern("response-open");
-static pmt_t s_response_close = pmt_intern("response-close");
-static pmt_t s_response_max_capacity = pmt_intern("response-max-capacity");
-static pmt_t s_response_ntx_chan = pmt_intern("response-ntx-chan");
-static pmt_t s_response_nrx_chan = pmt_intern("response-nrx-chan");
-static pmt_t s_response_current_capacity_allocation = pmt_intern("response-current-capacity-allocation");
-
-// Errors
-static pmt_t s_err_usrp_not_opened = pmt_intern("err-usrp-not-opened");
-static pmt_t s_err_usrp_already_opened = pmt_intern("err-usrp-already-opened");
-static pmt_t s_err_usrp_already_closed = pmt_intern("err-usrp-already-closed");
-
-#endif /* INCLUDED_SYMBOLS_USRP_SERVER_CS_H */
diff --git a/usrp/limbo/inband/symbols_usrp_tx.h b/usrp/limbo/inband/symbols_usrp_tx.h
deleted file mode 100644
index 4e58e2cf9..000000000
--- a/usrp/limbo/inband/symbols_usrp_tx.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_TX_H
-#define INCLUDED_SYMBOLS_USRP_TX_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_xmit_raw_frame = pmt_intern("cmd-xmit-raw-frame");
-
-// Incoming
-static pmt_t s_response_xmit_raw_frame = pmt_intern("response-xmit-raw-frame");
-
-#endif /* INCLUDED_SYMBOLS_USRP_TX_H */
diff --git a/usrp/limbo/inband/symbols_usrp_tx_cs.h b/usrp/limbo/inband/symbols_usrp_tx_cs.h
deleted file mode 100644
index d02ef1d26..000000000
--- a/usrp/limbo/inband/symbols_usrp_tx_cs.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_SYMBOLS_USRP_TX_CS_H
-#define INCLUDED_SYMBOLS_USRP_TX_CS_H
-
-#include <pmt.h>
-
-// Outgoing
-static pmt_t s_cmd_usrp_tx_write = pmt_intern("cmd-usrp-tx-write");
-
-// Incoming
-static pmt_t s_response_usrp_tx_write = pmt_intern("response-usrp-tx-write");
-
-#endif /* INCLUDED_SYMBOLS_USRP_TX_CS_H */
diff --git a/usrp/limbo/inband/test_inband.cc b/usrp/limbo/inband/test_inband.cc
deleted file mode 100644
index 77cdca556..000000000
--- a/usrp/limbo/inband/test_inband.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <cppunit/TextTestRunner.h>
-#include <qa_inband.h>
-
-int
-main(int argc, char **argv)
-{
-
- CppUnit::TextTestRunner runner;
-
- runner.addTest(qa_inband::suite ());
-
- bool was_successful = runner.run("", false);
-
- return was_successful ? 0 : 1;
-}
diff --git a/usrp/limbo/inband/usb_packet.py b/usrp/limbo/inband/usb_packet.py
deleted file mode 100644
index 6dfcf8638..000000000
--- a/usrp/limbo/inband/usb_packet.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# Copyright 2007 Free Software Foundation, Inc.
-#
-# 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-import struct
-
-
-FL_OVERRUN = 0x80000000
-FL_UNDERRUN = 0x40000000
-FL_DROPPED = 0x20000000
-FL_END_OF_BURST = 0x10000000
-FL_START_OF_BURST = 0x08000000
-
-FL_ALL_FLAGS = 0xf8000000
-
-FL_OVERRUN_SHIFT = 31
-FL_UNDERRUN_SHIFT = 30
-FL_DROPPED_SHIFT = 29
-FL_END_OF_BURST_SHIFT = 28
-FL_START_OF_BURST_SHIFT = 27
-
-RSSI_MASK = 0x3f
-RSSI_SHIFT = 21
-
-CHAN_MASK = 0x1f
-CHAN_SHIFT = 16
-
-TAG_MASK = 0xf
-TAG_SHIFT = 9
-
-PAYLOAD_LEN_MASK = 0x1ff
-PAYLOAD_LEN_SHIFT = 0
-
-def make_header(flags, chan, payload_len, timestamp, rssi=0, tag=0):
- word0 = ((flags & FL_ALL_FLAGS)
- | ((rssi & RSSI_MASK) << RSSI_SHIFT)
- | ((chan & CHAN_MASK) << CHAN_SHIFT)
- | ((tag & TAG_MASK) << TAG_SHIFT)
- | ((payload_len & PAYLOAD_LEN_MASK) << PAYLOAD_LEN_SHIFT))
- word1 = timestamp
- return struct.pack('<2I', word0, word1)
-
-
-def _decode(pred, indicator):
- if pred:
- return indicator
- else:
- return '-'
-
-
-class usb_packet(object):
- def __init__(self, raw_pkt):
- assert isinstance(raw_pkt, str) and len(raw_pkt) == 512
- self._raw_pkt = raw_pkt;
- (self._word0, self._word1) = struct.unpack('<2I', self._raw_pkt[0:8])
-
- def timestamp(self):
- return self._word1
-
- def rssi(self):
- return (self._word0 >> RSSI_SHIFT) & RSSI_MASK
-
- def chan(self):
- return (self._word0 >> CHAN_SHIFT) & CHAN_MASK
-
- def tag(self):
- return (self._word0 >> TAG_SHIFT) & TAG_MASK
-
- def payload_len(self):
- return (self._word0 >> PAYLOAD_LEN_SHIFT) & PAYLOAD_LEN_MASK
-
- def flags(self):
- return self._word0 & FL_ALL_FLAGS
-
- def overrun(self):
- return (self._word0 >> FL_OVERRUN_SHIFT) & 0x1
-
- def underrun(self):
- return (self._word0 >> FL_UNDERRUN_SHIFT) & 0x1
-
- def start_of_burst(self):
- return (self._word0 >> FL_START_OF_BURST_SHIFT) & 0x1
-
- def end_of_burst(self):
- return (self._word0 >> FL_END_OF_BURST_SHIFT) & 0x1
-
- def dropped(self):
- return (self._word0 >> FL_DROPPED_SHIFT) & 0x1
-
- def payload(self):
- return self._raw_pkt[8:8+self.payload_len()]
-
- def decoded_flags(self):
- s = (_decode(self.overrun(), 'O')
- + _decode(self.underrun(), 'U')
- + _decode(self.dropped(), 'D')
- + _decode(self.end_of_burst(), 'E')
- + _decode(self.start_of_burst(), 'S'))
- return s
diff --git a/usrp/limbo/inband/usrp_inband_usb_packet.cc b/usrp/limbo/inband/usrp_inband_usb_packet.cc
deleted file mode 100644
index 72bc45ccb..000000000
--- a/usrp/limbo/inband/usrp_inband_usb_packet.cc
+++ /dev/null
@@ -1,793 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_inband_usb_packet.h>
-
-#include <usrp_bytesex.h>
-#include <iostream>
-#include <stdio.h>
-#include <string.h>
-
-/*!
- * \brief Aligns the packet payload on a 32 bit boundary. This is essential to
- * all control/status packets so that the inband FPGA code can parse them
- * easily.
- *
- * \returns true if successful or if the packet was already aligned; false if it
- * cannot be aligned.
- */
-bool usrp_inband_usb_packet::align32()
-{
- int p_len = payload_len();
-
- int bytes_needed = 4 - (p_len % 4);
-
- if(bytes_needed == 4)
- return true;
-
- // If the room left in the packet is less than the number of bytes
- // needed, return false to indicate no room to align
- if((MAX_PAYLOAD - p_len) < bytes_needed)
- return false;
-
- incr_header_len(bytes_needed);
-
- return true;
-}
-
-/*!
- * \brief Adds a ping command to the current control packet.
- *
- * The \p rid is the rid to be associated with the ping response and \p ping_val
- * is currently unused.
- *
- * \returns true if adding the ping command was successful, false otherwise
- * (i.e. no space in the current packet).
- */
-bool usrp_inband_usb_packet::cs_ping(long rid, long ping_val)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_PING_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t ping = (
- ((OP_PING_FIXED & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_PING_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | (ping_val & CS_PINGVAL_MASK)
-
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(ping);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_PING_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a ping response to the packet. This is used by the fake USRP
- * code to generate fake responses for pings.
- *
- * The \p rid is the RID to be associated with the response and \p ping_val is
- * currently unused.
- *
- * \returns true if the ping reply was added successfully, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_ping_reply(long rid, long ping_val)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_PING_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t ping = (
- ((OP_PING_FIXED_REPLY & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_PING_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | ((ping_val & CS_PINGVAL_MASK) << CS_PINGVAL_SHIFT)
-
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(ping);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_PING_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a write register command to the packet.
- *
- * The \p reg_num is the register number for which the value \p val will be
- * written to.
- *
- * \returns true if the command was added to the packet successfully, false
- * otherwise.
- */
-bool usrp_inband_usb_packet::cs_write_reg(long reg_num, long val)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_WRITEREG_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = 0;
-
- // Build the first word which includes the register number
- word0 = (
- ((OP_WRITE_REG & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_WRITEREG_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((reg_num & CS_REGNUM_MASK) << CS_REGNUM_SHIFT)
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // The second word is solely the register value to be written
- // FIXME: should this be unsigned?
- payload += 1;
- *payload = host_to_usrp_u32((uint32_t) val);
-
- // Rebuild the header to update the payload length
- incr_header_len(CS_FIXED_LEN + CS_WRITEREG_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a write register masked command to the packet.
- *
- * The \p reg_num is the register number for which the value \p val will be
- * written, masked by \p mask
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_write_reg_masked(long reg_num, long val, long mask)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_WRITEREGMASKED_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = 0;
-
- // Build the first word which includes the register number
- word0 = (
- ((OP_WRITE_REG_MASKED & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_WRITEREGMASKED_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((reg_num & CS_REGNUM_MASK) << CS_REGNUM_SHIFT)
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // Skip over the first word and write the register value
- payload += 1;
- *payload = host_to_usrp_u32((uint32_t) val);
-
- // Skip over the register value and write the mask
- payload += 1;
- *payload = host_to_usrp_u32((uint32_t) mask);
-
- // Rebuild the header to update the payload length
- incr_header_len(CS_FIXED_LEN + CS_WRITEREGMASKED_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a read register message to the packet.
- *
- * The \p rid will be the associated RID returned with the response, and \p
- * reg_num is the register to be read.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_read_reg(long rid, long reg_num)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_READREG_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t read_reg = (
- ((OP_READ_REG & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_READREG_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | ((reg_num & CS_REGNUM_MASK) << CS_REGNUM_SHIFT)
-
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(read_reg);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_READREG_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a read register reply response to the current packet. This is
- * used by the fake USRP code to generate fake register read responses for
- * testing.
- *
- * The \p rid is the associated RID to be included in the response, \p reg_num
- * is the register the read is coming from, and \p reg_val is the value of the
- * read.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_read_reg_reply(long rid, long reg_num, long reg_val)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_READREGREPLY_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = (
- ((OP_READ_REG_REPLY & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_READREGREPLY_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | ((reg_num & CS_REGNUM_MASK) << CS_REGNUM_SHIFT)
-
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // Hop to the next word and write the reg value
- payload += 1;
- *payload = host_to_usrp_u32((uint32_t) reg_val);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_READREGREPLY_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds a delay command to the current packet.
- *
- * The \p ticks parameter is the number of clock ticks the FPGA should delay
- * parsing for, which is added to the packet.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_delay(long ticks)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_DELAY_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t delay = (
- ((OP_DELAY & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_DELAY_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((ticks & CS_DELAY_MASK) << CS_DELAY_SHIFT)
-
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(delay);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_DELAY_LEN);
-
- return true;
-}
-
-/*!
- * \brief
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_i2c_write(long i2c_addr, uint8_t *i2c_data, size_t data_len)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- int i2c_len = data_len + 2; // 2 bytes between mbz and addr
-
- if((MAX_PAYLOAD - p_len) < (i2c_len + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = 0;
-
- word0 = (
- ((OP_I2C_WRITE & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((i2c_len & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((i2c_addr & CS_I2CADDR_MASK) << CS_I2CADDR_SHIFT)
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // Jump over the first word and write the data
- // FIXME: Should the data be changed to usrp byte order?
- payload += 1;
- memcpy(payload, i2c_data, data_len);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + i2c_len);
-
- return true;
-}
-
-/*!
- * \brief Adds an I2C read command to the current packet.
- *
- * The \p rid is the associated RID to return with the read response, \p
- * i2c_addr is the address to read from on the I2C bus, and \p n_bytes is the
- * number of bytes to be read from the bus.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_i2c_read(long rid, long i2c_addr, long n_bytes)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_I2CREAD_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = 0;
-
- word0 = (
- ((OP_I2C_READ & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_I2CREAD_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | ((i2c_addr & CS_I2CADDR_MASK) << CS_I2CADDR_SHIFT)
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // Jump a word and write the number of bytes to read
- payload += 1;
- uint32_t word1 =
- (n_bytes & CS_I2CREADBYTES_MASK) << CS_I2CREADBYTES_SHIFT;
- *payload = host_to_usrp_u32(word1);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_I2CREAD_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds an I2C read reply response to the current packet. This is used
- * by the fake USRP code to generate fake I2C responses.
- *
- * The \p rid is the RID to be associated with the response, \p i2c_addr is the
- * address on the I2C bus that the \p i2c_data of \p i2c_data_len was read from.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_i2c_read_reply(long rid, long i2c_addr, uint8_t *i2c_data, long i2c_data_len)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- int i2c_len = i2c_data_len + 2;
-
- if((MAX_PAYLOAD - p_len) < (i2c_len + CS_FIXED_LEN))
- return false;
-
- uint32_t word0 = 0;
-
- word0 = (
- ((OP_I2C_READ_REPLY & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((i2c_len & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- | ((i2c_addr & CS_I2CADDR_MASK) << CS_I2CADDR_SHIFT)
- );
-
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word0);
-
- // Jump a word and write the actual data
- payload += 1;
- memcpy(payload, i2c_data, i2c_data_len);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + i2c_len);
-
- return true;
-}
-
-/*!
- * \brief Adds a SPI write command to the current packet.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_spi_write(long enables, long format, long opt_header_bytes, uint8_t *spi_data, long spi_data_len)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- int spi_len = spi_data_len + 6;
-
- if((MAX_PAYLOAD - p_len) < (spi_len + CS_FIXED_LEN))
- return false;
-
- uint32_t word = 0;
-
- // First word contains the opcode and length, then mbz
- word = (
- ((OP_SPI_WRITE & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((spi_len & CS_LEN_MASK) << CS_LEN_SHIFT)
- );
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- payload += 1;
-
- // Second word contains the enables, format, and optional tx bytes
- word = 0;
- word = (
- ((enables & CS_SPIENABLES_MASK) << CS_SPIENABLES_SHIFT)
- | ((format & CS_SPIFORMAT_MASK) << CS_SPIFORMAT_SHIFT)
- | ((opt_header_bytes & CS_SPIOPT_MASK) << CS_SPIOPT_SHIFT)
- );
- payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- payload += 1;
- memcpy(payload, spi_data, spi_data_len);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + spi_len);
-
- return true;
-}
-
-/*!
- * \brief Adds a SPI bus read command to the packet.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_spi_read(long rid, long enables, long format, long opt_header_bytes, long n_bytes)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- if((MAX_PAYLOAD - p_len) < (CS_SPIREAD_LEN + CS_FIXED_LEN))
- return false;
-
- uint32_t word = 0;
-
- // First word contains the opcode, length, and RID
- word = (
- ((OP_SPI_READ & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((CS_SPIREAD_LEN & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- );
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- payload += 1;
-
- // Second word contains the enables, format, and optional tx bytes
- word = 0;
- word = (
- ((enables & CS_SPIENABLES_MASK) << CS_SPIENABLES_SHIFT)
- | ((format & CS_SPIFORMAT_MASK) << CS_SPIFORMAT_SHIFT)
- | ((opt_header_bytes & CS_SPIOPT_MASK) << CS_SPIOPT_SHIFT)
- );
- payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- payload += 1;
-
- // The third word contains the number of bytes
- word = 0;
- word = (
- ((n_bytes & CS_SPINBYTES_MASK) << CS_SPINBYTES_SHIFT)
- );
- payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + CS_SPIREAD_LEN);
-
- return true;
-}
-
-/*!
- * \brief Adds an SPI read reply to the current packet. This is used by the
- * fake USRP code to generate fake responses for SPI reads.
- *
- * \returns true if the command was added to the packet, false otherwise.
- */
-bool usrp_inband_usb_packet::cs_spi_read_reply(long rid, uint8_t *spi_data, long spi_data_len)
-{
- if(!align32())
- return false;
-
- int p_len = payload_len();
-
- int spi_len = spi_data_len + 2;
-
- if((MAX_PAYLOAD - p_len) < (spi_len + CS_FIXED_LEN))
- return false;
-
- uint32_t word = 0;
-
- // First word contains the opcode, length, and RID
- word = (
- ((OP_SPI_READ_REPLY & CS_OPCODE_MASK) << CS_OPCODE_SHIFT)
- | ((spi_len & CS_LEN_MASK) << CS_LEN_SHIFT)
- | ((rid & CS_RID_MASK) << CS_RID_SHIFT)
- );
- uint32_t *payload = (uint32_t *) (d_payload + p_len);
- *payload = host_to_usrp_u32(word);
-
- // Jump a word and write the actual data
- payload += 1;
- memcpy(payload, spi_data, spi_data_len);
-
- // Update payload length
- incr_header_len(CS_FIXED_LEN + spi_len);
-
- return true;
-}
-
-/*!
- * \brief Since all control packets contain subpackets which have the length of
- * the subpacket at a uniform location in the subpacket, this will return the
- * subpacket length given a byte offset of the start of the subpacket from the beginning of the packet.
- *
- * \returns the length of the subpacket
- */
-int usrp_inband_usb_packet::cs_len(int payload_offset) {
- uint32_t subpkt = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset)));
- return (subpkt >> CS_LEN_SHIFT) & CS_LEN_MASK;
-}
-
-/*!
- * \brief The following method takes an offset within the packet payload to
- * extract a control/status subpacket and constructs a pmt response which
- * includes the proper signal and arguments specified by usrp-low-level-cs. The
- * USRP server could therefore use this to read subpackets and pass them
- * responses back up to the application. It's arguable that only reply packets
- * should be parsed here, however we parse others for use in debugging or
- * failure reporting on the transmit side of packets.
- */
-pmt_t usrp_inband_usb_packet::read_subpacket(int payload_offset) {
-
- uint32_t subpkt = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset)));
- uint32_t opcode = (subpkt >> CS_OPCODE_SHIFT) & CS_OPCODE_MASK;
- uint32_t len = (subpkt >> CS_LEN_SHIFT) & CS_LEN_MASK;
-
- switch(opcode) {
-
- case OP_PING_FIXED_REPLY:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t pingval = pmt_from_long((subpkt >> CS_PINGVAL_SHIFT) & CS_PINGVAL_MASK);
- return pmt_list3(s_op_ping_fixed_reply, rid, pingval);
- }
-
- case OP_READ_REG_REPLY:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t reg_num = pmt_from_long((subpkt >> CS_REGNUM_SHIFT) & CS_REGNUM_MASK);
-
- // To get the register value we just read the next 32 bits
- uint32_t val = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- pmt_t reg_val = pmt_from_long(val);
-
- return pmt_list4(s_op_read_reg_reply, rid, reg_num, reg_val);
- }
-
- case OP_I2C_READ_REPLY:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t i2c_addr = pmt_from_long((subpkt >> CS_I2CADDR_SHIFT) & CS_I2CADDR_MASK);
-
- // Make a u8 vector to dump the data from the packet into
- size_t i2c_data_len;
- pmt_t i2c_data = pmt_make_u8vector(len - 2, 0); // skip rid+mbz+addr = 2 bytes
- uint8_t *w_data =
- (uint8_t *) pmt_u8vector_writable_elements(i2c_data, i2c_data_len);
-
- memcpy(w_data, d_payload + payload_offset + 4, i2c_data_len); // skip first word
-
- return pmt_list4(s_op_i2c_read_reply, rid, i2c_addr, i2c_data);
- }
-
- case OP_SPI_READ_REPLY:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
-
- // Make a u8 vector to dump the data from the packet into
- size_t spi_data_len;
- pmt_t spi_data = pmt_make_u8vector(len - 2, 0); // skip rid+mbz+addr = 2 bytes
- uint8_t *w_data =
- (uint8_t *) pmt_u8vector_writable_elements(spi_data, spi_data_len);
-
- memcpy(w_data, d_payload + payload_offset + 4, spi_data_len); // skip first word
-
- return pmt_list3(s_op_spi_read_reply, rid, spi_data);
- }
-
- case OP_PING_FIXED:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t pingval = pmt_from_long((subpkt >> CS_PINGVAL_SHIFT) & CS_PINGVAL_MASK);
- return pmt_list3(s_op_ping_fixed, rid, pingval);
- }
-
- case OP_WRITE_REG:
- {
- pmt_t reg_num = pmt_from_long((subpkt >> CS_REGNUM_SHIFT) & CS_REGNUM_MASK);
-
- // To get the register value we just read the next 32 bits
- uint32_t val = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- pmt_t reg_val = pmt_from_long(val);
-
- return pmt_list3(s_op_write_reg, reg_num, reg_val);
- }
-
- case OP_WRITE_REG_MASKED:
- {
- pmt_t reg_num = pmt_from_long((subpkt >> CS_REGNUM_SHIFT) & CS_REGNUM_MASK);
-
- // To get the register value we just read the next 32 bits
- uint32_t val = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- pmt_t reg_val = pmt_from_long(val);
-
- // The mask is the next 32 bits
- uint32_t mask = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 8)));
- pmt_t reg_mask = pmt_from_long(mask);
-
- return pmt_list4(s_op_write_reg_masked, reg_num, reg_val, reg_mask);
- }
-
- case OP_READ_REG:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t reg_num = pmt_from_long((subpkt >> CS_REGNUM_SHIFT) & CS_REGNUM_MASK);
-
- return pmt_list3(s_op_read_reg, rid, reg_num);
- }
-
- case OP_I2C_WRITE:
- {
- pmt_t i2c_addr = pmt_from_long((subpkt >> CS_I2CADDR_SHIFT) & CS_I2CADDR_MASK);
-
- // The length includes an extra 2 bytes for storing the mbz and addr
- pmt_t i2c_data = pmt_make_u8vector(len-2, 0);
-
- // Get a writable address to copy the data from the packet
- size_t ignore;
- uint8_t *w_data = (uint8_t *) pmt_u8vector_writable_elements(i2c_data, ignore);
- memcpy(w_data, d_payload + payload_offset + 4, len-2);
-
-
- return pmt_list3(s_op_i2c_write, i2c_addr, i2c_data);
- }
-
- case OP_I2C_READ:
- {
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
- pmt_t i2c_addr = pmt_from_long((subpkt >> CS_I2CADDR_SHIFT) & CS_I2CADDR_MASK);
-
- // The number of bytes is in the next word
- uint32_t bytes = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- bytes = (bytes >> CS_I2CREADBYTES_SHIFT) & CS_I2CREADBYTES_MASK;
- pmt_t i2c_bytes = pmt_from_long(bytes);
-
- return pmt_list4(s_op_i2c_read, rid, i2c_addr, i2c_bytes);
- }
-
- case OP_SPI_WRITE:
- {
- // Nothing interesting in the first word, skip to the next
- uint32_t word = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- pmt_t enables = pmt_from_long((word >> CS_SPIENABLES_SHIFT) & CS_SPIENABLES_MASK);
- pmt_t format = pmt_from_long((word >> CS_SPIFORMAT_SHIFT) & CS_SPIFORMAT_MASK);
- pmt_t opt = pmt_from_long((word >> CS_SPIOPT_SHIFT) & CS_SPIOPT_MASK);
-
- // From the next word and on is data
- size_t spi_data_len;
- pmt_t spi_data = pmt_make_u8vector(len - 6, 0); // skip rid+mbz+addr = 2 bytes
- uint8_t *w_data =
- (uint8_t *) pmt_u8vector_writable_elements(spi_data, spi_data_len);
-
- memcpy(w_data, d_payload + payload_offset + 8, spi_data_len); // skip first 2 words
-
- return pmt_list5(s_op_spi_write, enables, format, opt, spi_data);
- }
-
- case OP_SPI_READ:
- {
- // Read the RID from the first word, the rest is mbz
- pmt_t rid = pmt_from_long((subpkt >> CS_RID_SHIFT) & CS_RID_MASK);
-
- // Continue at the next word...
- uint32_t word = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 4)));
- pmt_t enables = pmt_from_long((word >> CS_SPIENABLES_SHIFT) & CS_SPIENABLES_MASK);
- pmt_t format = pmt_from_long((word >> CS_SPIFORMAT_SHIFT) & CS_SPIFORMAT_MASK);
- pmt_t opt = pmt_from_long((word >> CS_SPIOPT_SHIFT) & CS_SPIOPT_MASK);
-
- // The number of bytes is the only thing to read in the next word
- word = usrp_to_host_u32(*((uint32_t *)(d_payload + payload_offset + 8)));
- pmt_t n_bytes = pmt_from_long((word >> CS_SPINBYTES_SHIFT) & CS_SPINBYTES_MASK);
-
- return pmt_list6(s_op_spi_read, rid, enables, format, opt, n_bytes);
- }
-
- case OP_DELAY:
- {
- pmt_t ticks = pmt_from_long((subpkt >> CS_DELAY_SHIFT) & CS_DELAY_MASK);
-
- return pmt_list2(s_op_delay, ticks);
- }
-
- default:
- return PMT_NIL;
-
- }
-}
-
diff --git a/usrp/limbo/inband/usrp_inband_usb_packet.h b/usrp/limbo/inband/usrp_inband_usb_packet.h
deleted file mode 100644
index 6f1a3feb3..000000000
--- a/usrp/limbo/inband/usrp_inband_usb_packet.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_USRP_INBAND_USB_PACKET_H_
-#define INCLUDED_USRP_INBAND_USB_PACKET_H_
-
-#include <usrp_bytesex.h>
-#include <mblock/mblock.h>
-#include <pmt.h>
-#include <iostream>
-
-#include <symbols_usrp_low_level_cs.h>
-
-static const int USB_PKT_SIZE = 512; // bytes
-static const int MAX_PAYLOAD = USB_PKT_SIZE-2*sizeof(uint32_t);
-static const int CONTROL_CHAN = 0x1f;
-
-class usrp_inband_usb_packet {
- //
- // keep raw packet in USRP-endian order
- //
- uint32_t d_word0;
- uint32_t d_timestamp;
- unsigned char d_payload[MAX_PAYLOAD];
-
-public:
-
- enum opcodes {
- OP_PING_FIXED = 0x00,
- OP_PING_FIXED_REPLY = 0x01,
- OP_WRITE_REG = 0x02,
- OP_WRITE_REG_MASKED = 0x03,
- OP_READ_REG = 0x04,
- OP_READ_REG_REPLY = 0x05,
- OP_I2C_WRITE = 0x06,
- OP_I2C_READ = 0x07,
- OP_I2C_READ_REPLY = 0x08,
- OP_SPI_WRITE = 0x09,
- OP_SPI_READ = 0x0a,
- OP_SPI_READ_REPLY = 0x0b,
- OP_DELAY = 0x0c
- };
-
- enum flags {
- FL_OVERRUN = 0x80000000,
- FL_UNDERRUN = 0x40000000,
- FL_DROPPED = 0x20000000,
- FL_START_OF_BURST = 0x10000000,
- FL_END_OF_BURST = 0x08000000,
- FL_CARRIER_SENSE = 0x04000000,
-
- FL_ALL_FLAGS = 0xfc000000
- };
-
- static const int FL_OVERRUN_SHIFT = 31;
- static const int FL_UNDERRUN_SHIFT = 30;
- static const int FL_DROPPED_SHIFT = 29;
- static const int FL_END_OF_BURST_SHIFT = 27;
- static const int FL_START_OF_BURST_SHIFT = 28;
-
- static const int RSSI_MASK = 0x3f;
- static const int RSSI_SHIFT = 21;
-
- static const int CHAN_MASK = 0x1f;
- static const int CHAN_SHIFT = 16;
-
- static const int TAG_MASK = 0xf;
- static const int TAG_SHIFT = 9;
-
- static const int PAYLOAD_LEN_MASK = 0x1ff;
- static const int PAYLOAD_LEN_SHIFT = 0;
-
- // Fixed size for opcode and length fields
- static const int CS_FIXED_LEN = 2;
-
- static const int CS_OPCODE_MASK = 0xff;
- static const int CS_OPCODE_SHIFT = 24;
-
- static const int CS_LEN_MASK = 0xff;
- static const int CS_LEN_SHIFT = 16;
-
- static const int CS_RID_MASK = 0x3f;
- static const int CS_RID_SHIFT = 10;
-
- static const int CS_PING_LEN = 2;
- static const int CS_PINGVAL_MASK = 0x3ff;
- static const int CS_PINGVAL_SHIFT = 0;
-
- static const int CS_WRITEREG_LEN = 6;
- static const int CS_WRITEREGMASKED_LEN = 10;
- static const int CS_READREG_LEN = 2;
- static const int CS_READREGREPLY_LEN = 6;
- static const int CS_REGNUM_MASK = 0x3ff;
- static const int CS_REGNUM_SHIFT = 0;
-
- static const int CS_DELAY_LEN = 2;
- static const int CS_DELAY_MASK = 0xffff;
- static const int CS_DELAY_SHIFT = 0;
-
- static const int CS_I2CADDR_MASK = 0x7f;
- static const int CS_I2CADDR_SHIFT = 0;
-
- static const int CS_I2CREAD_LEN = 3;
- static const int CS_I2CREADBYTES_MASK = 0x7f;
- static const int CS_I2CREADBYTES_SHIFT = 24;
-
- static const int CS_SPIOPT_MASK = 0xffff;
- static const int CS_SPIOPT_SHIFT = 0;
- static const int CS_SPIFORMAT_MASK = 0xff;
- static const int CS_SPIFORMAT_SHIFT = 16;
- static const int CS_SPIENABLES_MASK = 0xff;
- static const int CS_SPIENABLES_SHIFT = 24;
- static const int CS_SPIREAD_LEN = 7;
- static const int CS_SPINBYTES_MASK = 0xff;
- static const int CS_SPINBYTES_SHIFT = 24;
-
-public:
-
- void set_timestamp(uint32_t timestamp){
- d_timestamp = host_to_usrp_u32(timestamp);
- }
-
- void set_end_of_burst() {
- uint32_t word0 = usrp_to_host_u32(d_word0);
- word0 |= 1<<FL_END_OF_BURST_SHIFT;
- d_word0 = host_to_usrp_u32(word0);
- }
-
- void set_header(int flags, int chan, int tag, int payload_len){
- uint32_t word0 = ((flags & FL_ALL_FLAGS)
- | ((chan & CHAN_MASK) << CHAN_SHIFT)
- | ((tag & TAG_MASK) << TAG_SHIFT)
- | ((payload_len & PAYLOAD_LEN_MASK) << PAYLOAD_LEN_SHIFT));
- d_word0 = host_to_usrp_u32(word0);
- }
-
- void incr_header_len(int val) {
- set_header(flags(), chan(), tag(), payload_len() + val);
- }
-
- uint32_t timestamp() const {
- return usrp_to_host_u32(d_timestamp);
- }
-
- int rssi() const {
- uint32_t word0 = usrp_to_host_u32(d_word0);
- return (word0 >> RSSI_SHIFT) & RSSI_MASK;
- }
-
- int chan() const {
- uint32_t word0 = usrp_to_host_u32(d_word0);
- return (word0 >> CHAN_SHIFT) & CHAN_MASK;
- }
-
- int tag() const {
- uint32_t word0 = usrp_to_host_u32(d_word0);
- return (word0 >> TAG_SHIFT) & TAG_MASK;
- }
-
- int payload_len() const {
- uint32_t word0 = usrp_to_host_u32(d_word0);
- return (word0 >> PAYLOAD_LEN_SHIFT) & PAYLOAD_LEN_MASK;
- }
-
- int flags() const {
- return usrp_to_host_u32(d_word0) & FL_ALL_FLAGS;
- }
-
- int overrun() const {
- return (usrp_to_host_u32(d_word0) & FL_OVERRUN) >> FL_OVERRUN_SHIFT;
- }
-
-
- int underrun() const {
- return (usrp_to_host_u32(d_word0) & FL_UNDERRUN) >> FL_UNDERRUN_SHIFT;
- }
-
-
- int start_of_burst() const {
- return (usrp_to_host_u32(d_word0) & FL_START_OF_BURST) >> FL_START_OF_BURST_SHIFT;
- }
-
- int end_of_burst() const {
- return (usrp_to_host_u32(d_word0) & FL_END_OF_BURST) >> FL_END_OF_BURST_SHIFT;
- }
-
- int dropped() const {
- return (usrp_to_host_u32(d_word0) & FL_DROPPED) >> FL_DROPPED_SHIFT;
- }
-
- unsigned char *payload() {
- return d_payload;
- }
-
- static int max_payload() {
- return MAX_PAYLOAD;
- }
-
- static int max_pkt_size() {
- return USB_PKT_SIZE;
- }
-
- // C/S methods
- bool align32();
- bool cs_ping(long rid, long ping_val);
- bool cs_ping_reply(long rid, long ping_val);
- bool cs_write_reg(long reg_num, long val);
- bool cs_write_reg_masked(long reg_num, long val, long mask);
- bool cs_read_reg(long rid, long reg_num);
- bool cs_read_reg_reply(long rid, long reg_num, long reg_val);
- bool cs_delay(long ticks);
- bool cs_i2c_write(long i2c_addr, uint8_t *i2c_data, size_t data_len);
- bool cs_i2c_read(long rid, long i2c_addr, long n_bytes);
- bool cs_i2c_read_reply(long rid, long i2c_addr, uint8_t *i2c_data, long i2c_data_len);
- bool cs_spi_write(long enables, long format, long opt_header_bytes, uint8_t *spi_data, long spi_data_len);
- bool cs_spi_read(long rid, long enables, long format, long opt_header_bytes, long n_bytes);
- bool cs_spi_read_reply(long rid, uint8_t *spi_data, long spi_data_len);
- int cs_len(int payload_offset);
- pmt_t read_subpacket(int payload_offset);
-};
-
-#endif
diff --git a/usrp/limbo/inband/usrp_interface.mbh b/usrp/limbo/inband/usrp_interface.mbh
deleted file mode 100644
index ad0f78b4e..000000000
--- a/usrp/limbo/inband/usrp_interface.mbh
+++ /dev/null
@@ -1,88 +0,0 @@
-;; -*- scheme -*- ; not really, but tells emacs how to format this
-;;
-;; Copyright 2007 Free Software Foundation, Inc.
-;;
-;; 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 2, 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 this program; if not, write to the Free Software Foundation, Inc.,
-;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;
-
-;; ----------------------------------------------------------------
-;; This is an mblock header file
-;;
-;; The format is very much a work-in-progress.
-;; It'll be compiled to C++.
-;; ----------------------------------------------------------------
-
-;; ----------------------------------------------------------------
-;; usrp-interface-cs
-;;
-;; Handles interaction between the usrp_sever and the USB interface
-
-(define-protocol-class usrp-interface-cs
-
- (:outgoing
- (cmd-usrp-open invocation-handle which-usrp)
- (cmd-usrp-close invocation-handle)
- (cmd-usrp-ntx-chan invocation-handle)
- (cmd-usrp-nrx-chan invocation-handle)
- (cmd-usrp-write invocation-handle channel data)
- (cmd-usrp-start-reading invocation-handle channel)
- )
-
- (:incoming
- (response-usrp-open invocation-handle status)
- (response-usrp-close invocation-handle status)
- (response-usrp-ntx-chan invocation-handle ntx-chan)
- (response-usrp-nrx-chan invocation-handle nrx-chan)
- (response-usrp-write invocation-handle status channel)
- (response-usrp-read invocation-handle status data)
- )
- )
-
-;; ----------------------------------------------------------------
-;; usrp-tx-cs
-;;
-;; Handles interaction between the USB interface and TX interface
-
-(define-protocol-class usrp-tx-cs
-
- (:outgoing
- (cmd-usrp-tx-write invocation-handle channel data tx-handle)
- )
-
- (:incoming
- (response-usrp-tx-write invocation-handle status channel)
- )
- )
-
-;; ----------------------------------------------------------------
-;; usrp-rx-cs
-;;
-;; Handles interaction between the USB interface and RX interface
-
-(define-protocol-class usrp-rx-cs
-
- (:outgoing
- (cmd-usrp-rx-start-reading invocation-handle rx-handle)
- (cmd-usrp-rx-stop-reading invocation-handle)
- )
-
- (:incoming
- (response-usrp-rx-read invocation-handle status data)
-
- ;; There is currently no response to a stop reading
- )
- )
diff --git a/usrp/limbo/inband/usrp_rx.cc b/usrp/limbo/inband/usrp_rx.cc
deleted file mode 100644
index fe9486cf6..000000000
--- a/usrp/limbo/inband/usrp_rx.cc
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_rx.h>
-
-#include <usrp_standard.h>
-#include <iostream>
-#include <vector>
-#include <usb.h>
-#include <mblock/class_registry.h>
-#include <usrp_inband_usb_packet.h>
-#include <fpga_regs_common.h>
-#include <stdio.h>
-
-#include <symbols_usrp_rx_cs.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-static const bool verbose = false;
-
-bool usrp_rx_stop;
-
-usrp_rx::usrp_rx(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_disk_write(false),
- d_disk_write_pkt(false) // if true, writes full packet, else just the payload
-{
- d_cs = define_port("cs", "usrp-rx-cs", true, mb_port::EXTERNAL);
-
- if(d_disk_write) {
- d_ofile0.open("rx_data_chan0.dat",std::ios::binary|std::ios::out);
- d_ofile1.open("rx_data_chan1.dat",std::ios::binary|std::ios::out);
- d_cs_ofile.open("rx_cs.dat",std::ios::binary|std::ios::out);
- }
-
- usrp_rx_stop = false;
-
-}
-
-usrp_rx::~usrp_rx()
-{
- if(d_disk_write) {
- d_ofile0.close();
- d_ofile1.close();
- d_cs_ofile.close();
- }
-}
-
-void
-usrp_rx::initial_transition()
-{
-
-}
-
-/*!
- * \brief Handles incoming signals to to the m-block, wihch should only ever be
- * a single message: cmd-usrrp-rx-start-reading. There is no signal to stop
- * reading as the m-block goes in to a forever loop to read inband packets from
- * the bus.
- */
-void
-usrp_rx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t port_id = msg->port_id();
- pmt_t data = msg->data();
-
- // Theoretically only have 1 message to ever expect, but
- // want to make sure its at least what we want
- if(pmt_eq(port_id, d_cs->port_symbol())) {
-
- if(pmt_eqv(event, s_cmd_usrp_rx_start_reading))
- read_and_respond(data);
- }
-}
-
-/*!
- * \brief Performs the actual reading of data from the USB bus, called by
- * handle_message() when a cmd-usrp-rx-start-reading signal is received.
- *
- * The method enters a forever loop where it continues to read data from the bus
- * and generate read responses to the higher layer. Currently, shared memory is
- * used to exit this loop.
- *
- * The \p data parameter is a PMT list which contains only a single element, an
- * invocation handle which will be returned with all read respones.
- */
-void
-usrp_rx::read_and_respond(pmt_t data)
-{
- size_t ignore;
- bool underrun;
- unsigned int n_read;
- unsigned int pkt_size = sizeof(transport_pkt);
-
- pmt_t invocation_handle = pmt_nth(0, data);
-
- // Need the handle to the RX port to send responses, this is passed
- // by the USRP interface m-block
- pmt_t handle = pmt_nth(1, data);
- d_urx =
- boost::any_cast<usrp_standard_rx_sptr>(pmt_any_ref(handle));
-
- if(verbose)
- std::cout << "[usrp_rx] Waiting for packets..\n";
-
- // Read by 512 which is packet size and send them back up
- while(!usrp_rx_stop) {
-
- pmt_t v_pkt = pmt_make_u8vector(pkt_size, 0);
- transport_pkt *pkt =
- (transport_pkt *) pmt_u8vector_writable_elements(v_pkt, ignore);
-
- n_read = d_urx->read(pkt, pkt_size, &underrun);
-
- if(n_read != pkt_size) {
- std::cerr << "[usrp_rx] Error reading packet, shutting down\n";
- d_cs->send(s_response_usrp_rx_read,
- pmt_list3(PMT_NIL, PMT_F, PMT_NIL));
- return;
- }
-
- if(underrun && verbose && 0)
- std::cout << "[usrp_rx] Underrun\n";
-
- d_cs->send(s_response_usrp_rx_read,
- pmt_list3(PMT_NIL, PMT_T, v_pkt));
- if(verbose && 0)
- std::cout << "[usrp_rx] Read 1 packet\n";
-
- if(d_disk_write) {
- if(pkt->chan() == CONTROL_CHAN)
- d_cs_ofile.write((const char *)pkt, transport_pkt::max_pkt_size());
- else {
- if(d_disk_write_pkt) {
- if(pkt->chan() == 0)
- d_ofile0.write((const char *)pkt, transport_pkt::max_pkt_size());
- else if(pkt->chan() == 1)
- d_ofile1.write((const char *)pkt, transport_pkt::max_pkt_size());
- } else {
- if(pkt->chan() == 0)
- d_ofile0.write((const char *)pkt->payload(), transport_pkt::max_payload());
- else if(pkt->chan() == 1)
- d_ofile1.write((const char *)pkt->payload(), transport_pkt::max_payload());
- }
- }
-
- d_cs_ofile.flush();
- d_ofile0.flush();
- d_ofile1.flush();
- }
- }
-
- usrp_rx_stop = false;
-
- if(verbose) {
- std::cout << "[USRP_RX] Stopping...\n";
- fflush(stdout);
- }
-}
-
-REGISTER_MBLOCK_CLASS(usrp_rx);
diff --git a/usrp/limbo/inband/usrp_rx.h b/usrp/limbo/inband/usrp_rx.h
deleted file mode 100644
index 1006235bf..000000000
--- a/usrp/limbo/inband/usrp_rx.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_RX_H
-#define INCLUDED_USRP_RX_H
-
-#include <mblock/mblock.h>
-#include <fstream>
-#include "usrp_standard.h"
-
-extern bool usrp_rx_stop; // used to communicate a 'stop' to the RX stub
-
-/*!
- * \brief Implements the low level usb interface to the USRP
- */
-class usrp_rx : public mb_mblock
-{
- mb_port_sptr d_cs;
- usrp_standard_rx_sptr d_urx;
-
- bool d_disk_write;
- bool d_disk_write_pkt;
- std::ofstream d_ofile0;
- std::ofstream d_ofile1;
- std::ofstream d_cs_ofile;
-
- public:
- usrp_rx(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_rx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- private:
- void read_and_respond(pmt_t data);
- void read_data();
-
-};
-
-
-#endif /* INCLUDED_USRP_RX_H */
-
diff --git a/usrp/limbo/inband/usrp_rx_stub.cc b/usrp/limbo/inband/usrp_rx_stub.cc
deleted file mode 100644
index e5c454d24..000000000
--- a/usrp/limbo/inband/usrp_rx_stub.cc
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_rx_stub.h>
-
-#include <iostream>
-#include <vector>
-#include <usb.h>
-#include <mblock/class_registry.h>
-#include <usrp_inband_usb_packet.h>
-#include <fpga_regs_common.h>
-#include "usrp_standard.h"
-#include <stdio.h>
-#include <string.h>
-#include <ui_nco.h>
-#include <fstream>
-
-#include <symbols_usrp_rx_cs.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-static const bool verbose = false;
-
-bool usrp_rx_stop_stub;
-
-// Used for the fake control packet response code to send the responses back up
-// the RX. The TX stub dumps responses in to this queue.
-std::queue<pmt_t> d_cs_queue;
-
-usrp_rx_stub::usrp_rx_stub(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_samples_per_frame((long)(126)),
- d_decim_rx(128),
- d_amplitude(16384),
- d_disk_write(false)
-{
-
- // Information about the rates are passed all the way from the app in the form
- // of a dictionary. We use this to read the RX decimation rate and compute
- // the approximate number of MS/s as a form of flow control for the stub.
- pmt_t usrp_dict = user_arg;
-
- if (pmt_is_dict(usrp_dict)) {
- // Read the RX decimation rate
- if(pmt_t decim_rx = pmt_dict_ref(usrp_dict,
- pmt_intern("decim-rx"),
- PMT_NIL)) {
- if(!pmt_eqv(decim_rx, PMT_NIL))
- d_decim_rx = pmt_to_long(decim_rx);
- }
- }
-
- d_cs = define_port("cs", "usrp-rx-cs", true, mb_port::EXTERNAL);
-
- // initialize NCO
- double freq = 100e3;
- int interp = 32; // 32 -> 4MS/s
- double sample_rate = 64e6 / interp;
- d_nco.set_freq(2*M_PI * freq/sample_rate);
-
- //d_disk_write = true;
-
- if(d_disk_write)
- d_ofile.open("raw_rx.dat",std::ios::binary|std::ios::out);
-
- usrp_rx_stop_stub = false;
-}
-
-usrp_rx_stub::~usrp_rx_stub()
-{
- if(d_disk_write)
- d_ofile.close();
-}
-
-void
-usrp_rx_stub::initial_transition()
-{
-}
-
-void
-usrp_rx_stub::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t port_id = msg->port_id();
- pmt_t data = msg->data();
-
- if (pmt_eq(msg->signal(), s_timeout)
- && !pmt_eq(msg->data(), s_done)) {
-
- if(!usrp_rx_stop_stub)
- read_and_respond();
- else { // requested to stop
- cancel_timeout(msg->metadata());
- usrp_rx_stop_stub=false;
- if(verbose)
- std::cout << "[USRP_RX_STUB] Stopping RX stub\n";
- }
-
- }
-
- // Theoretically only have 1 message to ever expect, but
- // want to make sure its at least what we want
- if(pmt_eq(port_id, d_cs->port_symbol())
- && pmt_eqv(event, s_cmd_usrp_rx_start_reading)) {
-
- if(verbose)
- std::cout << "[USRP_RX_STUB] Starting with decim @ "
- << d_decim_rx << std::endl;
-
- start_packet_timer();
- }
-}
-
-// Setup a periodic timer which will drive packet generation
-void
-usrp_rx_stub::start_packet_timer()
-{
- d_t0 = mb_time::time(); // current time
-
- // Calculate the inter-packet arrival time.
- double samples_per_sec = (64.0/(double)d_decim_rx)*1000000.0;
- double frames_per_sec = samples_per_sec / (double)d_samples_per_frame;
- double frame_rate = 1.0 / frames_per_sec;
-
- if(verbose) {
- std::cout << "[USRP_RX_STUB] Scheduling periodic packet generator\n";
- std::cout << "\tsamples_per_sec: " << samples_per_sec << std::endl;
- std::cout << "\tframes_per_sec: " << frames_per_sec << std::endl;
- std::cout << "\tframe_rate: " << frame_rate << std::endl;
- }
-
- schedule_periodic_timeout(d_t0 + frame_rate, mb_time(frame_rate), PMT_T);
-}
-
-void
-usrp_rx_stub::read_and_respond()
-{
-
- long nsamples_this_frame = d_samples_per_frame;
-
- size_t nshorts = 2 * nsamples_this_frame; // 16-bit I & Q
- long channel = 0;
- long n_bytes = nshorts*2;
- pmt_t uvec = pmt_make_s16vector(nshorts, 0);
- size_t ignore;
- int16_t *samples = pmt_s16vector_writable_elements(uvec, ignore);
-
- // fill in the complex sinusoid
-
- for (int i = 0; i < nsamples_this_frame; i++){
-
- if (1){
- gr_complex s;
- d_nco.sincos(&s, 1, d_amplitude);
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- else {
- gr_complex s(d_amplitude, d_amplitude);
-
- // write 16-bit i & q
- samples[2*i] = (int16_t) s.real();
- samples[2*i+1] = (int16_t) s.imag();
- }
- }
-
- if(d_disk_write)
- d_ofile.write((const char *)samples, n_bytes);
-
- pmt_t v_pkt = pmt_make_u8vector(sizeof(transport_pkt), 0);
- transport_pkt *pkt =
- (transport_pkt *) pmt_u8vector_writable_elements(v_pkt, ignore);
-
- pkt->set_header(0, channel, 0, n_bytes);
- pkt->set_timestamp(0xffffffff);
- memcpy(pkt->payload(), samples, n_bytes);
-
- d_cs->send(s_response_usrp_rx_read, pmt_list3(PMT_NIL, PMT_T, v_pkt));
-
- // Now lets check the shared CS queue between the TX and RX stub. Each
- // element in a queue is a list where the first element is an invocation
- // handle and the second element is a PMT u8 vect representation of the
- // CS packet response which can just be passed transparently.
- while(!d_cs_queue.empty()) {
-
- pmt_t cs_pkt = d_cs_queue.front();
- d_cs_queue.pop();
-
- pmt_t invocation_handle = pmt_nth(0, cs_pkt);
- pmt_t v_pkt = pmt_nth(1, cs_pkt);
-
- d_cs->send(s_response_usrp_rx_read,
- pmt_list3(invocation_handle,
- PMT_T,
- v_pkt)); // Take the front CS pkt
-
-
- if(verbose)
- std::cout << "[USRP_RX_STUB] Received CS response from TX stub\n";
- }
-
-}
-
-REGISTER_MBLOCK_CLASS(usrp_rx_stub);
diff --git a/usrp/limbo/inband/usrp_rx_stub.h b/usrp/limbo/inband/usrp_rx_stub.h
deleted file mode 100644
index 238b4568f..000000000
--- a/usrp/limbo/inband/usrp_rx_stub.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_RX_STUB_H
-#define INCLUDED_USRP_RX_STUB_H
-
-#include <mblock/mblock.h>
-#include <vector>
-#include "usrp_standard.h"
-#include <ui_nco.h>
-#include <fstream>
-#include <queue>
-#include <usrp_inband_usb_packet.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-extern bool usrp_rx_stop_stub; // used to communicate a 'stop' to the RX stub
-extern std::queue<pmt_t> d_cs_queue;
-
-static pmt_t s_timeout = pmt_intern("%timeout");
-static pmt_t s_done = pmt_intern("done");
-
-/*!
- * \brief Implements the low level usb interface to the USRP
- */
-class usrp_rx_stub : public mb_mblock
-{
- public:
-
- mb_port_sptr d_cs;
- usrp_standard_rx* d_urx;
-
- long d_samples_per_frame;
- long d_decim_rx;
-
- mb_time d_t0;
- double d_delta_t;
-
- // for generating sine wave output
- ui_nco<float,float> d_nco;
- double d_amplitude;
-
- bool d_disk_write;
-
- std::ofstream d_ofile;
-
- public:
- usrp_rx_stub(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_rx_stub();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- private:
- void read_and_respond();
- void read_data();
- void start_packet_timer();
-
-};
-
-
-#endif /* INCLUDED_USRP_RX_H */
-
diff --git a/usrp/limbo/inband/usrp_server.cc b/usrp/limbo/inband/usrp_server.cc
deleted file mode 100644
index 4f5f396b4..000000000
--- a/usrp/limbo/inband/usrp_server.cc
+++ /dev/null
@@ -1,1861 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <usrp_server.h>
-#include <iostream>
-#include <usrp_inband_usb_packet.h>
-#include <mblock/class_registry.h>
-#include <vector>
-#include <usrp_usb_interface.h>
-#include <string.h>
-#include <fpga_regs_common.h>
-#include <fpga_regs_standard.h>
-
-#include <symbols_usrp_server_cs.h>
-#include <symbols_usrp_channel.h>
-#include <symbols_usrp_tx.h>
-#include <symbols_usrp_rx.h>
-#include <symbols_usrp_low_level_cs.h>
-#include <symbols_usrp_interface_cs.h>
-
-static pmt_t s_shutdown = pmt_intern("%shutdown");
-
-typedef usrp_inband_usb_packet transport_pkt; // makes conversion to gigabit easy
-
-const static bool verbose = false;
-
-static std::string
-str(long x)
-{
- std::ostringstream s;
- s << x;
- return s.str();
-}
-
-usrp_server::usrp_server(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_fpga_debug(false),
- d_interp_tx(128), // these should match the lower level defaults (rx also)
- d_decim_rx(128),
- d_fake_rx(false)
-{
- if(verbose)
- std::cout << "[USRP_SERVER] Initializing...\n";
-
- // Dictionary for arguments to all of the components
- d_usrp_dict = user_arg;
-
- if (pmt_is_dict(d_usrp_dict)) {
-
- if(pmt_t fpga_debug = pmt_dict_ref(d_usrp_dict,
- pmt_intern("fpga-debug"),
- PMT_NIL)) {
- if(pmt_eqv(fpga_debug, PMT_T))
- d_fpga_debug=true;
- }
-
- // Read the TX interpolations
- if(pmt_t interp_tx = pmt_dict_ref(d_usrp_dict,
- pmt_intern("interp-tx"),
- PMT_NIL)) {
- if(!pmt_eqv(interp_tx, PMT_NIL))
- d_interp_tx = pmt_to_long(interp_tx);
- }
-
- // Read the RX decimation rate
- if(pmt_t decim_rx = pmt_dict_ref(d_usrp_dict,
- pmt_intern("decim-rx"),
- PMT_NIL)) {
- if(!pmt_eqv(decim_rx, PMT_NIL))
- d_decim_rx = pmt_to_long(decim_rx);
- }
- }
-
- // control & status port
- d_cs = define_port("cs", "usrp-server-cs", true, mb_port::EXTERNAL);
- d_cs_usrp = define_port("cs_usrp", "usrp-interface-cs", false, mb_port::INTERNAL);
-
- // ports
- //
- // (if/when we do replicated ports, these will be replaced by a
- // single replicated port)
- for(int port=0; port < N_PORTS; port++) {
-
- d_tx.push_back(define_port("tx"+str(port),
- "usrp-tx",
- true,
- mb_port::EXTERNAL));
-
- d_rx.push_back(define_port("rx"+str(port),
- "usrp-rx",
- true,
- mb_port::EXTERNAL));
- }
-
- define_component("usrp", "usrp_usb_interface", d_usrp_dict);
- connect("self", "cs_usrp", "usrp", "cs");
-
- d_defer=false;
- d_opened=false;
-
- // FIXME: needs to be returned from open, if we want to use this
- d_nrx_chan = 2;
- d_ntx_chan = 2;
-
- // Initialize capacity on each channel to 0 and to no owner
- // Also initialize the USRP standard tx/rx pointers to NULL
- for(int chan=0; chan < d_ntx_chan; chan++)
- d_chaninfo_tx.push_back(channel_info());
-
- for(int chan=0; chan < d_nrx_chan; chan++)
- d_chaninfo_rx.push_back(channel_info());
-
- d_rx_chan_mask = 0;
-
- for(int i=0; i < D_MAX_RID; i++)
- d_rids.push_back(rid_info());
-
- //d_fake_rx=true;
-}
-
-/*!
- * \brief resets the assigned capacity and owners of each RX and TX channel from
- * allocations.
- */
-void
-usrp_server::reset_channels()
-{
-
- for(int chan=0; chan < d_ntx_chan; chan++) {
- d_chaninfo_tx[chan].assigned_capacity = 0;
- d_chaninfo_tx[chan].owner = PMT_NIL;
- }
-
- for(int chan=0; chan < d_nrx_chan; chan++) {
- d_chaninfo_rx[chan].assigned_capacity = 0;
- d_chaninfo_rx[chan].owner = PMT_NIL;
- }
-
- d_rx_chan_mask = 0;
-}
-
-usrp_server::~usrp_server()
-{
-}
-
-
-void
-usrp_server::initial_transition()
-{
- // the initial transition
-}
-
-/*!
- * \brief Reads all incoming messages to USRP server from the TX, RX, and the CS
- * ports. This drives the state of USRP server and dispatches based on the
- * message.
- */
-void
-usrp_server::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal(); // the "name" of the message
- pmt_t port_id = msg->port_id(); // which port it came in on
- pmt_t data = msg->data();
- pmt_t invocation_handle;
- pmt_t metadata = msg->metadata();
- pmt_t status;
-
- long port;
-
- if (pmt_eq(event, s_shutdown)) // ignore (for now)
- return;
-
- invocation_handle = pmt_nth(0, data);
-
- if (0){
- std::cout << "[USRP_SERVER] event: " << event << std::endl;
- std::cout << "[USRP_SERVER] port_id: " << port_id << std::endl;
- }
-
- // It would be nice if this were all table driven, and we could compute our
- // state transition as f(current_state, port_id, signal)
-
- // A message from the USRP CS, which should *only* be responses
- //
- // It is important that this set come before checking messages of any other
- // components. This is since we always want to listen to the low level USRP
- // server, even if we aren't initialized we are waiting for responses to
- // become initialized. Likewise, after the usrp_server is "closed", we still
- // want to pass responses back from the low level.
-
- //---------------- USRP RESPONSE ---------------//
- if (pmt_eq(port_id, d_cs_usrp->port_symbol())) {
-
- //-------------- USRP OPEN ------------------//
- if(pmt_eq(event, s_response_usrp_open)) {
- // pass the response back over the regular CS port
- pmt_t status = pmt_nth(1, data);
- d_cs->send(s_response_open, pmt_list2(invocation_handle, status));
-
- //reset_all_registers();
- //initialize_registers();
-
- if(pmt_eqv(status,PMT_T)) {
- d_opened = true;
- d_defer = false;
- recall_defer_queue();
- }
-
- return;
- }
- //------------- USRP CLOSE -------------------//
- else if (pmt_eq(event, s_response_usrp_close)) {
- pmt_t status = pmt_nth(1, data);
- d_cs->send(s_response_close, pmt_list2(invocation_handle, status));
-
- if(pmt_eqv(status,PMT_T)) {
- d_opened = false;
- d_defer = false;
- reset_channels();
- recall_defer_queue();
- }
-
- return;
- }
- //--------------- USRP WRITE --------------//
- else if (pmt_eq(event, s_response_usrp_write)) {
-
- pmt_t status = pmt_nth(1, data);
- long channel = pmt_to_long(pmt_nth(2, data));
- long port;
-
- // Do not report back responses if they were generated from a
- // command packet
- if(channel == CONTROL_CHAN)
- return;
-
- // Find the port through the owner of the channel
- if((port = tx_port_index(d_chaninfo_tx[channel].owner)) !=-1 ){
- d_tx[port]->send(s_response_xmit_raw_frame,
- pmt_list2(invocation_handle, status));
- return;
- }
- }
- //--------------- USRP READ ---------------//
- else if (pmt_eq(event, s_response_usrp_read)) {
-
- pmt_t status = pmt_nth(1, data);
-
- if(!pmt_eqv(status, PMT_T)) {
- std::cerr << "[USRP_SERVER] Error receiving packet\n";
- return;
- }
- else {
- handle_response_usrp_read(data);
- return;
- }
- }
-
- goto unhandled;
- }
-
- // Checking for defer on all other messages
- if(d_defer) {
- if (verbose)
- std::cout << "[USRP_SERVER] Received msg while deferring ("
- << msg->signal() << ")\n";
- d_defer_queue.push(msg);
- return;
- }
-
- //--------- CONTROL / STATUS ------------//
- if (pmt_eq(port_id, d_cs->port_symbol())){
-
- //----------- OPEN -----------//
- if (pmt_eq(event, s_cmd_open)){
-
- // Reject if already open
- if(d_opened) {
- d_cs->send(s_response_open, pmt_list2(invocation_handle, s_err_usrp_already_opened));
- return;
- }
-
- // the parameters are the same to the low level interface, so we just pass 'data' along
- d_cs_usrp->send(s_cmd_usrp_open, data);
-
- d_defer = true;
-
- return;
- }
- //---------- CLOSE -----------//
- else if (pmt_eq(event, s_cmd_close)){
-
- if(!d_opened) {
- d_cs->send(s_response_close, pmt_list2(invocation_handle, s_err_usrp_already_closed));
- return;
- }
-
- d_defer = true;
- d_cs_usrp->send(s_cmd_usrp_close, pmt_list1(invocation_handle));
-
- return;
- }
- //---------- MAX CAPACITY ----------//
- else if (pmt_eq(event, s_cmd_max_capacity)) {
-
- if(!d_opened) {
- d_cs->send(s_response_max_capacity,
- pmt_list3(invocation_handle, s_err_usrp_not_opened, pmt_from_long(0)));
- return;
- }
-
- d_cs->send(s_response_max_capacity,
- pmt_list3(invocation_handle,
- PMT_T,
- pmt_from_long(max_capacity())));
- return;
- }
- //---------- NTX CHAN --------------//
- else if (pmt_eq(event, s_cmd_ntx_chan)) {
-
- if(!d_opened) {
- d_cs->send(s_response_ntx_chan,
- pmt_list3(invocation_handle, s_err_usrp_not_opened, pmt_from_long(0)));
- return;
- }
-
- d_cs->send(s_response_ntx_chan,
- pmt_list3(invocation_handle,
- PMT_T,
- pmt_from_long(d_ntx_chan)));
- return;
- }
- //---------- NRX CHAN -----------//
- else if (pmt_eq(event, s_cmd_nrx_chan)) {
-
- if(!d_opened) {
- d_cs->send(s_response_nrx_chan,
- pmt_list3(invocation_handle, s_err_usrp_not_opened, pmt_from_long(0)));
- return;
- }
-
- d_cs->send(s_response_nrx_chan,
- pmt_list3(invocation_handle,
- PMT_T,
- pmt_from_long(d_nrx_chan)));
- return;
- }
- //--------- ALLOCATION? -----------//
- else if (pmt_eq(event, s_cmd_current_capacity_allocation)) {
-
- if(!d_opened) {
- d_cs->send(s_response_current_capacity_allocation,
- pmt_list3(invocation_handle,
- s_err_usrp_not_opened,
- pmt_from_long(0)));
- return;
- }
-
- d_cs->send(s_response_current_capacity_allocation,
- pmt_list3(invocation_handle,
- PMT_T,
- pmt_from_long(current_capacity_allocation())));
- return;
- }
- goto unhandled;
- }
-
- //-------------- TX ---------------//
- if ((port = tx_port_index(port_id)) != -1) {
-
- //------------ ALLOCATE (TX) ----------------//
- if (pmt_eq(event, s_cmd_allocate_channel)){
-
- if(!d_opened) {
- d_tx[port]->send(s_response_allocate_channel,
- pmt_list3(invocation_handle,
- s_err_usrp_not_opened,
- pmt_from_long(0)));
- return;
- }
-
- handle_cmd_allocate_channel(d_tx[port], d_chaninfo_tx, data);
- return;
- }
-
- //----------- DEALLOCATE (TX) ---------------//
- if (pmt_eq(event, s_cmd_deallocate_channel)) {
-
- if(!d_opened) {
- d_tx[port]->send(s_response_deallocate_channel,
- pmt_list3(invocation_handle,
- s_err_usrp_not_opened,
- pmt_from_long(0)));
- return;
- }
-
- handle_cmd_deallocate_channel(d_tx[port], d_chaninfo_tx, data);
- return;
- }
-
- //-------------- XMIT RAW FRAME -----------------/
- if (pmt_eq(event, s_cmd_xmit_raw_frame)){
-
- if(!d_opened) {
- d_tx[port]->send(s_response_xmit_raw_frame,
- pmt_list2(invocation_handle, s_err_usrp_not_opened));
- return;
- }
-
- handle_cmd_xmit_raw_frame(d_tx[port], d_chaninfo_tx, data);
- return;
- }
-
- //-------------- CONTROL PACKET -----------------/
- if (pmt_eq(event, s_cmd_to_control_channel)) {
-
- if(!d_opened) {
- d_tx[port]->send(s_response_xmit_raw_frame,
- pmt_list2(invocation_handle, s_err_usrp_not_opened));
- return;
- }
-
- handle_cmd_to_control_channel(d_tx[port], d_chaninfo_tx, data);
- return;
-
- }
-
- goto unhandled;
- }
-
- //-------------- RX ---------------//
- if ((port = rx_port_index(port_id)) != -1) {
-
- //------------ ALLOCATE (RX) ----------------//
- if (pmt_eq(event, s_cmd_allocate_channel)) {
-
- if(!d_opened) {
- d_rx[port]->send(s_response_allocate_channel,
- pmt_list3(invocation_handle,
- s_err_usrp_not_opened,
- pmt_from_long(0)));
- return;
- }
-
- handle_cmd_allocate_channel(d_rx[port], d_chaninfo_rx, data);
- return;
- }
-
- //----------- DEALLOCATE (RX) ---------------//
- if (pmt_eq(event, s_cmd_deallocate_channel)) {
-
- if(!d_opened) {
- d_rx[port]->send(s_response_deallocate_channel,
- pmt_list3(invocation_handle,
- s_err_usrp_not_opened,
- pmt_from_long(0)));
- return;
- }
-
- handle_cmd_deallocate_channel(d_rx[port], d_chaninfo_rx, data);
- return;
- }
-
- //-------------- START RECV ----------------//
- if (pmt_eq(event, s_cmd_start_recv_raw_samples)) {
-
- if(!d_opened) {
- d_rx[port]->send(s_response_recv_raw_samples,
- pmt_list2(invocation_handle, s_err_usrp_not_opened));
- return;
- }
-
- handle_cmd_start_recv_raw_samples(d_rx[port], d_chaninfo_rx, data);
- return;
- }
-
- //-------------- STOP RECV ----------------//
- if (pmt_eq(event, s_cmd_stop_recv_raw_samples)) {
-
- if(!d_opened)
- return;
-
- // FIX ME : no response for stopping? even if error? (permissions)
- handle_cmd_stop_recv_raw_samples(d_rx[port], d_chaninfo_rx, data);
-
- return;
- }
-
- goto unhandled;
- }
-
- unhandled:
- std::cout << "[USRP_SERVER] unhandled msg: " << msg << std::endl;
-}
-
-/*!
- * \brief Takes a port_symbol() as parameter \p port_id and is used to determine
- * if the port is a TX port, or to find an index in the d_tx vector which stores
- * the port.
- *
- * \returns -1 if \p port_id is not in the d_tx vector (i.e., it's not a TX
- * port), otherwise returns an index in the d_tx vector which stores the port.
- */
-int usrp_server::tx_port_index(pmt_t port_id) {
-
- for(int i=0; i < (int) d_tx.size(); i++)
- if(pmt_eq(d_tx[i]->port_symbol(), port_id))
- return i;
-
- return -1;
-}
-
-/*!
- * \brief Takes a port_symbol() as parameter \p port_id and is used to determine
- * if the port is an RX port, or to find an index in the d_rx vector which
- * stores the port.
- *
- * \returns -1 if \p port_id is not in the d_rx vector (i.e., it's not an RX
- * port), otherwise returns an index in the d_rx vector which stores the port.
- */
-int usrp_server::rx_port_index(pmt_t port_id) {
-
- for(int i=0; i < (int) d_rx.size(); i++)
- if(pmt_eq(d_rx[i]->port_symbol(), port_id))
- return i;
-
- return -1;
-}
-
-/*!
- * \brief Determines the current total capacity allocated by all RX and TX
- * channels.
- *
- * \returns the total allocated capacity
- */
-long usrp_server::current_capacity_allocation() {
- long capacity = 0;
-
- for(int chan=0; chan < d_ntx_chan; chan++)
- capacity += d_chaninfo_tx[chan].assigned_capacity;
-
- for(int chan=0; chan < d_nrx_chan; chan++)
- capacity += d_chaninfo_rx[chan].assigned_capacity;
-
- return capacity;
-}
-
-
-/*!
- * \brief Called by the handle_message() method if the incoming message to
- * usrp_server is to allocate a channel (cmd-allocate-channel). The method
- * checks if the requested capacity exists and if so it will reserve it for the
- * caller on the channel that is returned via a response-allocate-channel
- * signal.
- */
-void
-usrp_server::handle_cmd_allocate_channel(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- long rqstd_capacity = pmt_to_long(pmt_nth(1, data));
- long chan;
-
- // Check capacity exists
- if((D_USB_CAPACITY - current_capacity_allocation()) < rqstd_capacity) {
-
- // no capacity available
- port->send(s_response_allocate_channel,
- pmt_list3(invocation_handle,
- s_err_requested_capacity_unavailable,
- PMT_NIL));
- return;
- }
-
- // Find a free channel, assign the capacity and respond
- for(chan=0; chan < (long)chan_info.size(); chan++) {
-
- if(verbose)
- std::cout << "[USRP_SERVER] Checking chan: " << chan
- << " owner " << chan_info[chan].owner
- << " size " << chan_info.size()
- << std::endl;
-
- if(chan_info[chan].owner == PMT_NIL) {
-
- chan_info[chan].owner = port->port_symbol();
- chan_info[chan].assigned_capacity = rqstd_capacity;
-
- port->send(s_response_allocate_channel,
- pmt_list3(invocation_handle,
- PMT_T,
- pmt_from_long(chan)));
-
- if(verbose)
- std::cout << "[USRP_SERVER] Assigning channel: " << chan
- << " to " << chan_info[chan].owner
- << std::endl;
- return;
- }
-
- }
-
- if (verbose)
- std::cout << "[USRP_SERVER] Couldnt find a TX chan\n";
-
- // no free TX chan found
- port->send(s_response_allocate_channel,
- pmt_list3(invocation_handle,
- s_err_channel_unavailable,
- PMT_NIL));
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method if the incoming message to
- * usrp_server is to deallocate a channel (cmd-deallocate-channel). The method
- * ensures that the sender of the signal owns the channel and that the channel
- * number is valid. A response-deallocate-channel signal is sent back with the
- * result of the deallocation.
- */
-void
-usrp_server::handle_cmd_deallocate_channel(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
-
- pmt_t invocation_handle = pmt_nth(0, data);
- long channel = pmt_to_long(pmt_nth(1, data));
-
- // Ensure the channel is valid and the caller owns the port
- if(!check_valid(port, channel, chan_info,
- pmt_list2(s_response_deallocate_channel, invocation_handle)))
- return;
-
- chan_info[channel].assigned_capacity = 0;
- chan_info[channel].owner = PMT_NIL;
-
- port->send(s_response_deallocate_channel,
- pmt_list2(invocation_handle,
- PMT_T));
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method if the incoming message to
- * usrp_server is to transmit a frame (cmd-xmit-raw-frame). The method
- * allocates enough memory to support a burst of packets which contain the frame
- * over the bus of the frame, sets the packet headers, and sends a signal to the
- * lower block for the data (packets) to be written to the bus.
- *
- * The \p port the command was sent on and the channel info (\p chan_info) of
- * the channel the frame is to be transmitted on are passed to ensure that the
- * caller owns the channel.
- *
- * The \p data parameter is in the format of a cmd-xmit-raw-frame signal.
- *
- * The properties
- */
-void usrp_server::handle_cmd_xmit_raw_frame(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
- size_t n_bytes, psize;
- long max_payload_len = transport_pkt::max_payload();
-
- pmt_t invocation_handle = pmt_nth(0, data);
- long channel = pmt_to_long(pmt_nth(1, data));
- const void *samples = pmt_uniform_vector_elements(pmt_nth(2, data), n_bytes);
- long timestamp = pmt_to_long(pmt_nth(3, data));
- pmt_t properties = pmt_nth(4, data);
-
- // Ensure the channel is valid and the caller owns the port
- if(!check_valid(port, channel, chan_info,
- pmt_list2(s_response_xmit_raw_frame, invocation_handle)))
- return;
-
- // Read information from the properties of the packet
- bool carrier_sense = false;
- if(pmt_is_dict(properties)) {
-
- // Check if carrier sense is enabled for the frame
- if(pmt_t p_carrier_sense = pmt_dict_ref(properties,
- pmt_intern("carrier-sense"),
- PMT_NIL)) {
- if(pmt_eqv(p_carrier_sense, PMT_T))
- carrier_sense = true;
- }
- }
-
-
- // Determine the number of packets to allocate contiguous memory for
- // bursting over the USB and get a pointer to the memory to be used in
- // building the packets
- long n_packets =
- static_cast<long>(std::ceil(n_bytes / (double)max_payload_len));
-
- pmt_t v_packets = pmt_make_u8vector(sizeof(transport_pkt) * n_packets, 0);
-
- transport_pkt *pkts =
- (transport_pkt *) pmt_u8vector_writable_elements(v_packets, psize);
-
- for(int n=0; n < n_packets; n++) {
-
- long payload_len =
- std::min((long)(n_bytes-(n*max_payload_len)), (long)max_payload_len);
-
- if(n == 0) { // first packet gets start of burst flag and timestamp
-
- if(carrier_sense)
- pkts[n].set_header(pkts[n].FL_START_OF_BURST
- | pkts[n].FL_CARRIER_SENSE,
- channel, 0, payload_len);
- else
- pkts[n].set_header(pkts[n].FL_START_OF_BURST, channel, 0, payload_len);
-
- pkts[n].set_timestamp(timestamp);
-
- } else {
- pkts[n].set_header(0, channel, 0, payload_len);
- pkts[n].set_timestamp(0xffffffff);
- }
-
- memcpy(pkts[n].payload(),
- (uint8_t *)samples+(max_payload_len * n),
- payload_len);
-
- }
-
-
- pkts[n_packets-1].set_end_of_burst(); // set the last packet's end of burst
-
- if (verbose && 0)
- std::cout << "[USRP_SERVER] Received raw frame invocation: "
- << invocation_handle << std::endl;
-
- // The actual response to the write will be generated by a
- // s_response_usrp_write since we cannot determine whether to transmit was
- // successful until we hear from the lower layers.
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packets));
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method to parse incoming control/status
- * signals (cmd-to-control-channel).
- *
- * The \p port the command was sent on and the channel info (\p chan_info) of
- * the channel are passed to ensure that the caller owns the channel.
- *
- * The \p data parameter is in the format of a PMT list, where each element
- * follows the format of a control/status signal (i.e. op-ping-fixed).
- *
- * The method will parse all of the C/S commands included in \p data and place
- * the commands in to a lower level packet sent to the control channel. The
- * method will pack as many commands as possible in t oa single packet, and once
- * it is fill generate as many lower level packets as needed.
- *
- * Anything that needs to be returned to the sender of the signal (i.e. the
- * value of a register) will be generated by the parse_control_pkt() method as
- * the responses to the commands are read back from the USRP.
- */
-void usrp_server::handle_cmd_to_control_channel(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
-
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t subpackets = pmt_nth(1, data);
-
- long n_subpkts = pmt_length(subpackets);
- long curr_subpkt = 0;
-
- size_t psize;
- long payload_len = 0;
- long channel = CONTROL_CHAN;
-
- if(verbose)
- std::cout << "[USRP_SERVER] Handling " << n_subpkts << " commands\n";
-
- // The design of the following code is optimized for simplicity, not
- // performance. To performance optimize this code, the total size in bytes
- // needed for all of the CS packets is needed to allocate contiguous memory
- // which contains the USB packets for bursting over the bus. However to do
- // this the packets subpackets would need to be parsed twice and their sizes
- // would need to be determined.
- //
- // The approach taken is to keep parsing the subpackets and putting them in to
- // USB packets. Once the USB packet is full, a write is sent for it and
- // another packet is created.
- //
- // The subpacket creation methods will return false if the subpacket will not
- // fit in to the current USB packet. In these cases a new USB packet is
- // created and the old is sent.
-
- new_packet:
- // This code needs to become "smart" and only make a new packet when full
- pmt_t v_packet = pmt_make_u8vector(sizeof(transport_pkt), 0);
- transport_pkt *pkt = (transport_pkt *) pmt_u8vector_writable_elements(v_packet, psize);
- payload_len = 0;
-
- pkt->set_header(0, channel, 0, payload_len);
- pkt->set_timestamp(0xffffffff);
-
- while(curr_subpkt < n_subpkts) {
-
- pmt_t subp = pmt_nth(curr_subpkt, subpackets);
- pmt_t subp_cmd = pmt_nth(0, subp);
- pmt_t subp_data = pmt_nth(1, subp);
-
- //--------- PING FIXED --------------//
- if(pmt_eq(subp_cmd, s_op_ping_fixed)) {
-
- long urid = pmt_to_long(pmt_nth(0, subp_data));
- long pingval = pmt_to_long(pmt_nth(1, subp_data));
-
- // USRP server sets request ID's to keep track of which application gets
- // what response back. To allow a full 6-bits for an RID to the user, we
- // keep a mapping and replace the RID's as the packets go in and out. If
- // there are no RID's available, the command is thrown away silently.
- long srid;
- if((srid = next_rid()) == -1)
- goto subpkt_bail;
-
- // We use a vector to store the owner of the ping request and will use it
- // to send the request on any RX port they own.
- d_rids[srid].owner = port->port_symbol();
- d_rids[srid].user_rid = urid;
-
- // Adds a ping after the previous command in the pkt
- if(!pkt->cs_ping(srid, pingval))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- // Return the RID
- d_rids[srid].owner = PMT_NIL;
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received ping command request"
- << " assigning RID " << srid << std::endl;
-
- }
-
- //----------- WRITE REG ---------------//
- if(pmt_eq(subp_cmd, s_op_write_reg)) {
-
- long reg_num = pmt_to_long(pmt_nth(0, subp_data));
- long val = pmt_to_long(pmt_nth(1, subp_data));
-
- if(!pkt->cs_write_reg(reg_num, val))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received write register request "
- << "("
- << "Reg: " << reg_num << ", "
- << "Val: " << val
- << ")\n";
- }
-
- //------- WRITE REG MASKED ----------//
- if(pmt_eq(subp_cmd, s_op_write_reg_masked)) {
-
- long reg_num = pmt_to_long(pmt_nth(0, subp_data));
- long val = pmt_to_long(pmt_nth(1, subp_data));
- long mask = pmt_to_long(pmt_nth(2, subp_data));
-
- if(!pkt->cs_write_reg_masked(reg_num, val, mask))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received write register masked request\n";
- }
-
- //------------ READ REG --------------//
- if(pmt_eq(subp_cmd, s_op_read_reg)) {
-
- long urid = pmt_to_long(pmt_nth(0, subp_data));
- long reg_num = pmt_to_long(pmt_nth(1, subp_data));
-
- long srid;
- if((srid = next_rid()) == -1)
- goto subpkt_bail;
-
- d_rids[srid].owner = port->port_symbol();
- d_rids[srid].user_rid = urid;
-
- if(!pkt->cs_read_reg(srid, reg_num))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- // Return the rid
- d_rids[srid].owner = PMT_NIL;
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received read register request"
- << " assigning RID " << srid << std::endl;
- }
-
- //------------ DELAY --------------//
- if(pmt_eq(subp_cmd, s_op_delay)) {
-
- long ticks = pmt_to_long(pmt_nth(0, subp_data));
-
- if(!pkt->cs_delay(ticks))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received delay request of "
- << ticks << " ticks\n";
- }
-
- //--------- I2C WRITE -----------//
- // FIXME: could check that byte count does not exceed 2^8 which
- // is the max length in the subpacket for # of bytes to read.
- if(pmt_eq(subp_cmd, s_op_i2c_write)) {
-
- long i2c_addr = pmt_to_long(pmt_nth(0, subp_data));
- pmt_t data = pmt_nth(1, subp_data);
-
- // Get a readable address to the data which also gives us the length
- size_t data_len;
- uint8_t *i2c_data = (uint8_t *) pmt_u8vector_writable_elements(data, data_len);
-
- // Make the USB packet
- if(!pkt->cs_i2c_write(i2c_addr, i2c_data, data_len))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received I2C write\n";
- }
-
- //----------- I2C Read -------------//
- if(pmt_eq(subp_cmd, s_op_i2c_read)) {
-
- long urid = pmt_to_long(pmt_nth(0, subp_data));
- long i2c_addr = pmt_to_long(pmt_nth(1, subp_data));
- long i2c_bytes = pmt_to_long(pmt_nth(2, subp_data));
-
- long srid;
- if((srid = next_rid()) == -1)
- goto subpkt_bail;
-
- d_rids[srid].owner = port->port_symbol();
- d_rids[srid].user_rid = urid;
-
- if(!pkt->cs_i2c_read(srid, i2c_addr, i2c_bytes))
- {
-
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- d_rids[srid].owner = PMT_NIL;
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received I2C read\n";
- }
-
- //--------- SPI WRITE -----------//
- if(pmt_eq(subp_cmd, s_op_spi_write)) {
-
- long enables = pmt_to_long(pmt_nth(0, subp_data));
- long format = pmt_to_long(pmt_nth(1, subp_data));
- long opt = pmt_to_long(pmt_nth(2, subp_data));
- pmt_t data = pmt_nth(3, subp_data);
-
- // Get a readable address to the data which also gives us the length
- size_t data_len;
- uint8_t *spi_data = (uint8_t *) pmt_u8vector_writable_elements(data, data_len);
-
- // Make the USB packet
- if(!pkt->cs_spi_write(enables, format, opt, spi_data, data_len))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received SPI write\n";
- }
-
- //--------- SPI READ -----------//
- if(pmt_eq(subp_cmd, s_op_spi_read)) {
-
- long urid = pmt_to_long(pmt_nth(0, subp_data));
- long enables = pmt_to_long(pmt_nth(1, subp_data));
- long format = pmt_to_long(pmt_nth(2, subp_data));
- long opt = pmt_to_long(pmt_nth(3, subp_data));
- long n_bytes = pmt_to_long(pmt_nth(4, subp_data));
-
- long srid;
- if((srid = next_rid()) == -1)
- goto subpkt_bail;
-
- d_rids[srid].owner = port->port_symbol();
- d_rids[srid].user_rid = urid;
-
- // Make the USB packet
- if(!pkt->cs_spi_read(srid, enables, format, opt, n_bytes))
- {
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- // Return the rid
- d_rids[srid].owner = PMT_NIL;
-
- goto new_packet;
- }
-
- if(verbose)
- std::cout << "[USRP_SERVER] Received SPI read\n";
- }
-
- subpkt_bail:
- curr_subpkt++;
-
- }
-
-
- // If the current packets length is > 0, we know there are subpackets that
- // need to be sent out still.
- if(pkt->payload_len() > 0)
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(invocation_handle,
- pmt_from_long(channel),
- v_packet));
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is a
- * command to start reading samples from the USRP (cmd-start-recv-raw-samples).
- *
- * The \p port the command was sent on and the channel info (\p chan_info) of
- * the channel are passed to ensure that the caller owns the channel.
- *
- * The \p data parameter should be in the format of a cmd-start-recv-raw-samples
- * command where the first element in the list is an invocation handle, and the
- * second is the channel the signal generator wants to receive the samples on.
- */
-void
-usrp_server::handle_cmd_start_recv_raw_samples(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- long channel = pmt_to_long(pmt_nth(1, data));
-
- // Ensure the channel is valid and the caller owns the port
- if(!check_valid(port, channel, chan_info,
- pmt_list2(s_response_xmit_raw_frame, invocation_handle)))
- return;
-
- // Already started receiving samples? (another start before a stop)
- // Check the RX channel bitmask.
- if(d_rx_chan_mask & (1 << channel)) {
- port->send(s_response_recv_raw_samples,
- pmt_list5(invocation_handle,
- s_err_already_receiving,
- PMT_NIL,
- PMT_NIL,
- PMT_NIL));
- return;
- }
-
- // We only need to generate a 'start reading' command down to the
- // low level interface if no other channel is already reading
- //
- // We carry this over the CS interface because the lower level
- // interface does not care about the channel, we only demux it
- // at the usrp_server on responses.
- if(d_rx_chan_mask == 0) {
-
- if(verbose)
- std::cout << "[USRP_SERVER] Sending read request down to start recv\n";
-
- d_cs_usrp->send(s_cmd_usrp_start_reading, pmt_list1(invocation_handle));
- }
-
- d_rx_chan_mask |= 1<<channel;
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * stop receiving samples from the USRP (cmd-stop-recv-raw-samples).
- *
- * The \p port the command was sent on and the channel info (\p chan_info) of
- * the channel are passed to ensure that the caller owns the channel.
- *
- * The \p data parameter should be in the format of a cmd-stop-recv-raw-samples
- * command where the first element in the list is an invocation handle, and the
- * second is the channel the signal generator wants to stop receiving the
- * samples from.
- */
-void
-usrp_server::handle_cmd_stop_recv_raw_samples(
- mb_port_sptr port,
- std::vector<struct channel_info> &chan_info,
- pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- long channel = pmt_to_long(pmt_nth(1, data));
-
- // FIX ME : we have no responses to send an error...
- // Ensure the channel is valid and the caller owns the port
- //if(!check_valid(port, channel, chan_info,
- // pmt_list2(s_response_xmit_raw_frame, invocation_handle)))
- // return;
-
- // Remove this hosts bit from the receiver mask
- d_rx_chan_mask &= ~(1<<channel);
-
- // We only need to generate a 'start reading' command down to the
- // low level interface if no other channel is already reading
- //
- // We carry this over the CS interface because the lower level
- // interface does not care about the channel, we only demux it
- // at the usrp_server on responses.
- if(d_rx_chan_mask == 0) {
-
- if(verbose)
- std::cout << "[USRP_SERVER] Sending stop reading request down\n";
-
- d_cs_usrp->send(s_cmd_usrp_stop_reading, pmt_list1(invocation_handle));
- }
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method when an incoming signal is
- * generated to USRP server that contains raw samples from the USRP. This
- * method generates the response-recv-raw-samples signals that are the result of
- * a cmd-start-recv-raw-samples signal.
- *
- * The raw lower-level packet is extracted from \p data, where the format for \p
- * data is a PMT list. The PMT \p data list should contain an invocation handle
- * as the first element, the status of the lower-level read as the second
- * element, and a uniform vector representation of the packets as the third
- * element.
- *
- * The packet contains a channel field that the samples are destined to, and the
- * method determines where to send the samples based on this channel since each
- * channel has an associated port which allocated it.
- */
-void
-usrp_server::handle_response_usrp_read(pmt_t data)
-{
-
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t v_pkt = pmt_nth(2, data);
-
- size_t n_bytes;
- size_t ignore;
-
- if (d_fake_rx) {
-
- pmt_t pkt = pmt_nth(2, data);
-
- d_rx[0]->send(s_response_recv_raw_samples,
- pmt_list5(PMT_F,
- PMT_T,
- pkt,
- pmt_from_long(0xffff),
- PMT_NIL));
-
- return;
- }
-
- // Extract the packet and return appropriately
- transport_pkt *pkt = (transport_pkt *) pmt_u8vector_writable_elements(v_pkt, n_bytes);
-
- // The channel is used to find the port to pass the samples on
- long channel = pkt->chan();
- long payload_len = pkt->payload_len();
- long port;
-
- // Ignore packets which seem to have incorrect size or size 0
- if(payload_len > pkt->max_payload() || payload_len == 0)
- return;
-
- // If the packet is a C/S packet, parse it separately
- if(channel == CONTROL_CHAN) {
- parse_control_pkt(invocation_handle, pkt);
- return;
- }
-
- if((port = rx_port_index(d_chaninfo_rx[channel].owner)) == -1)
- return; // Don't know where to send the sample... possibility on abrupt close
-
- pmt_t v_samples = pmt_make_u8vector(payload_len, 0);
- uint8_t *samples = pmt_u8vector_writable_elements(v_samples, ignore);
-
- memcpy(samples, pkt->payload(), payload_len);
-
- // Build a properties dictionary to store things such as the RSSI
- pmt_t properties = pmt_make_dict();
-
- pmt_dict_set(properties,
- pmt_intern("rssi"),
- pmt_from_long(pkt->rssi()));
-
- if(pkt->overrun())
- pmt_dict_set(properties,
- pmt_intern("overrun"),
- PMT_T);
-
- if(pkt->underrun())
- pmt_dict_set(properties,
- pmt_intern("underrun"),
- PMT_T);
-
- d_rx[port]->send(s_response_recv_raw_samples,
- pmt_list6(invocation_handle,
- status,
- v_samples,
- pmt_from_long(pkt->timestamp()),
- pmt_from_long(channel),
- properties));
- return;
-}
-
-/*!
- * \brief Called by handle_response_usrp_read() when the incoming packet has a
- * channel of CONTROL_CHAN. This means that the incoming packet contains a
- * response for a command sent to the control channel, which this method will
- * parse.
- *
- * The \p pkt parameter is a pointer to the full packet (transport_pkt) in
- * memory.
- *
- * Given that all commands sent to the control channel that require responses
- * will carry an RID (request ID), the method will use the RID passed back with
- * the response to determine which port the response should be sent on.
- */
-void
-usrp_server::parse_control_pkt(pmt_t invocation_handle, transport_pkt *pkt)
-{
-
- long payload_len = pkt->payload_len();
- long curr_payload = 0;
- long port;
-
- // We dispatch based on the control packet type, however we can extract the
- // opcode and the length immediately which is consistent in all responses.
- //
- // Since each control packet can have multiple responses, we keep reading the
- // lengths of each subpacket until we reach the payload length.
- while(curr_payload < payload_len) {
-
- pmt_t sub_packet = pkt->read_subpacket(curr_payload);
- pmt_t op_symbol = pmt_nth(0, sub_packet);
-
- int len = pkt->cs_len(curr_payload);
-
- if(verbose)
- std::cout << "[USRP_SERVER] Parsing subpacket "
- << op_symbol << " ... length " << len << std::endl;
-
- //----------------- PING RESPONSE ------------------//
- if(pmt_eq(op_symbol, s_op_ping_fixed_reply)) {
-
- long srid = pmt_to_long(pmt_nth(1, sub_packet));
- pmt_t pingval = pmt_nth(2, sub_packet);
-
- long urid = d_rids[srid].user_rid;
-
- if(verbose)
- std::cout << "[USRP_SERVER] Found ping response "
- << "("
- << "URID: " << urid << ", "
- << "SRID: " << srid << ", "
- << "VAL: " << pingval
- << ")\n";
-
- // Do some bounds checking incase of bogus/corrupt responses
- if(srid > D_MAX_RID)
- return;
-
- pmt_t owner = d_rids[srid].owner;
-
- // Return the RID
- d_rids[srid].owner = PMT_NIL;
-
- // FIXME: should be 1 response for all subpackets here ?
- if((port = tx_port_index(owner)) != -1)
- d_tx[port]->send(s_response_from_control_channel,
- pmt_list4(invocation_handle,
- PMT_T,
- pmt_list2(s_op_ping_fixed_reply, // subp
- pmt_list2(pmt_from_long(urid),
- pingval)),
- pmt_from_long(pkt->timestamp())));
- }
-
- //----------------- READ REG RESPONSE ------------------//
- else if(pmt_eq(op_symbol, s_op_read_reg_reply)) {
-
- long srid = pmt_to_long(pmt_nth(1, sub_packet));
- pmt_t reg_num = pmt_nth(2, sub_packet);
- pmt_t reg_val = pmt_nth(3, sub_packet);
-
- long urid = d_rids[srid].user_rid;
-
- if(verbose)
- std::cout << "[USRP_SERVER] Found read register response "
- << "("
- << "URID: " << urid << ", "
- << "SRID: " << srid << ", "
- << "REG: " << reg_num << ", "
- << "VAL: " << reg_val
- << ")\n";
-
- // Do some bounds checking to avoid seg faults
- if(srid > D_MAX_RID)
- return;
-
- pmt_t owner = d_rids[srid].owner;
-
- // Return the RID
- d_rids[srid].owner = PMT_NIL;
-
- // FIXME: should be 1 response for all subpackets here ?
- if((port = tx_port_index(owner)) != -1)
- d_tx[port]->send(s_response_from_control_channel,
- pmt_list4(invocation_handle,
- PMT_T,
- pmt_list2(s_op_read_reg_reply, // subp
- pmt_list3(pmt_from_long(urid),
- reg_num,
- reg_val)),
- pmt_from_long(pkt->timestamp())));
- }
-
- //------------------ I2C READ REPLY -------------------//
- else if(pmt_eq(op_symbol, s_op_i2c_read_reply)) {
-
- long srid = pmt_to_long(pmt_nth(1, sub_packet));
- pmt_t i2c_addr = pmt_nth(2, sub_packet);
- pmt_t i2c_data = pmt_nth(3, sub_packet);
-
- long urid = d_rids[srid].user_rid;
-
- if(verbose)
- std::cout << "[USRP_SERVER] Found i2c read reply "
- << "("
- << "URID: " << urid << ", "
- << "SRID: " << srid << ", "
- << "Addr: " << i2c_addr << ", "
- << "Data: " << i2c_data
- << ")\n";
-
- // Do some bounds checking to avoid seg faults
- if(srid > D_MAX_RID)
- return;
-
- pmt_t owner = d_rids[srid].owner;
-
- // Return the RID
- d_rids[srid].owner = PMT_NIL;
-
- if((port = tx_port_index(owner)) != -1)
- d_tx[port]->send(s_response_from_control_channel,
- pmt_list4(invocation_handle,
- PMT_T,
- pmt_list2(s_op_i2c_read_reply,
- pmt_list3(pmt_from_long(urid),
- i2c_addr,
- i2c_data)),
- pmt_from_long(pkt->timestamp())));
- }
-
- //------------------ SPI READ REPLY -------------------//
- else if(pmt_eq(op_symbol, s_op_spi_read_reply)) {
-
- long srid = pmt_to_long(pmt_nth(1, sub_packet));
- pmt_t spi_data = pmt_nth(2, sub_packet);
-
- long urid = d_rids[srid].user_rid;
-
- if(verbose)
- std::cout << "[USRP_SERVER] Found SPI read reply "
- << "("
- << "URID: " << urid << ", "
- << "SRID: " << srid << ", "
- << "Data: " << spi_data
- << ")\n";
-
- // Bounds check the RID
- if(srid > D_MAX_RID)
- return;
-
- pmt_t owner = d_rids[srid].owner;
-
- // Return the RID
- d_rids[srid].owner = PMT_NIL;
-
- if((port = tx_port_index(owner)) != -1)
- d_tx[port]->send(s_response_from_control_channel,
- pmt_list4(invocation_handle,
- PMT_T,
- pmt_list2(s_op_spi_read_reply,
- pmt_list2(pmt_from_long(urid),
- spi_data)),
- pmt_from_long(pkt->timestamp())));
- }
-
- // Each subpacket has an unaccounted for 2 bytes which is the opcode
- // and the length field
- curr_payload += len + 2;
-
- // All subpackets are 32-bit aligned
- int align_offset = 4 - (curr_payload % 4);
-
- if(align_offset != 4)
- curr_payload += align_offset;
- }
-}
-
-/*!
- * \brief Used to recall all incoming signals that were deferred when USRP
- * server was in the initialization state.
- */
-void
-usrp_server::recall_defer_queue()
-{
-
- std::vector<mb_message_sptr> recall;
-
- while(!d_defer_queue.empty()) {
- recall.push_back(d_defer_queue.front());
- d_defer_queue.pop();
- }
-
- // Parse the messages that were queued while waiting for an open response
- for(int i=0; i < (int)recall.size(); i++)
- handle_message(recall[i]);
-
- return;
-}
-
-/*!
- * \brief Commonly called by any method which handles outgoing frames or control
- * packets to the USRP to check if the port on which the signal was sent owns
- * the channel the outgoing packet will be associated with. This helps ensure
- * that applications do not send data on other application's ports.
- *
- * The \p port parameter is the port symbol that the caller wishes to determine
- * owns the channel specified by \p chan_info.
- *
- * The \p signal_info parameter is a PMT list containing two elements: the
- * response signal to use if the permissions are invalid, and the invocation
- * handle that was passed. This allows the method to generate detailed failure
- * responses to signals without having to return some sort of structured
- * information which the caller must then parse and interpret to determine the
- * failure type.
- *
- * \returns true if \p port owns the channel specified by \p chan_info, false
- * otherwise.
- */
-bool
-usrp_server::check_valid(mb_port_sptr port,
- long channel,
- std::vector<struct channel_info> &chan_info,
- pmt_t signal_info)
-{
-
- pmt_t response_signal = pmt_nth(0, signal_info);
- pmt_t invocation_handle = pmt_nth(1, signal_info);
-
- // not a valid channel number?
- if(channel >= (long)chan_info.size() && channel != CONTROL_CHAN) {
- port->send(response_signal,
- pmt_list2(invocation_handle,
- s_err_channel_invalid));
-
- if(verbose)
- std::cout << "[USRP_SERVER] Invalid channel number for event "
- << response_signal << std::endl;
- return false;
- }
-
- // not the owner of the port?
- if(chan_info[channel].owner != port->port_symbol()) {
- port->send(response_signal,
- pmt_list2(invocation_handle,
- s_err_channel_permission_denied));
-
- if(verbose)
- std::cout << "[USRP_SERVER] Invalid permissions"
- << " for " << response_signal
- << " from " << port->port_symbol()
- << " proper owner is " << chan_info[channel].owner
- << " on channel " << channel
- << " invocation " << invocation_handle
- << std::endl;
- return false;
- }
-
- return true;
-}
-
-/*!
- * \brief Finds the next available RID for internal USRP server use with control
- * and status packets.
- *
- * \returns the next valid RID or -1 if no more RIDs are available.
- */
-long
-usrp_server::next_rid()
-{
- for(int i = 0; i < D_MAX_RID; i++)
- if(pmt_eqv(d_rids[i].owner, PMT_NIL))
- return i;
-
- if(verbose)
- std::cout << "[USRP_SERVER] No RIDs left\n";
- return -1;
-}
-
-/*!
- * \brief Called by handle_message() when USRP server gets a response that the
- * USRP was opened successfully to initialize the registers using the new
- * register read/write control packets.
- */
-void
-usrp_server::initialize_registers()
-{
- // We use handle_cmd_to_control_channel() to create the register writes using
- // PMT_NIL as the response port to tell usrp_server not to pass the response
- // up to any application.
- if(verbose)
- std::cout << "[USRP_SERVER] Initializing registers...\n";
-
- // RX mode to normal (0)
- set_register(FR_MODE, 0);
-
- // FPGA debugging?
- if(d_fpga_debug) {
- set_register(FR_DEBUG_EN, 1);
- // FIXME: need to figure out exact register writes to control daughterboard
- // pins that need to be written to
- } else {
- set_register(FR_DEBUG_EN, 0);
- }
-
- // Set the transmit sample rate divisor, which is 4-1
- set_register(FR_TX_SAMPLE_RATE_DIV, 3);
-
- // Dboard IO buffer and register settings
- set_register(FR_OE_0, (0xffff << 16) | 0x0000);
- set_register(FR_IO_0, (0xffff << 16) | 0x0000);
- set_register(FR_OE_1, (0xffff << 16) | 0x0000);
- set_register(FR_IO_1, (0xffff << 16) | 0x0000);
- set_register(FR_OE_2, (0xffff << 16) | 0x0000);
- set_register(FR_IO_2, (0xffff << 16) | 0x0000);
- set_register(FR_OE_3, (0xffff << 16) | 0x0000);
- set_register(FR_IO_3, (0xffff << 16) | 0x0000);
-
- // zero Tx side Auto Transmit/Receive regs
- set_register(FR_ATR_MASK_0, 0);
- set_register(FR_ATR_TXVAL_0, 0);
- set_register(FR_ATR_RXVAL_0, 0);
- set_register(FR_ATR_MASK_1, 0);
- set_register(FR_ATR_TXVAL_1, 0);
- set_register(FR_ATR_RXVAL_1, 0);
- set_register(FR_ATR_MASK_2, 0);
- set_register(FR_ATR_TXVAL_2, 0);
- set_register(FR_ATR_RXVAL_2, 0);
- set_register(FR_ATR_MASK_3, 0);
- set_register(FR_ATR_TXVAL_3, 0);
- set_register(FR_ATR_RXVAL_3, 0);
-
- // Configure TX mux, this is a hacked value
- set_register(FR_TX_MUX, 0x00000081);
-
- // Set the interpolation rate, which is the rate divided by 4, minus 1
- set_register(FR_INTERP_RATE, (d_interp_tx/4)-1);
-
- // Apparently this register changes again
- set_register(FR_TX_MUX, 0x00000981);
-
- // Set the receive sample rate divisor, which is 2-1
- set_register(FR_RX_SAMPLE_RATE_DIV, 1);
-
- // DC offset
- set_register(FR_DC_OFFSET_CL_EN, 0x0000000f);
-
- // Reset the DC correction offsets
- set_register(FR_ADC_OFFSET_0, 0);
- set_register(FR_ADC_OFFSET_1, 0);
-
- // Some hard-coded RX configuration
- set_register(FR_RX_FORMAT, 0x00000300);
- set_register(FR_RX_MUX, 1);
-
- // RX decimation rate is divided by two, then subtract 1
- set_register(FR_DECIM_RATE, (d_decim_rx/2)-1);
-
- // More hard coding
- set_register(FR_RX_MUX, 0x000e4e41);
-
- // Resetting RX registers
- set_register(FR_RX_PHASE_0, 0);
- set_register(FR_RX_PHASE_1, 0);
- set_register(FR_RX_PHASE_2, 0);
- set_register(FR_RX_PHASE_3, 0);
- set_register(FR_RX_FREQ_0, 0x28000000);
- set_register(FR_RX_FREQ_1, 0);
- set_register(FR_RX_FREQ_2, 0);
- set_register(FR_RX_FREQ_3, 0);
-
- // Enable debug bus
- set_register(FR_DEBUG_EN, 0xf);
- set_register(FR_OE_0, -1);
- set_register(FR_OE_1, -1);
- set_register(FR_OE_2, -1);
- set_register(FR_OE_3, -1);
-
- // DEBUGGING
- //check_register_initialization();
-}
-
-// FIXME: used for debugging to determine if all the registers are actually
-// being set correctly
-void
-usrp_server::check_register_initialization()
-{
- // RX mode to normal (0)
- read_register(FR_MODE);
-
- // FPGA debugging?
- if(d_fpga_debug) {
- read_register(FR_DEBUG_EN);
- // FIXME: need to figure out exact register writes to control daughterboard
- // pins that need to be written to
- } else {
- read_register(FR_DEBUG_EN);
- }
-
- // Set the transmit sample rate divisor, which is 4-1
- read_register(FR_TX_SAMPLE_RATE_DIV);
-
- // Dboard IO buffer and register settings
- read_register(FR_OE_0);
- read_register(FR_IO_0);
- read_register(FR_OE_1);
- read_register(FR_IO_1);
- read_register(FR_OE_2);
- read_register(FR_IO_2);
- read_register(FR_OE_3);
- read_register(FR_IO_3);
-
- // zero Tx side Auto Transmit/Receive regs
- read_register(FR_ATR_MASK_0);
- read_register(FR_ATR_TXVAL_0);
- read_register(FR_ATR_RXVAL_0);
- read_register(FR_ATR_MASK_1);
- read_register(FR_ATR_TXVAL_1);
- read_register(FR_ATR_RXVAL_1);
- read_register(FR_ATR_MASK_2);
- read_register(FR_ATR_TXVAL_2);
- read_register(FR_ATR_RXVAL_2);
- read_register(FR_ATR_MASK_3);
- read_register(FR_ATR_TXVAL_3);
- read_register(FR_ATR_RXVAL_3);
-
- // Configure TX mux, this is a hacked value
- read_register(FR_TX_MUX);
-
- // Set the interpolation rate, which is the rate divided by 4, minus 1
- read_register(FR_INTERP_RATE);
-
- // Apparently this register changes again
- read_register(FR_TX_MUX);
-
- // Set the receive sample rate divisor, which is 2-1
- read_register(FR_RX_SAMPLE_RATE_DIV);
-
- // DC offset
- read_register(FR_DC_OFFSET_CL_EN);
-
- // Reset the DC correction offsets
- read_register(FR_ADC_OFFSET_0);
- read_register(FR_ADC_OFFSET_1);
-
- // Some hard-coded RX configuration
- read_register(FR_RX_FORMAT);
- read_register(FR_RX_MUX);
-
- // RX decimation rate is divided by two, then subtract 1
- read_register(FR_DECIM_RATE);
-
- // More hard coding
- read_register(FR_RX_MUX);
-
- // Resetting RX registers
- read_register(FR_RX_PHASE_0);
- read_register(FR_RX_PHASE_1);
- read_register(FR_RX_PHASE_2);
- read_register(FR_RX_PHASE_3);
- read_register(FR_RX_FREQ_0);
- read_register(FR_RX_FREQ_1);
- read_register(FR_RX_FREQ_2);
- read_register(FR_RX_FREQ_3);
-}
-
-/*!
- * \brief Used to generate FPGA register write commands to reset all of the FPGA
- * registers to a value of 0.
- */
-void
-usrp_server::reset_all_registers()
-{
- for(int i=0; i<64; i++)
- set_register(i, 0);
-}
-
-/*!
- * \brief Used internally by USRP server to generate a control/status packet
- * which contains a register write.
- *
- * The \p reg parameter is the register number that the value \p val will be
- * written to.
- */
-void
-usrp_server::set_register(long reg, long val)
-{
- size_t psize;
- long payload_len = 0;
-
- pmt_t v_packet = pmt_make_u8vector(sizeof(transport_pkt), 0);
- transport_pkt *pkt = (transport_pkt *) pmt_u8vector_writable_elements(v_packet, psize);
-
- pkt->set_header(0, CONTROL_CHAN, 0, payload_len);
- pkt->set_timestamp(0xffffffff);
-
- pkt->cs_write_reg(reg, val);
-
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(PMT_NIL,
- pmt_from_long(CONTROL_CHAN),
- v_packet));
-}
-
-/*!
- * \brief Used internally by USRP server to generate a control/status packet
- * which contains a register read. This is important to use internally so that
- * USRP server can bypass the use of RIDs with register reads, as they are not
- * needed and it would use up the finite number of RIDs available for use for
- * applications to receive responses.
- *
- * The \p reg parameter is the register number that the value should be read
- * from.
- */
-void
-usrp_server::read_register(long reg)
-{
- size_t psize;
- long payload_len = 0;
-
- pmt_t v_packet = pmt_make_u8vector(sizeof(transport_pkt), 0);
- transport_pkt *pkt = (transport_pkt *) pmt_u8vector_writable_elements(v_packet, psize);
-
- pkt->set_header(0, CONTROL_CHAN, 0, payload_len);
- pkt->set_timestamp(0xffffffff);
-
- pkt->cs_read_reg(0, reg);
-
- d_cs_usrp->send(s_cmd_usrp_write,
- pmt_list3(PMT_NIL,
- pmt_from_long(CONTROL_CHAN),
- v_packet));
-}
-
-REGISTER_MBLOCK_CLASS(usrp_server);
diff --git a/usrp/limbo/inband/usrp_server.h b/usrp/limbo/inband/usrp_server.h
deleted file mode 100644
index dd1825d57..000000000
--- a/usrp/limbo/inband/usrp_server.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_SERVER_H
-#define INCLUDED_USRP_SERVER_H
-
-#include <mblock/mblock.h>
-#include <vector>
-#include <queue>
-#include <fstream>
-#include <usrp_inband_usb_packet.h>
-
-typedef usrp_inband_usb_packet transport_pkt; // makes conversion to gigabit easy
-
-/*!
- * \brief Implements the lowest-level mblock usb_interface to the USRP
- */
-class usrp_server : public mb_mblock
-{
-public:
-
- // our ports
- enum port_types {
- RX_PORT = 0,
- TX_PORT = 1
- };
- static const int N_PORTS = 4;
- std::vector<mb_port_sptr> d_tx, d_rx;
- mb_port_sptr d_cs;
- mb_port_sptr d_cs_usrp;
-
- static const int D_USB_CAPACITY = 32 * 1024 * 1024;
- static const int D_MAX_CHANNELS = 16;
- long d_ntx_chan;
- long d_nrx_chan;
-
- pmt_t d_usrp_dict;
-
- bool d_fpga_debug;
-
- long d_interp_tx;
- long d_decim_rx;
-
- // Keep track of the request IDs
- struct rid_info {
- pmt_t owner;
- long user_rid;
-
- rid_info() {
- owner = PMT_NIL;
- user_rid = 0;
- }
- };
-
- static const long D_MAX_RID = 64;
- std::vector<rid_info> d_rids;
-
- struct channel_info {
- long assigned_capacity; // the capacity currently assignedby the channel
- pmt_t owner; // port ID of the owner of the channel
-
- channel_info() {
- assigned_capacity = 0;
- owner = PMT_NIL;
- }
- };
-
- long d_rx_chan_mask; // A bitmask representing the channels in the
- // receiving state
-
- std::vector<struct channel_info> d_chaninfo_tx;
- std::vector<struct channel_info> d_chaninfo_rx;
-
- std::queue<mb_message_sptr> d_defer_queue;
-
- bool d_defer;
- bool d_opened;
-
- bool d_fake_rx;
-
-public:
- usrp_server(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_server();
-
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
-protected:
- static int max_capacity() { return D_USB_CAPACITY; }
-
-private:
- void handle_cmd_allocate_channel(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- void handle_cmd_deallocate_channel(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- void handle_cmd_xmit_raw_frame(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- void handle_cmd_to_control_channel(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- void handle_cmd_start_recv_raw_samples(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- void handle_cmd_stop_recv_raw_samples(mb_port_sptr port, std::vector<struct channel_info> &chan_info, pmt_t data);
- int rx_port_index(pmt_t port_id);
- int tx_port_index(pmt_t port_id);
- long current_capacity_allocation();
- void recall_defer_queue();
- void reset_channels();
- void handle_response_usrp_read(pmt_t data);
- bool check_valid(mb_port_sptr port, long channel, std::vector<struct channel_info> &chan_info, pmt_t signal_info);
- void parse_control_pkt(pmt_t invocation_handle, transport_pkt *pkt);
- long next_rid();
- void initialize_registers();
- void set_register(long reg, long val);
- void read_register(long reg);
- void check_register_initialization();
- void reset_all_registers();
-};
-
-#endif /* INCLUDED_USRP_SERVER_H */
diff --git a/usrp/limbo/inband/usrp_server.mbh b/usrp/limbo/inband/usrp_server.mbh
deleted file mode 100644
index ed7943fc3..000000000
--- a/usrp/limbo/inband/usrp_server.mbh
+++ /dev/null
@@ -1,255 +0,0 @@
-;; -*- scheme -*- ; not really, but tells emacs how to format this
-;;
-;; Copyright 2007 Free Software Foundation, Inc.
-;;
-;; 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 this program; if not, write to the Free Software Foundation, Inc.,
-;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;
-
-;; ----------------------------------------------------------------
-;; This is an mblock header file
-;;
-;; The format is very much a work-in-progress.
-;; It'll be compiled to C++.
-;; ----------------------------------------------------------------
-
-;; In the outgoing messages described below, invocation-handle is an
-;; identifier provided by the client to tag the method invocation.
-;; The identifier will be returned with the response, to provide the
-;; client with a mechanism to match asynchronous responses with the
-;; commands that generate them. The value of the invocation-handle is
-;; opaque the the server, and is not required by the server to be
-;; unique.
-;;
-;; In the incoming messages described below, invocation-handle is the
-;; identifier provided by the client in the prompting invocation. The
-;; identifier is returned with the response, so that the client has a
-;; mechanism to match asynchronous responses with the commands that
-;; generated them.
-;;
-;; status is either #t, indicating success, or a symbol indicating an error.
-;; All symbol's names shall begin with %error-
-
-
-;; ----------------------------------------------------------------
-;; usrp-channel
-;;
-;; The protocol class is defined from the client's point-of-view.
-;; (The client port is unconjugated, the server port is conjugated.)
-
-(define-protocol-class usrp-channel
-
- (:outgoing
-
- (cmd-allocate-channel invocation-handle capacity-reservation)
-
- ;; The cmd-allocate-channel message requests that the server
- ;; allocates a logical channel in the FPGA for use.
- ;; capacity-reservation specifies the number of bytes/s of
- ;; interconnect capacity (USB or ethernet) to reserve for this
- ;; channel. (The reservation is just a sanity check, no OS
- ;; specific mechanism is used.)
-
- (cmd-deallocate-channel invocation-handle channel)
-
- ;; The integer channel specifies the channel to deallocate.
-
- )
-
- (:incoming
-
-
- (response-allocate-channel invocation-handle status channel)
-
- ;; If successful, a channel the specified capacity was allocated.
- ;; channel, an integer, indicates which channel was allocated.
-
- (response-deallocate-channel invocation-handle status)
-
- ;; If successful, the specified channel and associated interconnect
- ;; capacity were deallocated.
-
- )
- )
-
-;; ----------------------------------------------------------------
-;; usrp-low-level-cs
-;;
-;; The protocol class is defined from the client's point-of-view.
-;; (The client port is unconjugated, the server port is conjugated.)
-;;
-;; This defines a low level control and status interface to the usrp.
-;; This will probably be replaced (or at least augmented) with a
-;; higher level interface. For now, this will allow us to get on
-;; the air.
-;;
-;; The subpackets are lists containing the relevant parameters. The
-;; server will marshall them appropriately. Below is a list of
-;; subpackets. See inband-signaling-usb for details. The opcodes are
-;; symbols; unless otherwise indicated the remaining parameters are
-;; integers. rid values are limited to 3-bits.
-;;
-;; (op-ping-fixed rid ping-value)
-;; (op-ping-fixed-reply rid ping-value)
-;; (op-write-reg reg-number reg-value)
-;; (op-write-reg-masked reg-number reg-value mask-value)
-;; (op-read-reg rid reg-number)
-;; (op-read-reg-reply rid reg-number reg-value)
-;; (op-i2c-write i2c-addr u8-vec)
-;; (op-i2c-read rid i2c-addr nbytes)
-;; (op-i2c-read-reply rid i2c-addr u8-vec)
-;; (op-spi-write enables format opt-header-bytes u8-vec)
-;; (op-spi-read rid enables format opt-header-bytes nbytes)
-;; (op-spi-read-reply rid u8-vec)
-;; (op-delay ticks)
-
-
-(define-protocol-class usrp-low-level-cs
-
- (:outgoing
-
- (cmd-to-control-channel invocation-handle list-of-subpackets)
-
- )
-
- (:incoming
-
- (response-from-control-channel invocation-handle status list-of-subpackets timestamp)
-
- )
- )
-
-;; ----------------------------------------------------------------
-;; usrp-tx
-;;
-;; The protocol class is defined from the client's point-of-view.
-;; (The client port is unconjugated, the server port is conjugated.)
-
-(define-protocol-class usrp-tx
- (:include usrp-channel)
- (:include usrp-low-level-cs)
-
- (:outgoing
-
- (cmd-xmit-raw-frame invocation-handle channel samples timestamp properties)
-
- ;; The argument channel must be an integer. It specifies the
- ;; channel on which the frame of samples will be be sent.
- ;;
- ;; samples must be a uniform numeric vector. The contents of the
- ;; sample vector is treated as opaque and is passed on to the FPGA
- ;; unmodified. It is the responsibility of the sender to ensure
- ;; that the binary format is sensible for the current FPGA
- ;; configuration.
- ;;
- ;; timestamp is a 32-bit integer that specifies the time at which
- ;; the first sample in samples shall be sent to the D/A converter.
- ;; The format and interpration of time is specified in the file
- ;; inband-signaling-usb
- )
-
- (:incoming
-
- (response-xmit-raw-frame invocation-handle status)
-
- ;; If successful, the samples of the associated frame have been
- ;; transmitted to the USRP. This message may be used to implement
- ;; Tx flow control. The client could for example implement a
- ;; policy of never having more than 4 unacknowledged
- ;; cmd-xmit-raw-frame's outstanding.
-
- )
- )
-
-;; ----------------------------------------------------------------
-;; usrp-rx
-;;
-;; The protocol class is defined from the client's point-of-view.
-;; (The client port is unconjugated, the server port is conjugated.)
-
-(define-protocol-class usrp-rx
- (:include usrp-channel)
- (:include usrp-low-level-cs)
-
- (:outgoing
-
- (cmd-start-recv-raw-samples invocation-handle channel)
-
- ;; The argument channel must be an integer. It specifies the
- ;; channel from which frames of samples will be be received. The
- ;; server will return response-recv-raw-samples messages until a
- ;; cmd-stop-recv-raw-samples message is received.
-
- (cmd-stop-recv-raw-samples invocation-handle channel)
-
- ;; The argument channel must be an integer. There is no reply to
- ;; this message.
-
- )
-
- (:incoming
-
- (response-recv-raw-samples invocation-handle status samples timestamp channel properties)
-
- ;; samples is a uniform numeric vector. The contents of the sample
- ;; vector is treated as opaque and is passed from the FPGA
- ;; unmodified. It is the responsibility of the receiver to decode
- ;; the binary format as appropriate for the current FPGA
- ;; configuration.
- ;;
- ;; timestamp is a 32-bit integer that specifies the time at which
- ;; the first sample in samples was received from the A/D converter.
- ;; The format and interpretation of time is as specified in the
- ;; file inband-signaling-usb.
- ;;
- ;; properties is a dictionary containing additional (key, value)
- ;; pairs associated with the reception of these samples. In
- ;; particular, the map may contain the Received Signal Strength
- ;; Indication (RSSI) reported by the front end at the time the
- ;; first sample was received from the A/D.
-
- )
- )
-
-
-;; ----------------------------------------------------------------
-;; usrp-server-cs
-;;
-;; Control and status port for usrp-server
-;;
-;; The protocol class is defined from the client's point-of-view.
-;; (The client port is unconjugated, the server port is conjugated.)
-
-(define-protocol-class usrp-server-cs
-
- (:outgoing
- (cmd-open invocation-handle which-usrp)
- (cmd-close invocation-handle)
- (cmd-max-capacity invocation-handle)
- (cmd-ntx-chan invocation-handle)
- (cmd-nrx-chan invocation-handle)
- (cmd-current-capacity-allocation invocation-handle)
- )
-
- (:incoming
- (response-open invocation-handle status)
- (response-close invocation-handle status)
- (response-max-capacity invocation-handle status capacity)
- (response-ntx-chan invocation-handle status ntx-chan)
- (response-nrx-chan invocation-handle status nrx-chan)
- (response-current-capacity-allocation invocation-handle status capacity)
- )
- )
diff --git a/usrp/limbo/inband/usrp_tx.cc b/usrp/limbo/inband/usrp_tx.cc
deleted file mode 100644
index 0d4a84619..000000000
--- a/usrp/limbo/inband/usrp_tx.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_tx.h>
-#include <iostream>
-#include <usb.h>
-#include <mblock/class_registry.h>
-#include <usrp_inband_usb_packet.h>
-#include <fpga_regs_common.h>
-#include <usrp_standard.h>
-#include <stdio.h>
-
-#include <symbols_usrp_tx_cs.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-static const bool verbose = false;
-
-usrp_tx::usrp_tx(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_disk_write(false)
-{
- d_cs = define_port("cs", "usrp-tx-cs", true, mb_port::EXTERNAL);
-
- //d_disk_write=true;
-
- if(d_disk_write) {
- d_ofile.open("tx_data.dat",std::ios::binary|std::ios::out);
- d_cs_ofile.open("tx_cs.dat",std::ios::binary|std::ios::out);
- }
-}
-
-usrp_tx::~usrp_tx()
-{
- if(d_disk_write) {
- d_ofile.close();
- d_cs_ofile.close();
- }
-}
-
-void
-usrp_tx::initial_transition()
-{
-
-}
-
-/*!
- * \brief Handles incoming signals to to the m-block, wihch should only ever be
- * a single message: cmd-usrp-tx-write.
- */
-void
-usrp_tx::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t port_id = msg->port_id();
- pmt_t data = msg->data();
-
- // Theoretically only have 1 message to ever expect, but
- // want to make sure its at least what we want
- if(pmt_eq(port_id, d_cs->port_symbol())) {
-
- if(pmt_eqv(event, s_cmd_usrp_tx_write))
- write(data);
- }
-}
-
-/*!
- * \brief Performs the actual writing of data to the USB bus, called by
- * handle_message() when a cmd-usrp-tx-write signal is received.
- *
- * The \p data parameter is a PMT list which contains three mandatory elements,
- * in the following order: an invocation handle, a channel, and a uniform vector
- * of memory which contains the packets to be written to the bus.
- */
-void
-usrp_tx::write(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t channel = pmt_nth(1, data);
- pmt_t v_packets = pmt_nth(2, data);
- d_utx = boost::any_cast<usrp_standard_tx_sptr>(pmt_any_ref(pmt_nth(3, data)));
-
- size_t n_bytes;
- bool underrun; // this will need to go, as it is taken care of in the packet headers
-
- transport_pkt *pkts = (transport_pkt *) pmt_u8vector_writable_elements(v_packets, n_bytes);
-
- int ret = d_utx->write (pkts, n_bytes, &underrun);
-
- if (0 && underrun)
- fprintf(stderr, "uU");
-
- if (ret == (int) n_bytes) {
- if (verbose)
- std::cout << "[usrp_server] Write of " << n_bytes << " successful\n";
- // need to respond with the channel so the USRP server knows who to forward the result of
- // the write to by looking up the owner of the channel
- d_cs->send(s_response_usrp_tx_write,
- pmt_list3(invocation_handle, PMT_T, channel));
- }
- else {
- if (verbose)
- std::cout << "[usrp_server] Error writing " << n_bytes << " bytes to USB bus\n";
- d_cs->send(s_response_usrp_tx_write,
- pmt_list3(invocation_handle, PMT_F, channel));
- }
-
- long n_packets =
- static_cast<long>(std::ceil(n_bytes / (double)transport_pkt::max_pkt_size()));
-
- for(int i=0; i < n_packets; i++) {
-
- if(d_disk_write) {
- if(pkts[i].chan() == CONTROL_CHAN)
- d_cs_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size());
- else
- d_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size());
-
- d_cs_ofile.flush();
- d_ofile.flush();
- }
- }
-
-
- return;
-}
-
-REGISTER_MBLOCK_CLASS(usrp_tx);
diff --git a/usrp/limbo/inband/usrp_tx.h b/usrp/limbo/inband/usrp_tx.h
deleted file mode 100644
index d3a6f8b54..000000000
--- a/usrp/limbo/inband/usrp_tx.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_TX_H
-#define INCLUDED_USRP_TX_H
-
-#include <mblock/mblock.h>
-#include <fstream>
-#include "usrp_standard.h"
-
-/*!
- * \brief Implements the low level usb interface to the USRP
- */
-class usrp_tx : public mb_mblock
-{
- mb_port_sptr d_cs;
- usrp_standard_tx_sptr d_utx;
-
- bool d_disk_write;
- std::ofstream d_ofile;
- std::ofstream d_cs_ofile;
-
- public:
- usrp_tx(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_tx();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- private:
- void write(pmt_t data);
-};
-
-
-#endif /* INCLUDED_USRP_TX_H */
-
diff --git a/usrp/limbo/inband/usrp_tx_stub.cc b/usrp/limbo/inband/usrp_tx_stub.cc
deleted file mode 100644
index c78b1a7b8..000000000
--- a/usrp/limbo/inband/usrp_tx_stub.cc
+++ /dev/null
@@ -1,344 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <iostream>
-#include <vector>
-#include <usb.h>
-#include <mblock/class_registry.h>
-#include <usrp_tx_stub.h>
-#include <usrp_inband_usb_packet.h>
-#include <fpga_regs_common.h>
-#include "usrp_standard.h"
-#include <stdio.h>
-#include <fstream>
-#include <usrp_rx_stub.h>
-
-#include <symbols_usrp_tx_cs.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-static const bool verbose = false;
-
-usrp_tx_stub::usrp_tx_stub(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_disk_write(false)
-{
- d_cs = define_port("cs", "usrp-tx-cs", true, mb_port::EXTERNAL);
-
- //d_disk_write=true;
-
- if(d_disk_write) {
- d_ofile.open("tx_stub_data.dat",std::ios::binary|std::ios::out);
- d_cs_ofile.open("tx_stub_cs.dat",std::ios::binary|std::ios::out);
- }
-}
-
-usrp_tx_stub::~usrp_tx_stub()
-{
- if(d_disk_write) {
- d_ofile.close();
- d_cs_ofile.close();
- }
-}
-
-void
-usrp_tx_stub::initial_transition()
-{
-
-}
-
-void
-usrp_tx_stub::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal();
- pmt_t port_id = msg->port_id();
- pmt_t data = msg->data();
-
- // Theoretically only have 1 message to ever expect, but
- // want to make sure its at least what we want
- if(pmt_eq(port_id, d_cs->port_symbol())) {
-
- if(pmt_eqv(event, s_cmd_usrp_tx_write))
- write(data);
- }
-}
-
-void
-usrp_tx_stub::write(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t channel = pmt_nth(1, data);
- pmt_t v_packets = pmt_nth(2, data);
- d_utx = boost::any_cast<usrp_standard_tx *>(pmt_any_ref(pmt_nth(3, data)));
-
- size_t n_bytes;
-
- transport_pkt *pkts = (transport_pkt *) pmt_u8vector_writable_elements(v_packets, n_bytes);
- long n_packets = static_cast<long>(std::ceil(n_bytes / (double)transport_pkt::max_pkt_size()));
-
- // Parse the packets looking for C/S packets and dump them to a disk if
- // necessary
- for(long i=0; i<n_packets; i++) {
-
- if(d_disk_write) {
- if(pkts[i].chan() == CONTROL_CHAN)
- d_cs_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size());
- else
- d_ofile.write((const char *)&pkts[i], transport_pkt::max_pkt_size());
-
- d_cs_ofile.flush();
- d_ofile.flush();
- }
-
- if(pkts[i].chan() == CONTROL_CHAN)
- parse_cs(invocation_handle, pkts[i]);
- }
-
- d_cs->send(s_response_usrp_tx_write,
- pmt_list3(invocation_handle, PMT_T, channel));
-
- return;
-}
-
-void
-usrp_tx_stub::parse_cs(pmt_t invocation_handle, transport_pkt pkt)
-{
-
- long payload_len = pkt.payload_len();
- long curr_payload = 0;
-
- size_t ignore;
-
- // There is the possibility that the responses for a single USB packet full of
- // CS packets will not fit back in a single USB packet, considering some
- // responses are greater than their commands (read registers).
- new_packet:
- pmt_t v_pkt = pmt_make_u8vector(sizeof(transport_pkt), 0);
-
- transport_pkt *q_pkt =
- (transport_pkt *) pmt_u8vector_writable_elements(v_pkt, ignore);
-
- q_pkt->set_header(0, CONTROL_CHAN, 0, 0);
- q_pkt->set_timestamp(0xffffffff);
-
- // We dispatch based on the control packet type, however we can extract the
- // opcode and the length immediately which is consistent in all responses.
- //
- // Since each control packet can have multiple responses, we keep reading the
- // lengths of each subpacket until we reach the payload length.
- while(curr_payload < payload_len) {
-
- pmt_t sub_packet = pkt.read_subpacket(curr_payload);
- pmt_t op_symbol = pmt_nth(0, sub_packet);
-
- int len = pkt.cs_len(curr_payload);
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Parsing subpacket "
- << op_symbol << " ... length " << len << std::endl;
-
- //----------------- PING FIXED ------------------//
- if(pmt_eq(op_symbol, s_op_ping_fixed)) {
-
- long rid = pmt_to_long(pmt_nth(1, sub_packet));
- long pingval = pmt_to_long(pmt_nth(2, sub_packet));
-
- // Generate a reply and put it in the queue for the RX stub to read
- if(!q_pkt->cs_ping_reply(rid, pingval))
- goto new_packet;
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Generated ping response "
- << "("
- << "RID: " << rid << ", "
- << "VAL: " << pingval
- << ")\n";
- }
-
- //----------------- READ REG ------------------//
- if(pmt_eq(op_symbol, s_op_read_reg)) {
-
- long rid = pmt_to_long(pmt_nth(1, sub_packet));
- long reg_num = pmt_to_long(pmt_nth(2, sub_packet));
- long reg_val = 0xdeef;
-
- // Generate a reply and put it in the queue for the RX stub to read
- if(!q_pkt->cs_read_reg_reply(rid, reg_num, reg_val))
- goto new_packet;
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Generated read register response "
- << "("
- << "RID: " << rid << ", "
- << "REG: " << reg_num << ", "
- << "VAL: " << reg_val
- << ")\n";
- }
-
- //----------------- DELAY ------------------//
- if(pmt_eq(op_symbol, s_op_delay)) {
-
- long ticks = pmt_to_long(pmt_nth(1, sub_packet));
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received delay command "
- << "("
- << "Ticks: " << ticks
- << ")\n";
- }
-
- //----------------- WRITE REG ------------------//
- if(pmt_eq(op_symbol, s_op_write_reg)) {
-
- pmt_t reg_num = pmt_nth(1, sub_packet);
- pmt_t reg_val = pmt_nth(2, sub_packet);
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received write register command "
- << "("
- << "RegNum: " << reg_num << ", "
- << "Val: " << reg_val
- << ")\n";
- }
-
- //----------------- WRITE REG MASK ---------------//
- if(pmt_eq(op_symbol, s_op_write_reg_masked)) {
-
- pmt_t reg_num = pmt_nth(1, sub_packet);
- pmt_t reg_val = pmt_nth(2, sub_packet);
- pmt_t mask = pmt_nth(3, sub_packet);
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received write register command "
- << "("
- << "RegNum: " << reg_num << ", "
- << "Val: " << reg_val << ", "
- << "Mask: " << mask
- << ")\n";
- }
-
- //---------------- I2C WRITE ------------------//
- if(pmt_eq(op_symbol, s_op_i2c_write)) {
- pmt_t i2c_addr = pmt_nth(1, sub_packet);
- pmt_t i2c_data = pmt_nth(2, sub_packet);
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received i2c write command "
- << "("
- << "Addr: " << i2c_addr << ", "
- << "Data: " << i2c_data
- << ")\n";
- }
-
- //---------------- I2C READ ------------------//
- if(pmt_eq(op_symbol, s_op_i2c_read)) {
- long rid = pmt_to_long(pmt_nth(1, sub_packet));
- long i2c_addr = pmt_to_long(pmt_nth(2, sub_packet));
- long i2c_bytes = pmt_to_long(pmt_nth(3, sub_packet));
-
- // Create data to place as a response, filled with 0xff
- size_t ignore;
- pmt_t i2c_data = pmt_make_u8vector(i2c_bytes, 0xff);
- uint8_t *w_data = (uint8_t *) pmt_u8vector_writable_elements(i2c_data, ignore);
-
- // Generate a reply and put it in the queue for the RX stub to read
- if(!q_pkt->cs_i2c_read_reply(rid, i2c_addr, w_data, i2c_bytes))
- goto new_packet;
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received i2c read "
- << "("
- << "RID: " << rid << ", "
- << "Addr: " << i2c_addr << ", "
- << "Bytes: " << i2c_bytes
- << ")\n";
- }
-
- //---------------- SPI WRITE ------------------//
- if(pmt_eq(op_symbol, s_op_spi_write)) {
- long enables = pmt_to_long(pmt_nth(1, sub_packet));
- long format = pmt_to_long(pmt_nth(2, sub_packet));
- long opt = pmt_to_long(pmt_nth(3, sub_packet));
- pmt_t data = pmt_nth(4, sub_packet);
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received spi write command "
- << "("
- << "Enables: " << enables << ", "
- << "Format: " << format << ", "
- << "Options: " << opt << ", "
- << "Data: " << data
- << ")\n";
- }
-
- //---------------- SPI READ ------------------//
- if(pmt_eq(op_symbol, s_op_spi_read)) {
- long rid = pmt_to_long(pmt_nth(1, sub_packet));
- long enables = pmt_to_long(pmt_nth(2, sub_packet));
- long format = pmt_to_long(pmt_nth(3, sub_packet));
- long opt = pmt_to_long(pmt_nth(4, sub_packet));
- long n_bytes = pmt_to_long(pmt_nth(5, sub_packet));
-
- // Create data to place as a fake response
- size_t ignore;
- pmt_t spi_data = pmt_make_u8vector(n_bytes, 0xff);
- uint8_t *w_data = (uint8_t *) pmt_u8vector_writable_elements(spi_data, ignore);
-
- // Generate a reply and put it in the queue for the RX stub to read
- if(!q_pkt->cs_spi_read_reply(rid, w_data, n_bytes))
- goto new_packet;
-
- if(verbose)
- std::cout << "[USRP_TX_STUB] Received spi read command "
- << "("
- << "RID: " << rid << ", "
- << "Enables: " << enables << ", "
- << "Format: " << format << ", "
- << "Options: " << opt << ", "
- << "Bytes: " << n_bytes
- << ")\n";
-
- }
-
- // Each subpacket has an unaccounted for 2 bytes which is the opcode
- // and the length field
- curr_payload += len + 2;
-
- // All subpackets are 32-bit aligned
- int align_offset = 4 - (curr_payload % 4);
-
- if(align_offset != 4)
- curr_payload += align_offset;
-
- }
-
- // If the packet has data in the payload, it needs queued
- if(q_pkt->payload_len() > 0)
- d_cs_queue.push(pmt_list2(invocation_handle, v_pkt));
-
- return;
-}
-
-REGISTER_MBLOCK_CLASS(usrp_tx_stub);
diff --git a/usrp/limbo/inband/usrp_tx_stub.h b/usrp/limbo/inband/usrp_tx_stub.h
deleted file mode 100644
index b81037ad7..000000000
--- a/usrp/limbo/inband/usrp_tx_stub.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_TX_STUB_H
-#define INCLUDED_USRP_TX_STUB_H
-
-#include <mblock/mblock.h>
-#include <vector>
-#include "usrp_standard.h"
-#include <fstream>
-#include <usrp_inband_usb_packet.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-/*!
- * \brief Implements the low level usb interface to the USRP
- */
-class usrp_tx_stub : public mb_mblock
-{
- public:
-
- mb_port_sptr d_cs;
- usrp_standard_tx* d_utx;
-
- std::ofstream d_ofile;
- std::ofstream d_cs_ofile;
-
- bool d_disk_write;
-
- public:
- usrp_tx_stub(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_tx_stub();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
-
- private:
- void write(pmt_t data);
- void parse_cs(pmt_t invocation_handle, transport_pkt pkt);
-
-};
-
-
-#endif /* INCLUDED_USRP_TX_STUB_H */
-
diff --git a/usrp/limbo/inband/usrp_usb_interface.cc b/usrp/limbo/inband/usrp_usb_interface.cc
deleted file mode 100644
index fb7109a5a..000000000
--- a/usrp/limbo/inband/usrp_usb_interface.cc
+++ /dev/null
@@ -1,601 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008,2009 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <usrp_usb_interface.h>
-
-#include <iostream>
-#include <vector>
-#include <usb.h>
-#include <mblock/class_registry.h>
-#include <usrp_inband_usb_packet.h>
-#include <fpga_regs_common.h>
-#include "usrp_rx.h"
-#include <usrp_rx_stub.h>
-#include "usrp_tx.h"
-#include "usrp_standard.h"
-#include <stdio.h>
-#include <usrp_dbid.h>
-
-typedef usrp_inband_usb_packet transport_pkt;
-
-#include <symbols_usrp_interface_cs.h>
-#include <symbols_usrp_tx_cs.h>
-#include <symbols_usrp_rx_cs.h>
-static pmt_t s_shutdown = pmt_intern("%shutdown");
-
-static const bool verbose = false;
-
-
-/*!
- * \brief Initializes the USB interface m-block.
- *
- * The \p user_arg should be a PMT dictionary which can contain optional
- * arguments for the block, such as the decimatoin and interpolation rate.
- */
-usrp_usb_interface::usrp_usb_interface(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg)
- : mb_mblock(rt, instance_name, user_arg),
- d_fake_usrp(false),
- d_rx_reading(false),
- d_interp_tx(128),
- d_decim_rx(128),
- d_rf_freq(-1),
- d_rbf("inband_tx_rx.rbf")
-{
- // Dictionary for arguments to all of the components
- pmt_t usrp_dict = user_arg;
-
- // Default TX/RX interface
- std::string tx_interface = "usrp_tx";
- std::string rx_interface = "usrp_rx";
-
- if (pmt_is_dict(usrp_dict)) {
-
- // The 'fake-usrp' key enables the TX and RX stubs if PMT_T
- if(pmt_t fake_usrp = pmt_dict_ref(usrp_dict,
- pmt_intern("fake-usrp"),
- PMT_NIL)) {
- if(pmt_eqv(fake_usrp, PMT_T)) {
- tx_interface = "usrp_tx_stub";
- rx_interface = "usrp_rx_stub";
- d_fake_usrp=true;
- }
- }
-
- // Read the TX interpolations
- if(pmt_t interp_tx = pmt_dict_ref(usrp_dict,
- pmt_intern("interp-tx"),
- PMT_NIL)) {
- if(!pmt_eqv(interp_tx, PMT_NIL))
- d_interp_tx = pmt_to_long(interp_tx);
- }
-
- // Read the RX decimation rate
- if(pmt_t decim_rx = pmt_dict_ref(usrp_dict,
- pmt_intern("decim-rx"),
- PMT_NIL)) {
- if(!pmt_eqv(decim_rx, PMT_NIL))
- d_decim_rx = pmt_to_long(decim_rx);
- }
-
- // Read the RBF
- if(pmt_t rbf = pmt_dict_ref(usrp_dict,
- pmt_intern("rbf"),
- PMT_NIL)) {
- if(!pmt_eqv(rbf, PMT_NIL))
- d_rbf = pmt_symbol_to_string(rbf);
- }
-
- // The RF center frequency
- if(pmt_t rf_freq = pmt_dict_ref(usrp_dict,
- pmt_intern("rf-freq"),
- PMT_NIL)) {
- if(!pmt_eqv(rf_freq, PMT_NIL))
- d_rf_freq = pmt_to_double(rf_freq);
- }
- }
-
- if (verbose) {
- std::cout << "[USRP_USB_INTERFACE] Setting USRP RBF to "
- << d_rbf << std::endl;
-
- std::cout << "[USRP_USB_INTERFACE] Setting TX interpolation to "
- << d_interp_tx << std::endl;
-
- std::cout << "[USRP_USB_INTERFACE] Setting RX interpolation to "
- << d_decim_rx << std::endl;
-
- std::cout << "[USRP_USB_INTERFACE] Using TX interface: "
- << tx_interface << "\n";
-
- std::cout << "[USRP_USB_INTERFACE] Using RX interface: "
- << rx_interface << "\n";
-
- }
-
- d_cs = define_port("cs", "usrp-interface-cs", true, mb_port::EXTERNAL);
- d_rx_cs = define_port("rx_cs", "usrp-rx-cs", false, mb_port::INTERNAL);
- d_tx_cs = define_port("tx_cs", "usrp-tx-cs", false, mb_port::INTERNAL);
-
- // Connect to TX and RX
- define_component("tx", tx_interface, usrp_dict);
- define_component("rx", rx_interface, usrp_dict);
- connect("self", "rx_cs", "rx", "cs");
- connect("self", "tx_cs", "tx", "cs");
-
- // FIXME: the code should query the FPGA to retrieve the number of channels and such
- d_ntx_chan = 2;
- d_nrx_chan = 2;
-}
-
-usrp_usb_interface::~usrp_usb_interface()
-{
-
-}
-
-void
-usrp_usb_interface::initial_transition()
-{
-
-}
-
-/*!
- * \brief Handles all incoming signals to the block from the lowest m-blocks
- * which read/write to the bus, or the higher m-block which is the USRP server.
- */
-void
-usrp_usb_interface::handle_message(mb_message_sptr msg)
-{
- pmt_t event = msg->signal(); // the "name" of the message
- pmt_t port_id = msg->port_id(); // which port it came in on
- pmt_t data = msg->data();
- pmt_t invocation_handle;
-
- if (pmt_eq(event, s_shutdown)) // ignore (for now)
- return;
-
- //------------- CONTROL / STATUS -------------//
- if (pmt_eq(port_id, d_cs->port_symbol())) {
-
- //------------ OPEN --------------//
- if (pmt_eq(event, s_cmd_usrp_open)){
- handle_cmd_open(data);
- return;
- }
- //----------- CLOSE -------------//
- else if (pmt_eq(event, s_cmd_usrp_close)) {
- handle_cmd_close(data);
- return;
- }
- //---------- NTX CHAN ----------//
- else if (pmt_eq(event, s_cmd_usrp_ntx_chan)) {
- invocation_handle = pmt_nth(0, data);
- d_cs->send(s_response_usrp_ntx_chan,
- pmt_list2(invocation_handle,
- pmt_from_long(d_ntx_chan)));
- return;
- }
- //---------- NRX CHAN ----------//
- else if (pmt_eq(event, s_cmd_usrp_nrx_chan)) {
- invocation_handle = pmt_nth(0, data);
- d_cs->send(s_response_usrp_nrx_chan,
- pmt_list2(invocation_handle,
- pmt_from_long(d_nrx_chan)));
- return;
- }
- //------------ WRITE -----------//
- else if(pmt_eq(event, s_cmd_usrp_write)) {
- handle_cmd_write(data);
- return;
- }
- //-------- START READING --------//
- else if(pmt_eq(event, s_cmd_usrp_start_reading)) {
- handle_cmd_start_reading(data);
- return;
- }
- //-------- STOP READING --------//
- else if(pmt_eq(event, s_cmd_usrp_stop_reading)) {
- handle_cmd_stop_reading(data);
- return;
- }
-
- goto unhandled;
- }
-
- //---------------- RX ------------------//
- if (pmt_eq(port_id, d_rx_cs->port_symbol())) {
-
- // Relay reads back up
- if(pmt_eq(event, s_response_usrp_rx_read)) {
- d_cs->send(s_response_usrp_read, data);
- return;
- }
-
- goto unhandled;
- }
-
- //---------------- TX ------------------//
- if (pmt_eq(port_id, d_tx_cs->port_symbol())) {
-
- if(pmt_eq(event, s_response_usrp_tx_write)) {
-
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t status = pmt_nth(1, data);
- pmt_t channel = pmt_nth(2, data);
-
- d_cs->send(s_response_usrp_write,
- pmt_list3(invocation_handle,
- status,
- channel));
-
- return;
- }
-
- goto unhandled;
- }
-
- unhandled:
- std::cout << "[USRP_USB_INTERFACE] unhandled msg: " << msg << std::endl;
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * open a USB connection to the USRP (cmd-usrp-open).
- *
- * The \p data parameter is a PMT list, where the elements are an invocation
- * handle and the USRP number.
- */
-void
-usrp_usb_interface::handle_cmd_open(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- long which_usrp = pmt_to_long(pmt_nth(1, data));
- pmt_t reply_data;
-
- if(d_fake_usrp) {
- d_cs->send(s_response_usrp_open, pmt_list2(invocation_handle, PMT_T));
- return;
- }
-
- if (verbose)
- std::cout << "[USRP_USB_INTERFACE] Handling open request for USRP " << which_usrp << "\n";
-
- // Open up a standard RX and TX for communication with the USRP
-
- d_utx = usrp_standard_tx::make(which_usrp,
- d_interp_tx,
- 1, // 1 channel
- -1, // mux
- 4096, // USB block size
- 16, // nblocks for async transfers
- d_rbf
- );
-
- if(d_utx==0) {
- if (verbose)
- std::cout << "[USRP_USB_INTERFACE] Failed to open TX\n";
- reply_data = pmt_list2(invocation_handle, PMT_F);
- d_cs->send(s_response_usrp_open, reply_data);
- return;
- }
-
- // Perform TX daughterboard tuning
- double target_freq;
- unsigned int mux;
- int tgain, rgain;
- float input_rate;
- bool ok;
- usrp_tune_result r;
-
- // Cast to usrp_basic and then detect daughterboards
- d_ub_tx = d_utx;
- usrp_subdev_spec tspec = pick_tx_subdevice();
- db_base_sptr tsubdev = d_ub_tx->selected_subdev(tspec);
-
- // Set the TX mux value
- mux = d_utx->determine_tx_mux_value(tspec);
- d_utx->set_mux(mux);
-
- // Set the TX gain and determine rate
- tgain = tsubdev->gain_max();
- tsubdev->set_gain(tgain);
- input_rate = d_ub_tx->converter_rate() / d_utx->interp_rate();
-
- // Perform the actual tuning, if no frequency specified then pick
- if(d_rf_freq==-1)
- target_freq = tsubdev->freq_min()+((tsubdev->freq_max()-tsubdev->freq_min())/2.0);
- else
- target_freq = d_rf_freq;
- ok = d_utx->tune(tsubdev->which(), tsubdev, target_freq, &r);
- tsubdev->set_enable(true);
-
- if(verbose) {
- printf("TX Subdevice name is %s\n", tsubdev->name().c_str());
- printf("TX Subdevice freq range: (%g, %g)\n",
- tsubdev->freq_min(), tsubdev->freq_max());
- printf("mux: %#08x\n", mux);
- printf("target_freq: %f\n", target_freq);
- printf("ok: %s\n", ok ? "true" : "false");
- printf("gain: %d\n", tgain);
- printf("r.baseband_freq: %f\n", r.baseband_freq);
- printf("r.dxc_freq: %f\n", r.dxc_freq);
- printf("r.residual_freq: %f\n", r.residual_freq);
- printf("r.inverted: %d\n", r.inverted);
- }
-
- if(!ok) {
- std::cerr << "[USRP_USB_INTERFACE] Failed to set center frequency on TX\n";
- reply_data = pmt_list2(invocation_handle, PMT_F);
- d_cs->send(s_response_usrp_open, reply_data);
- return;
- }
-
- d_utx->start();
-
- if (verbose)
- std::cout << "[USRP_USB_INTERFACE] Setup TX channel\n";
-
- d_urx =
- usrp_standard_rx::make (which_usrp,
- d_decim_rx,
- 1, // nchan
- -1, // mux
- 0, // set blank mode to start
- 4096, // USB block size
- 16, // number of blocks for async transfers
- d_rbf);
-
- if(!d_urx) {
- if (verbose)
- std::cout << "[usrp_server] Failed to open RX\n";
- reply_data = pmt_list2(invocation_handle, PMT_F);
- d_cs->send(s_response_usrp_open, reply_data);
- return;
- }
-
- // Cast to usrp_basic and then detect daughterboards
- d_ub_rx = d_urx;
- usrp_subdev_spec rspec = pick_rx_subdevice();
- db_base_sptr rsubdev = d_ub_rx->selected_subdev(rspec);
-
- // Set the RX mux value
- mux = d_urx->determine_rx_mux_value(rspec);
- d_urx->set_mux(mux);
-
- // Set the RX gain and determine rate
- rgain = rsubdev->gain_max()/2.0;
- rsubdev->set_gain(rgain);
- input_rate = d_ub_rx->converter_rate() / d_urx->decim_rate();
-
- ok = d_urx->tune(rsubdev->which(), rsubdev, target_freq, &r);
- rsubdev->set_enable(true);
-
- if(verbose) {
- printf("RX Subdevice name is %s\n", rsubdev->name().c_str());
- printf("RX Subdevice freq range: (%g, %g)\n",
- rsubdev->freq_min(), rsubdev->freq_max());
- printf("mux: %#08x\n", mux);
- printf("target_freq: %f\n", target_freq);
- printf("ok: %s\n", ok ? "true" : "false");
- printf("gain: %d\n", rgain);
- printf("r.baseband_freq: %f\n", r.baseband_freq);
- printf("r.dxc_freq: %f\n", r.dxc_freq);
- printf("r.residual_freq: %f\n", r.residual_freq);
- printf("r.inverted: %d\n", r.inverted);
- }
-
- if(!ok) {
- std::cerr << "[USRP_USB_INTERFACE] Failed to set center frequency on RX\n";
- reply_data = pmt_list2(invocation_handle, PMT_F);
- d_cs->send(s_response_usrp_open, reply_data);
- return;
- }
-
- if (verbose)
- std::cout << "[USRP_USB_INTERFACE] Setup RX channel\n";
-
-// d_utx->_write_fpga_reg(FR_DEBUG_EN,0xf);
-// d_utx->_write_oe(0, 0xffff, 0xffff);
-// d_urx->_write_oe(0, 0xffff, 0xffff);
-// d_utx->_write_oe(1, 0xffff, 0xffff);
-// d_urx->_write_oe(1, 0xffff, 0xffff);
-
- d_cs->send(s_response_usrp_open, pmt_list2(invocation_handle, PMT_T));
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * write data to the USB bus (cmd-usrp-write).
- *
- * The \p data parameter is a PMT list containing 3 mandatory elements in the
- * following order: an invocation handle, channel, and a uniform vector
- * representation of the packets.
- */
-void
-usrp_usb_interface::handle_cmd_write(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
- pmt_t channel = pmt_nth(1, data);
- pmt_t pkts = pmt_nth(2, data);
-
- pmt_t tx_handle = pmt_make_any(d_utx);
-
- d_tx_cs->send(s_cmd_usrp_tx_write,
- pmt_list4(invocation_handle,
- channel,
- pkts,
- tx_handle));
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * start reading data from the USB bus (cmd-usrp-start-reading).
- *
- * The \p data parameter is a PMT list with a single element: an invocation
- * handle which can be returned with the response.
- */
-void
-usrp_usb_interface::handle_cmd_start_reading(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
-
- if(verbose)
- std::cout << "[USRP_USB_INTERFACE] Starting RX...\n";
-
- if(!d_fake_usrp)
- d_urx->start();
-
- pmt_t rx_handle = pmt_make_any(d_urx);
-
- d_rx_cs->send(s_cmd_usrp_rx_start_reading, pmt_list2(PMT_NIL, rx_handle));
-
- d_rx_reading = true;
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * stop reading data from the USB bus (cmd-usrp-stop-reading).
- *
- * The \p data parameter is a PMT list with a single element: an invocation
- * handle which can be returned with the response.
- */
-void
-usrp_usb_interface::handle_cmd_stop_reading(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
-
- if(!d_fake_usrp) {
- if(verbose)
- std::cout << "[USRP_USB_INTERFACE] Stopping RX...\n";
- usrp_rx_stop = true;
-
- // Used to allow a read() being called by a lower layer to complete before
- // stopping, else there can be partial data left on the bus and can generate
- // errors.
- while(usrp_rx_stop) {usleep(1);}
- d_urx->stop();
- }
- else {
- if(verbose)
- std::cout << "[USRP_USB_INTERFACE] Stopping fake RX...\n";
- usrp_rx_stop_stub = true; // extern to communicate with stub to wait
- }
-
- d_rx_reading = false;
-
- return;
-}
-
-/*!
- * \brief Called by the handle_message() method when the incoming signal is to
- * close the USB connection to the USRP.
- *
- * The \p data parameter is a PMT list with a single element: an invocation
- * handle which can be returned with the response.
- */
-void
-usrp_usb_interface::handle_cmd_close(pmt_t data)
-{
- pmt_t invocation_handle = pmt_nth(0, data);
-
- if(d_rx_reading)
- handle_cmd_stop_reading(PMT_NIL);
-
- if(d_fake_usrp) {
- d_cs->send(s_response_usrp_close, pmt_list2(invocation_handle, PMT_T));
- return;
- }
-
- if (verbose)
- std::cout << "[USRP_USB_INTERFACE] Handling close request for USRP\n";
-
- d_utx.reset();
- d_urx.reset();
-
- d_cs->send(s_response_usrp_close, pmt_list2(invocation_handle, PMT_T));
-
- // FIXME This seems like a _very_ strange place to be calling shutdown_all.
- // That decision should be left to high-level code, not low-level code like this.
- shutdown_all(PMT_T);
-}
-
-usrp_subdev_spec
-usrp_usb_interface::pick_rx_subdevice()
-{
- int dbids[] = {
- USRP_DBID_FLEX_400_RX,
- USRP_DBID_FLEX_900_RX,
- USRP_DBID_FLEX_1200_RX,
- USRP_DBID_FLEX_2400_RX,
- USRP_DBID_TV_RX,
- USRP_DBID_TV_RX_REV_2,
- USRP_DBID_DBS_RX,
- USRP_DBID_BASIC_RX
- };
-
- std::vector<int> candidates(dbids, dbids+(sizeof(dbids)/sizeof(int)));
- return pick_subdev(d_ub_rx, candidates);
-}
-
-usrp_subdev_spec
-usrp_usb_interface::pick_tx_subdevice()
-{
- int dbids[] = {
- USRP_DBID_FLEX_400_TX,
- USRP_DBID_FLEX_900_TX,
- USRP_DBID_FLEX_1200_TX,
- USRP_DBID_FLEX_2400_TX,
- USRP_DBID_BASIC_TX
- };
-
- std::vector<int> candidates(dbids, dbids+(sizeof(dbids)/sizeof(int)));
- return pick_subdev(d_ub_tx, candidates);
-}
-
-usrp_subdev_spec
-usrp_usb_interface::pick_subdev(boost::shared_ptr<usrp_basic> d_usrp_basic, std::vector<int> candidates)
-{
- int dbid0 = d_usrp_basic->selected_subdev(usrp_subdev_spec(0, 0))->dbid();
- int dbid1 = d_usrp_basic->selected_subdev(usrp_subdev_spec(1, 0))->dbid();
-
- for (int i = 0; i < candidates.size(); i++) {
- int dbid = candidates[i];
- if (dbid0 == dbid)
- return usrp_subdev_spec(0, 0);
- if (dbid1 == dbid)
- return usrp_subdev_spec(1, 0);
- }
-
- if (dbid0 >= 0)
- return usrp_subdev_spec(0, 0);
- if (dbid1 >= 0)
- return usrp_subdev_spec(1, 0);
-
- throw std::runtime_error("No suitable daughterboard found!");
-}
-
-
-REGISTER_MBLOCK_CLASS(usrp_usb_interface);
diff --git a/usrp/limbo/inband/usrp_usb_interface.h b/usrp/limbo/inband/usrp_usb_interface.h
deleted file mode 100644
index 4d7750a7d..000000000
--- a/usrp/limbo/inband/usrp_usb_interface.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_USRP_USB_INTERFACE_H
-#define INCLUDED_USRP_USB_INTERFACE_H
-
-#include <mblock/mblock.h>
-#include <vector>
-#include "usrp_standard.h"
-
-/*!
- * \brief Implements the low level usb interface to the USRP
- */
-class usrp_usb_interface : public mb_mblock
-{
- public:
-
- usrp_standard_tx_sptr d_utx;
- usrp_standard_rx_sptr d_urx;
-
- boost::shared_ptr<usrp_basic> d_ub_tx;
- boost::shared_ptr<usrp_basic> d_ub_rx;
-
- mb_port_sptr d_cs;
- mb_port_sptr d_rx_cs;
- mb_port_sptr d_tx_cs;
-
- long d_ntx_chan;
- long d_nrx_chan;
-
- bool d_fake_usrp;
-
- bool d_rx_reading;
-
- long d_interp_tx;
- long d_decim_rx;
-
- double d_rf_freq;
-
- std::string d_rbf;
-
- public:
- usrp_usb_interface(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
- ~usrp_usb_interface();
- void initial_transition();
- void handle_message(mb_message_sptr msg);
- usrp_subdev_spec pick_rx_subdevice();
- usrp_subdev_spec pick_tx_subdevice();
- usrp_subdev_spec pick_subdev(boost::shared_ptr<usrp_basic> d_usrp_basic, std::vector<int> candidates);
-
- private:
- void handle_cmd_open(pmt_t data);
- void handle_cmd_close(pmt_t data);
- void handle_cmd_write(pmt_t data);
- void handle_cmd_start_reading(pmt_t data);
- void handle_cmd_stop_reading(pmt_t data);
-
-};
-
-
-#endif /* INCLUDED_USRP_USB_INTERFACE_H */
diff --git a/usrp/usrp.pc.in b/usrp/usrp.pc.in
index 2a15a05fd..d4794aa6f 100644
--- a/usrp/usrp.pc.in
+++ b/usrp/usrp.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: usrp
Description: USRP Client Side C++ interface
-Requires: @LIBUSB_PKG_CONFIG_NAME@ @usrp_darwin_omnithread_pc_requires@
+Requires: @LIBUSB_PKG_CONFIG_NAME@
Version: @VERSION@
Libs: -L${libdir} -lusrp
Cflags: -I${includedir}