From d87ac86f53e069729c5b4a187cdbe1a11fe468fd Mon Sep 17 00:00:00 2001 From: "Walter F.J. Mueller" Date: Sat, 20 Dec 2014 16:39:52 +0000 Subject: [PATCH] - migrate to rlink protocol version 4 - Goals for rlink v4 - 16 bit addresses (instead of 8 bit) - more robust encoding, support for error recovery at transport level - add features to reduce round trips - improved attention handling - new 'list abort' command - For further details see README_Rlink_V4.txt - use own C++ based tcl shell tclshcpp instead of tclsh --- Makefile | 11 +- doc/INSTALL.txt | 24 +- doc/README.txt | 84 +- doc/README_Rlink_V4.txt | 76 + doc/man/man1/config_wrapper.1 | 2 +- .../{telnet_starter.1 => console_starter.1} | 19 +- doc/man/man1/fx2load_wrapper.1 | 8 +- doc/w11a_known_issues.txt | 4 +- doc/w11a_os_guide.txt | 8 +- doc/w11a_seq_flow.DOT | 15 +- doc/w11a_tb_guide.txt | 54 +- rtl/bplib/bpgen/bpgenrbuslib.vhd | 13 +- rtl/bplib/bpgen/sn_humanio_demu_rbus.vhd | 11 +- rtl/bplib/bpgen/sn_humanio_rbus.vhd | 11 +- rtl/bplib/fx2rlink/fx2rlinklib.vhd | 20 +- rtl/bplib/fx2rlink/rlink_sp1c_fx2.vhd | 29 +- rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom | 7 - rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd | 92 - rtl/sys_gen/tst_fx2loop/Makefile | 8 +- rtl/sys_gen/tst_rlink/Makefile | 5 +- .../tst_rlink/nexys2/sys_tst_rlink_n2.vhd | 19 +- .../tst_rlink/nexys3/sys_tst_rlink_n3.vhd | 19 +- rtl/sys_gen/tst_rlink/rbd_tst_rlink.vhd | 24 +- .../tst_rlink/s3board/sys_tst_rlink_s3.vhd | 19 +- rtl/sys_gen/tst_rlink_cuff/Makefile | 5 +- .../atlys/sys_tst_rlink_cuff_atlys.vhd | 9 +- .../nexys2/sys_tst_rlink_cuff_n2.vhd | 10 +- .../nexys3/sys_tst_rlink_cuff_n3.vhd | 11 +- rtl/sys_gen/tst_rlink_cuff/tst_rlink_cuff.vhd | 15 +- rtl/sys_gen/tst_serloop/Makefile | 8 +- rtl/sys_gen/w11a/nexys2/sys_w11a_n2.vhd | 21 +- rtl/sys_gen/w11a/nexys3/sys_w11a_n3.vhd | 21 +- rtl/sys_gen/w11a/s3board/sys_w11a_s3.vhd | 21 +- rtl/vlib/comlib/byte2cdata.vbom | 1 + rtl/vlib/comlib/byte2cdata.vhd | 125 +- rtl/vlib/comlib/cdata2byte.vbom | 1 + rtl/vlib/comlib/cdata2byte.vhd | 156 +- rtl/vlib/comlib/comlib.vhd | 160 +- rtl/vlib/comlib/{crc8.vbom => crc16.vbom} | 2 +- rtl/vlib/comlib/{crc8.vhd => crc16.vhd} | 39 +- rtl/vlib/comlib/misc/.cvsignore | 2 + rtl/vlib/comlib/misc/Makefile | 5 +- rtl/vlib/comlib/tb/.cvsignore | 5 + rtl/vlib/comlib/tb/Makefile | 36 + rtl/vlib/comlib/tb/tb_cdata2byte.vbom | 10 + rtl/vlib/comlib/tb/tb_cdata2byte.vhd | 278 ++ rtl/vlib/comlib/tb/tb_cdata2byte_ssim.vbom | 4 + rtl/vlib/comlib/tb/tb_cdata2byte_stim.dat | 182 + rtl/vlib/comlib/tb/tbd_cdata2byte.vbom | 8 + rtl/vlib/comlib/tb/tbd_cdata2byte.vhd | 101 + rtl/vlib/rbus/rb_mon.vhd | 160 +- rtl/vlib/rbus/rb_mon_sb.vhd | 9 +- rtl/vlib/rbus/rb_sel.vbom | 6 + rtl/vlib/rbus/rb_sel.vhd | 70 + rtl/vlib/rbus/rbd_bram.vhd | 22 +- rtl/vlib/rbus/rbd_eyemon.vhd | 36 +- rtl/vlib/rbus/rbd_rbmon.vhd | 18 +- rtl/vlib/rbus/rbd_tester.vhd | 170 +- rtl/vlib/rbus/rbd_timer.vhd | 15 +- rtl/vlib/rbus/rbdlib.vhd | 59 +- rtl/vlib/rbus/rblib.vhd | 20 +- rtl/vlib/rlink/Makefile | 4 +- rtl/vlib/rlink/rlink_core.vbom | 10 +- rtl/vlib/rlink/rlink_core.vhd | 1888 ++++++--- rtl/vlib/rlink/rlink_core8.vbom | 1 - rtl/vlib/rlink/rlink_core8.vhd | 106 +- rtl/vlib/rlink/rlink_mon.vbom | 1 + rtl/vlib/rlink/rlink_mon.vhd | 79 +- rtl/vlib/rlink/rlink_sp1c.vhd | 29 +- rtl/vlib/rlink/rlinklib.vhd | 97 +- rtl/vlib/rlink/tb/rlink_cext.c | 86 +- rtl/vlib/rlink/tb/rlinktblib.vhd | 31 +- rtl/vlib/rlink/tb/tb_rlink.vbom | 3 +- rtl/vlib/rlink/tb/tb_rlink.vhd | 746 +++- rtl/vlib/rlink/tb/tb_rlink_sp1c_stim.dat | 152 +- rtl/vlib/rlink/tb/tb_rlink_stim.dat | 3495 +++-------------- rtl/vlib/rlink/tb/tbd_rlink_direct.vhd | 26 +- rtl/vlib/rlink/tb/tbd_rlink_sp1c.vhd | 42 +- rtl/vlib/rlink/tb/tbu_rlink_sp1c.vhd | 23 +- rtl/vlib/simlib/simlib.vhd | 420 +- rtl/vlib/xlib/s6_cmt_sfs_unisim.vhd | 2 +- rtl/w11a/pdp11.vhd | 16 +- rtl/w11a/pdp11_aunit.vhd | 15 +- rtl/w11a/pdp11_core_rbus.vhd | 23 +- rtl/w11a/pdp11_dpath.vhd | 9 +- rtl/w11a/pdp11_lunit.vhd | 15 +- rtl/w11a/pdp11_munit.vhd | 147 +- rtl/w11a/tb/tb_pdp11core_stim.dat | 19 +- tools/bin/.cvsignore | 1 + tools/bin/{telnet_starter => console_starter} | 7 +- tools/bin/fx2load_wrapper | 12 +- tools/bin/svn_set_ignore | 12 +- tools/bin/ti_rri | 7 +- tools/bin/ticonv_pdpcp | 10 +- tools/dox/w11_cpp.Doxyfile | 2 +- tools/dox/w11_tcl.Doxyfile | 2 +- tools/dox/w11_vhd_all.Doxyfile | 2 +- tools/fx2/bin/nexys2_jtag.ihx | 550 +-- tools/fx2/bin/nexys2_jtag_2fifo_as.ihx | 559 +-- tools/fx2/bin/nexys2_jtag_2fifo_ic.ihx | 559 +-- tools/fx2/bin/nexys2_jtag_3fifo_as.ihx | 564 +-- tools/fx2/bin/nexys2_jtag_3fifo_ic.ihx | 564 +-- tools/fx2/bin/nexys3_jtag.ihx | 550 +-- tools/fx2/bin/nexys3_jtag_2fifo_as.ihx | 559 +-- tools/fx2/bin/nexys3_jtag_2fifo_ic.ihx | 559 +-- tools/fx2/bin/nexys3_jtag_3fifo_as.ihx | 564 +-- tools/fx2/bin/nexys3_jtag_3fifo_ic.ihx | 564 +-- tools/fx2/src/.cvsignore | 1 + tools/fx2/src/Makefile | 20 +- tools/fx2/src/README.txt | 60 +- tools/fx2/src/dscr_gen.A51 | 7 +- tools/fx2/src/lib/Makefile | 53 +- tools/fx2/src/lib/fx2regs.h | 22 +- tools/fx2/src/lib/syncdelay.h | 43 +- tools/fx2/src/main.c | 6 +- tools/fx2/src/sdccdefs.mk | 31 + tools/fx2/sys/README.txt | 17 +- tools/make/generic_so_c.mk | 45 + .../rsx11m-40_rk/README_rsx11m-40_rkset.txt | 8 +- tools/src/Makefile | 4 +- tools/src/checkpath_cpp.mk | 9 +- tools/src/librlink/Makefile | 5 +- tools/src/librlink/RlinkAddrMap.cpp | 6 +- tools/src/librlink/RlinkCommand.cpp | 91 +- tools/src/librlink/RlinkCommand.hpp | 43 +- tools/src/librlink/RlinkCommand.ipp | 19 +- tools/src/librlink/RlinkCommandList.cpp | 29 +- tools/src/librlink/RlinkCommandList.hpp | 16 +- tools/src/librlink/RlinkCommandList.ipp | 41 +- tools/src/librlink/RlinkConnect.cpp | 908 +++-- tools/src/librlink/RlinkConnect.hpp | 105 +- tools/src/librlink/RlinkConnect.ipp | 20 +- tools/src/librlink/RlinkCrc16.cpp | 76 + .../{RlinkCrc8.hpp => RlinkCrc16.hpp} | 29 +- .../{RlinkCrc8.ipp => RlinkCrc16.ipp} | 24 +- tools/src/librlink/RlinkCrc8.cpp | 79 - tools/src/librlink/RlinkPacketBuf.cpp | 357 +- tools/src/librlink/RlinkPacketBuf.hpp | 99 +- tools/src/librlink/RlinkPacketBuf.ipp | 111 +- tools/src/librlink/RlinkPacketBufRcv.cpp | 350 ++ tools/src/librlink/RlinkPacketBufRcv.hpp | 102 + tools/src/librlink/RlinkPacketBufRcv.ipp | 77 + tools/src/librlink/RlinkPacketBufSnd.cpp | 227 ++ tools/src/librlink/RlinkPacketBufSnd.hpp | 78 + tools/src/librlink/RlinkPacketBufSnd.ipp | 85 + tools/src/librlink/RlinkPort.cpp | 57 +- tools/src/librlink/RlinkPort.hpp | 15 +- tools/src/librlink/RlinkPortCuff.cpp | 11 +- tools/src/librlink/RlinkPortFifo.cpp | 8 +- tools/src/librlink/RlinkPortTerm.cpp | 28 +- tools/src/librlink/RlinkServer.cpp | 71 +- tools/src/librlink/RlinkServer.hpp | 55 +- tools/src/librlink/RlinkServer.ipp | 9 +- tools/src/librlinktpp/Makefile | 8 +- tools/src/librlinktpp/Rlinktpp_Init.cpp | 9 +- tools/src/librlinktpp/RtclAttnShuttle.cpp | 21 +- tools/src/librlinktpp/RtclRlinkConnect.cpp | 114 +- tools/src/librlinktpp/RtclRlinkPort.cpp | 9 +- tools/src/librlinktpp/RtclRlinkServer.cpp | 14 +- tools/src/librtcltools/Rtcl.cpp | 17 +- tools/src/librtcltools/RtclArgs.cpp | 19 +- tools/src/librtcltools/RtclClassBase.cpp | 23 +- tools/src/librtcltools/RtclCmdBase.cpp | 15 +- tools/src/librtcltools/RtclGetList.cpp | 15 +- tools/src/librtcltools/RtclNameSet.cpp | 15 +- tools/src/librtcltools/RtclProxyBase.cpp | 11 +- tools/src/librtcltools/RtclSetList.cpp | 19 +- tools/src/librtcltools/RtclStats.cpp | 15 +- tools/src/librtools/Makefile | 5 +- tools/src/librtools/RlogFile.cpp | 11 +- tools/src/librtools/Rtools.cpp | 38 +- tools/src/librtools/Rtools.hpp | 9 +- tools/src/librutiltpp/Makefile | 6 +- tools/src/librutiltpp/RtclBvi.cpp | 25 +- tools/src/librutiltpp/RtclSignalAction.cpp | 21 +- tools/src/librutiltpp/RtclSystem.cpp | 22 +- tools/src/librutiltpp/Rutiltpp_Init.cpp | 9 +- tools/src/librw11/Rw11Cpu.cpp | 6 +- tools/src/librw11/Rw11UnitVirt.ipp | 9 +- tools/src/librw11/Rw11VirtTermTcp.cpp | 9 +- tools/src/librwxxtpp/Makefile | 6 +- tools/src/librwxxtpp/RtclRw11Cpu.cpp | 28 +- tools/src/librwxxtpp/RtclRw11UnitPC11.cpp | 10 +- tools/src/librwxxtpp/Rwxxtpp_Init.cpp | 9 +- tools/src/tclshcpp/.cvsignore | 1 + tools/src/tclshcpp/Makefile | 54 + tools/src/tclshcpp/tclshcpp.cpp | 47 + tools/src/testtclsh/Makefile | 5 +- tools/tcl/rbbram/perf.tcl | 90 +- tools/tcl/rbbram/util.tcl | 7 +- tools/tcl/rbmoni/util.tcl | 7 +- tools/tcl/rbtest/test_attn.tcl | 21 +- tools/tcl/rbtest/test_data.tcl | 89 +- tools/tcl/rbtest/test_fifo.tcl | 64 +- tools/tcl/rbtest/test_stat.tcl | 14 +- tools/tcl/rbtest/util.tcl | 40 +- tools/tcl/rlink/util.tcl | 53 +- tools/tcl/rw11/tbench.tcl | 7 +- tools/tcl/rw11/util.tcl | 7 +- tools/tcl/setup_packages | 10 +- tools/tcl/tst_rlink/perf.tcl | 9 +- tools/tcl/tst_rlink/test_all.tcl | 11 +- tools/tcl/tst_rlink/util.tcl | 30 +- 203 files changed, 9324 insertions(+), 10881 deletions(-) create mode 100644 doc/README_Rlink_V4.txt rename doc/man/man1/{telnet_starter.1 => console_starter.1} (86%) delete mode 100644 rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom delete mode 100644 rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd rename rtl/vlib/comlib/{crc8.vbom => crc16.vbom} (81%) rename rtl/vlib/comlib/{crc8.vhd => crc16.vhd} (52%) create mode 100644 rtl/vlib/comlib/tb/.cvsignore create mode 100644 rtl/vlib/comlib/tb/Makefile create mode 100644 rtl/vlib/comlib/tb/tb_cdata2byte.vbom create mode 100644 rtl/vlib/comlib/tb/tb_cdata2byte.vhd create mode 100644 rtl/vlib/comlib/tb/tb_cdata2byte_ssim.vbom create mode 100644 rtl/vlib/comlib/tb/tb_cdata2byte_stim.dat create mode 100644 rtl/vlib/comlib/tb/tbd_cdata2byte.vbom create mode 100644 rtl/vlib/comlib/tb/tbd_cdata2byte.vhd create mode 100644 rtl/vlib/rbus/rb_sel.vbom create mode 100644 rtl/vlib/rbus/rb_sel.vhd rename tools/bin/{telnet_starter => console_starter} (91%) create mode 100644 tools/fx2/src/sdccdefs.mk create mode 100644 tools/make/generic_so_c.mk create mode 100644 tools/src/librlink/RlinkCrc16.cpp rename tools/src/librlink/{RlinkCrc8.hpp => RlinkCrc16.hpp} (56%) rename tools/src/librlink/{RlinkCrc8.ipp => RlinkCrc16.ipp} (70%) delete mode 100644 tools/src/librlink/RlinkCrc8.cpp create mode 100644 tools/src/librlink/RlinkPacketBufRcv.cpp create mode 100644 tools/src/librlink/RlinkPacketBufRcv.hpp create mode 100644 tools/src/librlink/RlinkPacketBufRcv.ipp create mode 100644 tools/src/librlink/RlinkPacketBufSnd.cpp create mode 100644 tools/src/librlink/RlinkPacketBufSnd.hpp create mode 100644 tools/src/librlink/RlinkPacketBufSnd.ipp create mode 100644 tools/src/tclshcpp/.cvsignore create mode 100644 tools/src/tclshcpp/Makefile create mode 100644 tools/src/tclshcpp/tclshcpp.cpp diff --git a/Makefile b/Makefile index e0681a2a..fc6ab886 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 562 2014-06-15 17:23:18Z mueller $ +# $Id: Makefile 613 2014-12-20 08:47:50Z mueller $ # # 'Meta Makefile' for whole retro project # allows to make all synthesis targets @@ -50,6 +50,7 @@ SIM_all += rtl/sys_gen/tst_serloop/s3board/tb SIM_all += rtl/sys_gen/w11a/nexys2/tb SIM_all += rtl/sys_gen/w11a/nexys3/tb SIM_all += rtl/sys_gen/w11a/s3board/tb +SIM_all += rtl/vlib/comlib/tb SIM_all += rtl/vlib/rlink/tb SIM_all += rtl/vlib/serport/tb SIM_all += rtl/w11a/tb @@ -59,17 +60,17 @@ SIM_all += rtl/w11a/tb .PHONY : $(SYN_all) $(SIM_all) # all : - @echo "no default action defined." + @echo "No default action defined:" @echo " for VHDL simulation/synthesis use:" - @echo " make -j 4 all_sim" - @echo " make -j 4 all_syn" + @echo " make -j `nproc` all_sim" + @echo " make -j `nproc` all_syn" @echo " make clean" @echo " make clean_sim" @echo " make clean_syn" @echo " make clean_sim_tmp" @echo " make clean_syn_tmp" @echo " for tool/documentation generation use:" - @echo " make -j 4 all_lib" + @echo " make -j `nproc` all_lib" @echo " make clean_lib" @echo " make all_tcl" @echo " make all_dox" diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt index 0515c09b..6a38b4e1 100644 --- a/doc/INSTALL.txt +++ b/doc/INSTALL.txt @@ -1,4 +1,4 @@ -# $Id: INSTALL.txt 576 2014-08-02 12:24:28Z mueller $ +# $Id: INSTALL.txt 604 2014-11-16 22:33:09Z mueller $ Guide to install and build w11a systems, test benches and support software @@ -110,14 +110,16 @@ Guide to install and build w11a systems, test benches and support software server) requires - the definition of the environment variables: - - RETROBASE: must refer to the installation root directory - - TCLINC: pathname for includes of Tcl runtime library + - RETROBASE: must refer to the installation root directory + - TCLINC: pathname for includes of Tcl runtime library + - TCLLIBNAME: name of Tcl runtime library - RETRO_FX2_VID and RETRO_FX2_PID: default USB VID/PID, see below - that the tools binary directory is in the path - that the tools library directory is in the library path - optional environment variables: - - BOOSTINC: pathname for includes of boost library - - BOOSTLIB: pathname for libraries of boost library + - TCLLIB: pathname for libraries of Tcl + - BOOSTINC: pathname for includes of boost library + - BOOSTLIB: pathname for libraries of boost library {Note: Either both must be undefined, or both must be defined} For bash and alike use @@ -134,6 +136,7 @@ Guide to install and build w11a systems, test benches and support software work, similar for Tcl, in those cases simply use export TCLINC=/usr/include/tcl8.5 + export TCLLIBNAME=tcl8.5 and don't setup BOOSTINC and BOOSTLIB. @@ -259,7 +262,12 @@ Guide to install and build w11a systems, test benches and support software make clean make make install - + + Note: The default build assumes that sdcc with a version 3.x is installed. + In case sdcc 2.x is installed use + make SDCC29=1 + instead. See also tools/fx2/src/README.txt in the + Please read README_USB_VID-PID.txt carefully to understand the usage of USB VID and PID. @@ -487,13 +495,13 @@ Guide to install and build w11a systems, test benches and support software b. for Digilent Nexys2 board (using Cypress FX2 USB controller) xtwi config_wrapper --board=nexys2 bit2svf .bit - fx2load_wrapper --board=nexys2 --file=nexys2_jtag_2fifo_ic.ihx + fx2load_wrapper --board=nexys2 xtwi config_wrapper --board=nexys2 jconfig .svf c. for Digilent Nexys3 board (using Cypress FX2 USB controller) xtwi config_wrapper --board=nexys3 bit2svf .bit - fx2load_wrapper --board=nexys3 --file=nexys3_jtag_2fifo_ic.ihx + fx2load_wrapper --board=nexys3 xtwi config_wrapper --board=nexys3 jconfig .svf 9. Generate Doxygen based source code view -------------------------------- diff --git a/doc/README.txt b/doc/README.txt index 6b53d053..53f022fe 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -1,4 +1,4 @@ -$Id: README.txt 579 2014-08-08 20:39:46Z mueller $ +$Id: README.txt 614 2014-12-20 15:00:45Z mueller $ Release notes for w11a @@ -21,7 +21,87 @@ Release notes for w11a 2. Change Log ---------------------------------------------------------------- -- trunk (2014-08-08: svn rev 25(oc) 579(wfjm); tagged w11a_V0.61) ++++++++++ +- trunk (2014-12-20: svn rev 27(oc) 614(wfjm); untagged w11a_V0.62) +++++++++ + + - Summary + - migrate to rlink protocol version 4 + - Goals for rlink v4 + - 16 bit addresses (instead of 8 bit) + - more robust encoding, support for error recovery at transport level + - add features to reduce round trips + - improved attention handling + - new 'list abort' command + - For further details see README_Rlink_V4.txt + - use own C++ based tcl shell tclshcpp instead of tclsh + + Notes: + 1. rlink protocol, core, and backend are updated in this release + 2. error recovery in backend not yet implemented + 3. the designs using rlink are still essentially unchanged + 4. the new rlink v4 features will be exploited in upcoming releases + + - New reference system + The development and test system was upgraded from Kubuntu 12.04 to 14.04. + The version of several key tools and libraries changed: + linux kernel 3.13.0 (was 3.2.0) + gcc/g++ 4.8.2 (was 4.6.3) + boost 1.54 (was 1.46.1) + libusb 1.0.17 (was 1.0.9) + perl 5.18.2 (was 5.14.2) + tcl 8.5.15 (was 8.5.11) + sdcc 3.3.0 (was 2.9.0) + doxygen 1.8.7 {installed from sources; Ub 14.04 has 1.8.6} + + Notes: + 1. still using tcl 8.5 (even though 8.6 is now default in Ub 14.04) + 2. sdcc 3.x is not source compatible with sdcc 2.9. The Makefile + allows to use both, see tools/fx2/src/README.txt . + 3. don't use doxygen 1.8.8, it fails to generate vhdl docs + + - New features + - new environment variables TCLLIB and TCLLIBNAME. TCLLIBNAME must be + defined, and hold the library name matching the Tcl version already + specified with TCLINC. + - new modules + - rtl/vlib/comlib/crc16 - 16 bit crc generator (replaces crc8) + - tools/src/tclshcpp/* - new tclshcpp shell + + - Changes + - rtl/vlib/comlib + - byte2cdata,cdata2byte - re-write, commas now 2 byte sequences + - rtl/vlib/rlink + - rlink_core - re-write for rlink v4 + - rtl/*/* - use new rlink v4 iface and 4 bit STAT + - rtl/vlib/rbus/rbd* - new addresses in 16 bit rlink space + - rtl/vlib/simlib/simlib - add simfifo_*, wait_*, writetrace + - tools/bin/ + - fx2load_wrapper - use _ic instead of _as as default firmware + - ti_rri - use tclshcpp (C++ based) rather tclsh + - tools/fx2/bin/*.ihx - recompiled with sdcc 3.3.0 + bugfixes + - tools/fx2/src/Makefile - support sdcc 3.3.0 + - tools/src/ + - */*.cpp - adopt for rlink v4; use nullptr + - librlink/RlinkCrc16 - 16 crc, replaces RlinkCrc8 + - librlink/RlinkConnect - many changes for rlink v4 + - librlink/RlinkPacketBuf* - re-write for for rlink v4 + - tools/tcl/*/*.tcl - adopt for rlink v4 + - renames: + - tools/bin/telnet_starter -> tools/bin/console_starter + + - Bug fixes + - tools/fx2/src + - dscr_gen.A51 - correct string 0 descriptor + - lib/syncdelay.h - handle triple nop now properly + + - Known issues + - rlink v4 error recovery not yet implemented, will crash on error + - command lists aren't split to fit in retransmit buffer size + {both issues not relevant for w11 backend over USB usage because the + backend produces proper command lists and the USB channel is error free} + - the rbus monitor (rbd_rbmon) not yet handling 16 bit addresses and + therefore of limited use + +- trunk (2014-08-08: svn rev 25(oc) 579(wfjm); tagged w11a_V0.61) +++++++++++ - Summary - The div instruction gave wrong results in some corner cases when either diff --git a/doc/README_Rlink_V4.txt b/doc/README_Rlink_V4.txt new file mode 100644 index 00000000..ffecb920 --- /dev/null +++ b/doc/README_Rlink_V4.txt @@ -0,0 +1,76 @@ +$Id: README_Rlink_V4.txt 614 2014-12-20 15:00:45Z mueller $ + +Summary of changes for rlink v3 to v4 + +Background + The protocol was initially designed as debug interface used over serial + port connections. From the beginning the protocol had crc error checking + and a simple error recovery mechanism. + When the protocol was used in the IO emulation of the w11, features like + block transfers, attentions, and command groups were added. Over time the + original simple concept for error recovery became practically unusable. + When the protocol was used on boards with a Cypress FX2 USB interface + the number of round trips became the sole performance limiting factor. + +Goals for rlink v4 + - 16 bit addresses (instead of 8 bit) + - more robust encoding, support for error recovery at transport level + - add features to reduce round trips + - improved attention handling + - new 'list abort' command + +Changes in detail + + - encoding + - framing (comma) char representation changed + - now 2 byte sequence for comma char, with internal redundancy + - optimized for robustness. Also more compact for larger rblk/wblk. + + - framing + - unexpected EOP in sl_idle now silently ignored + --> before: send NAK+EOP + --> now allows to send EOP+NAK to start a retransmit + - command aborts send now an error code, the abort sequence + NAK EOP + - the nakbyte has the redundant format + 10 + - the abort sequence sequence is not protected by a crc, but has enough + redundancy that transmission errors can be detected. + - all unexpected commas after SOP will cause an abort. This adds robustness + in case transmission error converts a data byte into a comma. + + - commands + - 16 bit addresses + - 16 bit rblk/wblk transfer size counts. Now cnt rather cnt-1 used. + - rblk/wblk now return 'done count', number of successfully transfered words + Note: rblk always transfers cnt words, rest is padded. + - babo state flag added + - babo is cleared when rblk/wblk is started, and set when they are aborted + - babo is not changed by commands other then rblk and wblk + - stat command removed (functionality not needed anymore) + - labo command added + - returns the babo flag + - if babo set, all remaining commands in the list will be ignored + - stat byte layout changed + - cerr and derr flags removed (not needed anymore) + - now 4 (instead of 3) external RB_STAT bit + - 16 bit crc used (instead of 8 bit) + - attn handling + - a message with the current attn pattern is send, not only an attn comma. + This give the attn handler a priori knowledge of LAM sources. + An attn command must still be used to harvest the attn pattern. + - attn poll always returns attn notify, usage of idle comma removed + + - general + - reserve 0xff00-0xffff range for rlink system usage + - implement 4 default registers (in rlink_core) + ffff cntl + fffe stat (holds rtbuf size) + fffc/d sysid (32 bit system identifier) + - rlink initialization now via wreg, not with init anymore + - has now retransmit buffer, size configurable (2,4,8,.. kB) + - used for wblk dcrc validation in addition + - a NAK outside a SOP/EOP frame will trigger a retransmit of last response + - retransmit buffer cleared when first cmd processed + -> an empty SOP-EOP does not reset the retransmit buffer + - no internal/external init distinction, 'we' always 0 when init=1 diff --git a/doc/man/man1/config_wrapper.1 b/doc/man/man1/config_wrapper.1 index 10b5a791..e6a8fffb 100644 --- a/doc/man/man1/config_wrapper.1 +++ b/doc/man/man1/config_wrapper.1 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.\" $Id: config_wrapper.1 550 2014-02-03 08:16:57Z mueller $ +.\" $Id: config_wrapper.1 580 2014-08-10 15:47:10Z mueller $ .\" .\" Copyright 2013- by Walter F.J. Mueller .\" diff --git a/doc/man/man1/telnet_starter.1 b/doc/man/man1/console_starter.1 similarity index 86% rename from doc/man/man1/telnet_starter.1 rename to doc/man/man1/console_starter.1 index 74b6d51b..02927af2 100644 --- a/doc/man/man1/telnet_starter.1 +++ b/doc/man/man1/console_starter.1 @@ -1,25 +1,25 @@ .\" -*- nroff -*- -.\" $Id: telnet_starter.1 550 2014-02-03 08:16:57Z mueller $ +.\" $Id: console_starter.1 581 2014-08-10 21:48:46Z mueller $ .\" -.\" Copyright 2013- by Walter F.J. Mueller +.\" Copyright 2013-2014 by Walter F.J. Mueller .\" .\" ------------------------------------------------------------------ . -.TH TELNET_STARTER 1 2010-07-09 "Retro Project" "Retro Project Manual" +.TH CONSOLE_STARTER 1 2010-07-09 "Retro Project" "Retro Project Manual" .\" ------------------------------------------------------------------ .SH NAME -telnet_starter \- setup vt52/vt100 emulator windows for ti_rri or simh +console_starter \- setup vt52/vt100 emulator windows for ti_rri or simh .\" ------------------------------------------------------------------ .SH SYNOPSIS . -.SY telnet_starter +.SY console_starter .OP \-t term .OP \-d dev .OP \-s .OP \-w .OP \-l . -.SY telnet_starter +.SY console_starter .B \-\-h .YS . @@ -103,18 +103,15 @@ print full help text and exit. .SH EXIT STATUS In case of an error an exit status 1 is returned. . -.\" ------------------------------------------------------------------ -.SH BUGS -Stupid name, it's not telnet but a terminal emulator which is started. . .\" ------------------------------------------------------------------ .SH EXAMPLES -.IP "\fBtelnet_starter -d DL0 &\fR" 4 +.IP "\fBconsole_starter -d DL0 &\fR" 4 Creates a background process with a \fBxterm\fP in VT100 emulation mode with a 80x24 screen size which will try to connect to the primary DL11 emulator port of \fBti_rri\fP. . -.IP "\fBtelnet_starter -t vt52 -d DL1 -s &\fR" +.IP "\fBconsole_starter -t vt52 -d DL1 -s &\fR" Creates a background process with a \fBxterm\fP in VT52 emulation mode with a 80x24 screen size which will try to connect to the secondary DL11 emulator port of a \fBsimh\fP suite CPU emulator. diff --git a/doc/man/man1/fx2load_wrapper.1 b/doc/man/man1/fx2load_wrapper.1 index 72e20ee5..4f03989d 100644 --- a/doc/man/man1/fx2load_wrapper.1 +++ b/doc/man/man1/fx2load_wrapper.1 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.\" $Id: fx2load_wrapper.1 550 2014-02-03 08:16:57Z mueller $ +.\" $Id: fx2load_wrapper.1 581 2014-08-10 21:48:46Z mueller $ .\" .\" Copyright 2013- by Walter F.J. Mueller .\" @@ -53,11 +53,11 @@ currently supported boards are: .RS .PD 0 .IP \fBnexys2\fP -Digilent Nexys2. Default file: nexys2_jtag_2fifo_as.ihx +Digilent Nexys2. Default file: nexys2_jtag_2fifo_ic.ihx .IP \fBnexys3\fP -Digilent Nexys3. Default file: nexys3_jtag_2fifo_as.ihx +Digilent Nexys3. Default file: nexys3_jtag_2fifo_ic.ihx .IP \fBatlys\fP -Digilent Atlys. Default file: nexys3_jtag_2fifo_as.ihx +Digilent Atlys. Default file: nexys3_jtag_2fifo_ic.ihx .RE .PD . diff --git a/doc/w11a_known_issues.txt b/doc/w11a_known_issues.txt index 1b373132..c7a4ca32 100644 --- a/doc/w11a_known_issues.txt +++ b/doc/w11a_known_issues.txt @@ -1,4 +1,4 @@ -# $Id: w11a_known_issues.txt 570 2014-07-20 19:05:11Z mueller $ +# $Id: w11a_known_issues.txt 589 2014-08-30 12:43:16Z mueller $ Summary of known issues for w11a CPU and systems @@ -22,7 +22,7 @@ Summary of known issues for w11a CPU and systems - A 'red stack violation' looses PSW, a 0 is pushed in stack. - - The 'instrution complete flag' in SSR0 is not implemented, it is + - The 'instruction complete flag' in SSR0 is not implemented, it is permanently '0', SSR2 will not record vector addresses in case of a vector fetch fault. Recovery of vector fetch faults is therefore not possible, but only 11/45 and 11/70 supported this, no OS used that, and diff --git a/doc/w11a_os_guide.txt b/doc/w11a_os_guide.txt index 62dbcce7..c4ecf0ad 100644 --- a/doc/w11a_os_guide.txt +++ b/doc/w11a_os_guide.txt @@ -1,4 +1,4 @@ -# $Id: w11a_os_guide.txt 563 2014-06-22 15:49:09Z mueller $ +# $Id: w11a_os_guide.txt 581 2014-08-10 21:48:46Z mueller $ Guide to run operating system images on w11a systems @@ -76,8 +76,8 @@ Guide to run operating system images on w11a systems - setup vt100 emulator windows cd $RETROBASE/tools/oskit/ - telnet_starter -d DL0 & - telnet_starter -d DL1 & + console_starter -d DL0 & + console_starter -d DL1 & - setup rlink connection using ti_rri backend server via the ti_w11 quick start wrapper script. Ensure that all 8 switches on the board @@ -120,7 +120,7 @@ Guide to run operating system images on w11a systems - setup vt100 emulator window for 2nd DL11 cd $RETROBASE/tools/oskit/ - telnet_starter -s -d DL1 & + console_starter -s -d DL1 & {Note: the -s ensures that the port numbers used by simh are taken!} diff --git a/doc/w11a_seq_flow.DOT b/doc/w11a_seq_flow.DOT index 803f203f..0323d4de 100644 --- a/doc/w11a_seq_flow.DOT +++ b/doc/w11a_seq_flow.DOT @@ -1,4 +1,4 @@ -// $Id: w11a_seq_flow.DOT 343 2010-12-05 21:24:38Z mueller $ +// $Id: w11a_seq_flow.DOT 584 2014-08-22 19:38:12Z mueller $ // // The create pdf use // @@ -41,7 +41,7 @@ digraph G { fontsize=FSZlabel; fontcolor=blue; labelloc="t"; - label="W11A Sequencer (Rev 230)"; + label="W11A Sequencer (Rev 569)"; // aspect="0.7,500"; // ratio="0.7"; @@ -230,7 +230,7 @@ digraph G { opg_div_cr [fillcolor=COLsoper]; opg_div_sq [fillcolor=COLsoper]; opg_div_sr [fillcolor=COLsoper]; - opg_div_zero [fillcolor=COLsoper]; + opg_div_quit [fillcolor=COLsoper]; opg_ash [fillcolor=COLsoper]; opg_ash_cn [fillcolor=COLsoper]; opg_ashc [fillcolor=COLsoper]; @@ -546,7 +546,7 @@ digraph G { opg_div -> opg_div_cn; // opg_div_cn - opg_div_cn -> opg_div_zero; + opg_div_cn -> opg_div_quit; opg_div_cn -> opg_div_cr [color=COLtflow]; opg_div_cn -> opg_div_cn; @@ -557,10 +557,11 @@ digraph G { opg_div_sq -> opg_div_sr [color=COLtflow]; // opg_div_sr + opg_div_sr -> opg_div_quit; do_fork_next(opg_div_sr) -// opg_div_zero - do_fork_next(opg_div_zero) +// opg_div_quit + do_fork_next(opg_div_quit) // opg_ash opg_ash -> opg_ash_cn [color=COLtflow]; @@ -838,7 +839,7 @@ digraph G { opg_div_cr; opg_div_sq; opg_div_sr; - opg_div_zero; + opg_div_quit; fontsize=FSZgraph; fontcolor=blue; label = "DIV flow"; diff --git a/doc/w11a_tb_guide.txt b/doc/w11a_tb_guide.txt index bf2dce12..1b5c2ed4 100644 --- a/doc/w11a_tb_guide.txt +++ b/doc/w11a_tb_guide.txt @@ -1,4 +1,4 @@ -# $Id: w11a_tb_guide.txt 578 2014-08-05 21:28:19Z mueller $ +# $Id: w11a_tb_guide.txt 609 2014-12-07 19:35:25Z mueller $ Guide to running w11a test benches @@ -72,7 +72,7 @@ Guide to running w11a test benches make tb_serport_uart_rxtx time tbw tb_serport_uart_rxtx |\ tee tb_serport_uart_rxtx_dsim.log | egrep "(FAIL|DONE)" - -> 52335.0 ns 2607: DONE + -> 52335.0 ns 2607: DONE -> real 0m00.094s user 0m00.092s sys 0m00.008s - serport autobauder test @@ -81,6 +81,14 @@ Guide to running w11a test benches tee tb_serport_autobaud_dsim.log | egrep "(FAIL|DONE)" -> 367475.0 ns 18364: DONE -> real 0m00.610s user 0m00.612s sys 0m00.004s + + - 9 bit comma,data to Byte stream converter test + cd $RETROBASE/rtl/vlib/comlib/tb + make tb_cdata2byte + time tbw tb_cdata2byte |\ + tee tb_cdata2byte_dsim.log | egrep "(FAIL|DONE)" + -> 7261.0 ns 354: DONE + -> real 0m0.385s user 0m0.041s sys 0m0.006s - rlink core test @@ -88,8 +96,8 @@ Guide to running w11a test benches make tb_rlink_direct time tbw tb_rlink_direct |\ tee tb_rlink_direct_dsim.log | egrep "(FAIL|DONE)" - -> 147755.0 ns 7378: DONE - -> real 0m00.317s user 0m00.324s sys 0m00.028s + -> 78975.0 ns 3939: DONE + -> real 0m00.508s user 0m00.262s sys 0m00.028s - rlink core test via serial port interface @@ -97,13 +105,13 @@ Guide to running w11a test benches make tb_rlink_sp1c time tbw tb_rlink_sp1c tb_rlink_sp1c_stim.dat |\ tee tb_rlink_sp1c_stim2_dsim.log | egrep "(FAIL|DONE)" - -> 24695.0 ns 1225: DONE - -> real 0m0.133s user 0m0.104s sys 0m0.008s + -> 27595.0 ns 1370: DONE + -> real 0m0.250s user 0m0.108s sys 0m0.011s time tbw tb_rlink_sp1c tb_rlink_stim.dat |\ tee tb_rlink_sp1c_dsim.log | egrep "(FAIL|DONE)" - -> 551935.0 ns 27587: DONE - -> real 0m01.714s user 0m01.704s sys 0m00.044s + -> 420295.0 ns 21005: DONE + -> real 0m02.271s user 0m01.360s sys 0m00.040s - w11a core test (using behavioural model) @@ -119,7 +127,7 @@ Guide to running w11a test benches make ghdl_tmp_clean && make tb_pdp11core_ssim time tbw tb_pdp11core_ssim |\ tee tb_pdp11core_ssim.log | egrep "(FAIL|DONE)" - -> 1220255.0 ns 61073: DONE + -> 1220255.0 ns 61073: DONE -> real 1m09.738s user 1m09.588s sys 0m00.096s - s3board sram controller test @@ -208,8 +216,8 @@ Guide to running w11a test benches time ti_rri --run="tbw tb_tst_rlink_s3" --fifo --logl=3 -- \ "package require tst_rlink" "tst_rlink::setup" "tst_rlink::test_all" |\ tee tb_tst_rlink_s3_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 960540.0 ns 48017: DONE - -> real 0m4.470s + -> 672560.0 ns 33618: DONE + -> user 0m03.355s - sys_tst_rlink_n2 test bench @@ -218,8 +226,8 @@ Guide to running w11a test benches time ti_rri --run="tbw tb_tst_rlink_n2" --fifo --logl=3 -- \ "package require tst_rlink" "tst_rlink::setup" "tst_rlink::test_all" |\ tee tb_tst_rlink_n2_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 960560.0 ns 48017: DONE - -> real 0m4.717s + -> 674740.0 ns 33726: DONE + -> user 0m03.362s - sys_tst_rlink_n3 test bench @@ -228,8 +236,8 @@ Guide to running w11a test benches time ti_rri --run="tbw tb_tst_rlink_n3" --fifo --logl=3 -- \ "package require tst_rlink" "tst_rlink::setup" "tst_rlink::test_all" |\ tee tb_tst_rlink_n3_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 480380.0 ns 48017: DONE - -> real 0m4.860s + -> 336390.0 ns 33618: DONE + -> user 0m03.434s 4c. w11a systems ----------------------------------------------------- @@ -248,8 +256,8 @@ Guide to running w11a test benches "rw11::setup_cpu" \ "rw11::run_pdpcp ../../../../w11a/tb/tb_pdp11core_stim.dat" |\ tee tb_w11a_s3_stim2_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 7328980.0 ns 366439: DONE - -> real 0m45.225s user 0m43.631s sys 0m0.400s + -> 9864500.0 ns 493215: DONE + -> real 0m59.728s user 0m58.586s sys 0m0.576s - sys_w11a_n2 test bench @@ -259,8 +267,8 @@ Guide to running w11a test benches "rw11::setup_cpu" \ "rw11::run_pdpcp ../../../../w11a/tb/tb_pdp11core_stim.dat" |\ tee tb_w11a_n2_stim2_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 7372840.0 ns 368631: DONE - -> real 0m55.536s user 0m52.967s sys 0m0.520s + -> 9880260.0 ns 494002: DONE + -> real 1m10.632s user 1m09.824s sys 0m0.599s - sys_w11a_n3 test bench @@ -270,8 +278,8 @@ Guide to running w11a test benches "rw11::setup_cpu" \ "rw11::run_pdpcp ../../../../w11a/tb/tb_pdp11core_stim.dat" |\ tee tb_w11a_n3_stim2_dsim.log | egrep "(-[EFW]:|FAIL|PEND|DONE)" - -> 5121571.1 ns 368738: DONE - -> real 0m54.908s user 0m51.831s sys 0m0.512s + -> 6915376.6 ns 497892: DONE + -> real 1m07.862s user 1m07.695s sys 0m0.427s A new, modular w11a test bench is under construction. So far it is very incomplete. This very preliminary version can be executed with @@ -283,6 +291,6 @@ Guide to running w11a test benches time ti_rri --pack=rw11 --run="tbw tb_w11a_n2" --fifo --logl=3 -- \ "rw11::setup_cpu" "rw11::tbench @w11a_all.dat" | \ tee w11a_tbench_dsim.log | egrep "(-[EFW]:|FAIL|PASS|DONE)" - -> 5019660.0 ns 250972: DONE - -> real 0m32.501s user 0m31.082s sys 0m0.500s + -> 7081280.0 ns 354053: DONE + -> real 0m43.742s user 0m44.084s sys 0m0.379s diff --git a/rtl/bplib/bpgen/bpgenrbuslib.vhd b/rtl/bplib/bpgen/bpgenrbuslib.vhd index 875e4d39..8c0edfd3 100644 --- a/rtl/bplib/bpgen/bpgenrbuslib.vhd +++ b/rtl/bplib/bpgen/bpgenrbuslib.vhd @@ -1,6 +1,6 @@ --- $Id: bpgenrbuslib.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: bpgenrbuslib.vhd 583 2014-08-16 07:40:12Z mueller $ -- --- Copyright 2013- by Walter F.J. Mueller +-- Copyright 2013-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,9 +16,10 @@ -- Description: Generic Board/Part components using rbus -- -- Dependencies: - --- Tool versions: 12.1, 13.3; ghdl 0.26-0.29 +-- Tool versions: 12.1-14.7; ghdl 0.26-0.31 -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.1 rb_mreq addr now 16 bit -- 2013-01-26 476 1.0 Initial version (extracted from bpgenlib) ------------------------------------------------------------------------------ @@ -37,7 +38,7 @@ component bp_swibtnled_rbus is -- swi,btn,led handling /w rbus icept BWIDTH : positive := 4; -- BTN port width LWIDTH : positive := 4; -- LED port width DEBOUNCE : boolean := true; -- instantiate debouncer for SWI,BTN - RB_ADDR : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit := '0'; -- reset @@ -57,7 +58,7 @@ component sn_humanio_rbus is -- human i/o handling /w rbus intercept generic ( BWIDTH : positive := 4; -- BTN port width DEBOUNCE : boolean := true; -- instantiate debouncer for SWI,BTN - RB_ADDR : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit := '0'; -- reset @@ -80,7 +81,7 @@ end component; component sn_humanio_demu_rbus is -- human i/o swi,btn,led only /w rbus generic ( DEBOUNCE : boolean := true; -- instantiate debouncer for SWI,BTN - RB_ADDR : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit := '0'; -- reset diff --git a/rtl/bplib/bpgen/sn_humanio_demu_rbus.vhd b/rtl/bplib/bpgen/sn_humanio_demu_rbus.vhd index ee154823..d6c64df0 100644 --- a/rtl/bplib/bpgen/sn_humanio_demu_rbus.vhd +++ b/rtl/bplib/bpgen/sn_humanio_demu_rbus.vhd @@ -1,6 +1,6 @@ --- $Id: sn_humanio_demu_rbus.vhd 472 2013-01-06 14:39:10Z mueller $ +-- $Id: sn_humanio_demu_rbus.vhd 583 2014-08-16 07:40:12Z mueller $ -- --- Copyright 2013- by Walter F.J. Mueller +-- Copyright 2013-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.3; ghdl 0.0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -28,6 +28,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.1 rb_mreq addr now 16 bit -- 2013-01-06 472 1.0 Initial version (cloned from sn_humanio_rbus ------------------------------------------------------------------------------ -- @@ -68,7 +69,7 @@ use work.bpgenlib.all; entity sn_humanio_demu_rbus is -- human i/o swi,btn,led only /w rbus generic ( DEBOUNCE : boolean := true; -- instantiate debouncer for SWI,BTN - RB_ADDR : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit := '0'; -- reset @@ -206,7 +207,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 2)=RB_ADDR(7 downto 2) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 2)=RB_ADDR(15 downto 2) then n.rbsel := '1'; end if; diff --git a/rtl/bplib/bpgen/sn_humanio_rbus.vhd b/rtl/bplib/bpgen/sn_humanio_rbus.vhd index 7c48e4e3..f9076e1f 100644 --- a/rtl/bplib/bpgen/sn_humanio_rbus.vhd +++ b/rtl/bplib/bpgen/sn_humanio_rbus.vhd @@ -1,6 +1,6 @@ --- $Id: sn_humanio_rbus.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: sn_humanio_rbus.vhd 583 2014-08-16 07:40:12Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 11.4, 12.1, 13.1; ghdl 0.26-0.29 +-- Tool versions: xst 11.4-14.7; ghdl 0.26-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -31,6 +31,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.3 rb_mreq addr now 16 bit -- 2011-11-19 427 1.2.1 now numeric_std clean -- 2011-08-14 406 1.2 common register layout with bp_swibtnled_rbus -- 2011-08-07 404 1.3 add pipeline regs ledin,(swi,btn,led,dp,dat)eff @@ -78,7 +79,7 @@ entity sn_humanio_rbus is -- human i/o handling /w rbus intercept generic ( BWIDTH : positive := 4; -- BTN port width DEBOUNCE : boolean := true; -- instantiate debouncer for SWI,BTN - RB_ADDR : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit := '0'; -- reset @@ -223,7 +224,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 2)=RB_ADDR(7 downto 2) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 2)=RB_ADDR(15 downto 2) then n.rbsel := '1'; end if; diff --git a/rtl/bplib/fx2rlink/fx2rlinklib.vhd b/rtl/bplib/fx2rlink/fx2rlinklib.vhd index 6a19c901..63d5d935 100644 --- a/rtl/bplib/fx2rlink/fx2rlinklib.vhd +++ b/rtl/bplib/fx2rlink/fx2rlinklib.vhd @@ -1,4 +1,4 @@ --- $Id: fx2rlinklib.vhd 525 2013-07-06 12:19:39Z mueller $ +-- $Id: fx2rlinklib.vhd 610 2014-12-09 22:44:43Z mueller $ -- -- Copyright 2013- by Walter F.J. Mueller -- @@ -16,10 +16,11 @@ -- Description: Definitions for rlink + fx2 interface combos -- -- Dependencies: - --- Tool versions: xst 13.3; ghdl 0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.29-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.1 use new rlink v4 iface generics and 4 bit STAT -- 2013-04-20 509 1.0 Initial version ------------------------------------------------------------------------------ @@ -41,22 +42,23 @@ package fx2rlinklib is component rlink_sp1c_fx2 is -- rlink_core8+serport_1clk+fx2_ic combo generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id IFAWIDTH : natural := 5; -- ser input fifo addr width (0=none) OFAWIDTH : natural := 5; -- ser output fifo addr width (0=none) PETOWIDTH : positive := 10; -- fx2 packet end time-out counter width CCWIDTH : positive := 5; -- fx2 chunk counter width - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon; -- SB_CNTL for rbmon (-1=none) + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1; -- SB_CNTL for rbmon (-1=none) CDWIDTH : positive := 13; -- clk divider width CDINIT : natural := 15); -- clk divider initial/reset setting port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- 1 usec clock enable CE_MSEC : in slbit; -- 1 msec clock enable - CE_INT : in slbit := '0'; -- rri ito time unit clock enable + CE_INT : in slbit := '0'; -- rri ato time unit clock enable RESET : in slbit; -- reset ENAXON : in slbit; -- enable xon/xoff handling ENAESC : in slbit; -- enable xon/xoff escaping @@ -68,7 +70,7 @@ component rlink_sp1c_fx2 is -- rlink_core8+serport_1clk+fx2_ic combo RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags RL_MONI : out rl_moni_type; -- rlink_core: monitor port RLB_MONI : out rlb_moni_type; -- rlink 8b: monitor port SER_MONI : out serport_moni_type; -- ser: monitor port diff --git a/rtl/bplib/fx2rlink/rlink_sp1c_fx2.vhd b/rtl/bplib/fx2rlink/rlink_sp1c_fx2.vhd index c36dc256..682b8951 100644 --- a/rtl/bplib/fx2rlink/rlink_sp1c_fx2.vhd +++ b/rtl/bplib/fx2rlink/rlink_sp1c_fx2.vhd @@ -1,6 +1,6 @@ --- $Id: rlink_sp1c_fx2.vhd 525 2013-07-06 12:19:39Z mueller $ +-- $Id: rlink_sp1c_fx2.vhd 610 2014-12-09 22:44:43Z mueller $ -- --- Copyright 2013- by Walter F.J. Mueller +-- Copyright 2013-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -23,7 +23,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.1; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri ifa ofa @@ -31,6 +31,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.1 use new rlink v4 iface generics and 4 bit STAT -- 2013-04-20 509 1.0 Initial version (derived from rlink_sp1c) ------------------------------------------------------------------------------ @@ -46,22 +47,23 @@ use work.fx2lib.all; entity rlink_sp1c_fx2 is -- rlink_core8+serport_1clk+fx2_ic combo generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id IFAWIDTH : natural := 5; -- ser input fifo addr width (0=none) OFAWIDTH : natural := 5; -- ser output fifo addr width (0=none) PETOWIDTH : positive := 10; -- fx2 packet end time-out counter width CCWIDTH : positive := 5; -- fx2 chunk counter width - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon; -- SB_CNTL for rbmon (-1=none) + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1; -- SB_CNTL for rbmon (-1=none) CDWIDTH : positive := 13; -- clk divider width CDINIT : natural := 15); -- clk divider initial/reset setting port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- 1 usec clock enable CE_MSEC : in slbit; -- 1 msec clock enable - CE_INT : in slbit := '0'; -- rri ito time unit clock enable + CE_INT : in slbit := '0'; -- rri ato time unit clock enable RESET : in slbit; -- reset ENAXON : in slbit; -- enable xon/xoff handling ENAESC : in slbit; -- enable xon/xoff escaping @@ -73,7 +75,7 @@ entity rlink_sp1c_fx2 is -- rlink_core8+serport_1clk+fx2_ic combo RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags RL_MONI : out rl_moni_type; -- rlink_core: monitor port RLB_MONI : out rlb_moni_type; -- rlink 8b: monitor port SER_MONI : out serport_moni_type; -- ser: monitor port @@ -119,10 +121,11 @@ begin CORE : rlink_core8 generic map ( - ATOWIDTH => ATOWIDTH, - ITOWIDTH => ITOWIDTH, - CPREF => CPREF, + BTOWIDTH => BTOWIDTH, + RTAWIDTH => RTAWIDTH, + SYSID => SYSID, ENAPIN_RLMON => ENAPIN_RLMON, + ENAPIN_RLBMON=> ENAPIN_RLBMON, ENAPIN_RBMON => ENAPIN_RBMON) port map ( CLK => CLK, diff --git a/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom b/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom deleted file mode 100644 index 912d53c2..00000000 --- a/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vbom +++ /dev/null @@ -1,7 +0,0 @@ -# libs -../../../vlib/slvtypes.vhd -../../nxcramlib/nxcramlib.vhd -# components -../../nxcramlib/nx_cram_dummy.vbom -# design -nexys2_fusp_dummy.vhd diff --git a/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd b/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd deleted file mode 100644 index bbc23aaf..00000000 --- a/rtl/bplib/nexys2/tb/nexys2_fusp_dummy.vhd +++ /dev/null @@ -1,92 +0,0 @@ --- $Id: nexys2_fusp_dummy.vhd 467 2013-01-02 19:49:05Z mueller $ --- --- Copyright 2010-2011 by Walter F.J. Mueller --- --- This program is free software; you may redistribute 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. --- --- 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 complete details. --- ------------------------------------------------------------------------------- --- Module Name: nexys2_fusp_dummy - syn --- Description: nexys2 minimal target (base; serport loopback) --- --- Dependencies: - --- To test: tb_nexys2 --- Target Devices: generic --- Tool versions: xst 11.4, 12.1, 13.1; ghdl 0.26-0.29 --- --- Revision History: --- Date Rev Version Comment --- 2011-12-23 444 1.3 remove clksys output hack --- 2011-11-26 433 1.2 use nxcramlib --- 2011-11-23 432 1.1 remove O_FLA_CE_N port from n2_cram_dummy --- 2010-11-13 338 1.0.2 add O_CLKSYS (for DCM derived system clock) --- 2010-11-06 336 1.0.1 rename input pin CLK -> I_CLK50 --- 2010-05-28 295 1.0 Initial version (derived from s3board_fusp_dummy) ------------------------------------------------------------------------------- - -library ieee; -use ieee.std_logic_1164.all; - -use work.slvtypes.all; -use work.nxcramlib.all; - -entity nexys2_fusp_dummy is -- NEXYS 2 dummy (base+fusp; loopback) - -- implements nexys2_fusp_aif - port ( - I_CLK50 : in slbit; -- 50 MHz board clock - I_RXD : in slbit; -- receive data (board view) - O_TXD : out slbit; -- transmit data (board view) - I_SWI : in slv8; -- n2 switches - I_BTN : in slv4; -- n2 buttons - O_LED : out slv8; -- n2 leds - O_ANO_N : out slv4; -- 7 segment disp: anodes (act.low) - O_SEG_N : out slv8; -- 7 segment disp: segments (act.low) - O_MEM_CE_N : out slbit; -- cram: chip enable (act.low) - O_MEM_BE_N : out slv2; -- cram: byte enables (act.low) - O_MEM_WE_N : out slbit; -- cram: write enable (act.low) - O_MEM_OE_N : out slbit; -- cram: output enable (act.low) - O_MEM_ADV_N : out slbit; -- cram: address valid (act.low) - O_MEM_CLK : out slbit; -- cram: clock - O_MEM_CRE : out slbit; -- cram: command register enable - I_MEM_WAIT : in slbit; -- cram: mem wait - O_MEM_ADDR : out slv23; -- cram: address lines - IO_MEM_DATA : inout slv16; -- cram: data lines - O_FLA_CE_N : out slbit; -- flash ce.. (act.low) - O_FUSP_RTS_N : out slbit; -- fusp: rs232 rts_n - I_FUSP_CTS_N : in slbit; -- fusp: rs232 cts_n - I_FUSP_RXD : in slbit; -- fusp: rs232 rx - O_FUSP_TXD : out slbit -- fusp: rs232 tx - ); -end nexys2_fusp_dummy; - -architecture syn of nexys2_fusp_dummy is - -begin - - O_TXD <= I_RXD; -- loop back - O_FUSP_TXD <= I_FUSP_RXD; - O_FUSP_RTS_N <= I_FUSP_CTS_N; - - CRAM : nx_cram_dummy -- connect CRAM to protection dummy - port map ( - O_MEM_CE_N => O_MEM_CE_N, - O_MEM_BE_N => O_MEM_BE_N, - O_MEM_WE_N => O_MEM_WE_N, - O_MEM_OE_N => O_MEM_OE_N, - O_MEM_ADV_N => O_MEM_ADV_N, - O_MEM_CLK => O_MEM_CLK, - O_MEM_CRE => O_MEM_CRE, - I_MEM_WAIT => I_MEM_WAIT, - O_MEM_ADDR => O_MEM_ADDR, - IO_MEM_DATA => IO_MEM_DATA - ); - - O_FLA_CE_N <= '1'; -- keep Flash memory disabled - -end syn; diff --git a/rtl/sys_gen/tst_fx2loop/Makefile b/rtl/sys_gen/tst_fx2loop/Makefile index dfaf7b53..819e4334 100644 --- a/rtl/sys_gen/tst_fx2loop/Makefile +++ b/rtl/sys_gen/tst_fx2loop/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-11-08 602 1.3 rename realclean->distclean # 2013-01-05 470 1.2 fix LDLIBS (must come after objs) # 2012-02-26 458 1.1 add tst_fx2loop_si # 2011-12-26 445 1.0 Initial version @@ -11,7 +12,7 @@ NGC_all = $(VBOM_all:.vbom=.ngc) # include $(RETROBASE)/rtl/make/xflow_default_nexys2.mk # -.PHONY : all clean realclean +.PHONY : all clean distclean # all : tst_fx2loop tst_fx2loop_si # @@ -19,7 +20,7 @@ clean : ise_clean rm -f tst_fx2loop rm -f tst_fx2loop_si # -realclean : +distclean : rm -f tst_fx2loop tst_fx2loop_si # CFLAGS = -Wall -O2 -g @@ -32,6 +33,7 @@ tst_fx2loop_si : tst_fx2loop_si.c # #---- # +include $(RETROBASE)/tools/make/dontincdep.mk include $(RETROBASE)/rtl/make/generic_xflow.mk # ifndef DONTINCDEP diff --git a/rtl/sys_gen/tst_rlink/Makefile b/rtl/sys_gen/tst_rlink/Makefile index 9e35b1db..61576879 100644 --- a/rtl/sys_gen/tst_rlink/Makefile +++ b/rtl/sys_gen/tst_rlink/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment @@ -9,7 +9,7 @@ NGC_all = $(VBOM_all:.vbom=.ngc) # include $(RETROBASE)/rtl/make/xflow_default_s3board.mk # -.PHONY : all clean realclean +.PHONY : all clean # all : $(NGC_all) # @@ -18,6 +18,7 @@ clean : ise_clean # #---- # +include $(RETROBASE)/tools/make/dontincdep.mk include $(RETROBASE)/rtl/make/generic_xflow.mk # ifndef DONTINCDEP diff --git a/rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd b/rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd index 74204e70..9ed723f5 100644 --- a/rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd +++ b/rtl/sys_gen/tst_rlink/nexys2/sys_tst_rlink_n2.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_n2.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: sys_tst_rlink_n2.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -27,10 +27,11 @@ -- Test bench: tb/tb_tst_rlink_n2 -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 14.7 131013 xc3s1200e-4 914 1951 128 1321 t 15.7 -- 2012-12-27 453 13.3 O76d xc3s1200e-4 754 1605 96 1057 t 14.5 -- 2011-12-18 440 13.1 O40d xc3s1200e-4 754 1605 96 1057 t 16.8 -- 2011-06-26 385 12.1 M53d xc3s1200e-4 688 1500 68 993 t 16.2 @@ -39,6 +40,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-11-09 603 1.4 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.3 rb_mreq addr now 16 bit -- 2011-12-23 444 1.2 remove clksys output hack -- 2011-12-18 440 1.1.6 use now rbd_tst_rlink and rlink_sp1c -- 2011-11-26 433 1.1.5 use nx_cram_dummy now @@ -138,12 +141,12 @@ architecture syn of sys_tst_rlink_n2 is signal RB_SRES_TST : rb_sres_type := rb_sres_init; signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal SER_MONI : serport_moni_type := serport_moni_init; signal STAT : slv8 := (others=>'0'); - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := x"fef0"; -- fef0/4: 1111 1110 1111 00xx begin @@ -216,9 +219,9 @@ begin RLINK : rlink_sp1c generic map ( - ATOWIDTH => 6, - ITOWIDTH => 6, - CPREF => c_rlink_cpref, + BTOWIDTH => 6, + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, OFAWIDTH => 5, ENAPIN_RLMON => sbcntl_sbf_rlmon, diff --git a/rtl/sys_gen/tst_rlink/nexys3/sys_tst_rlink_n3.vhd b/rtl/sys_gen/tst_rlink/nexys3/sys_tst_rlink_n3.vhd index 06ae4841..90bc1c55 100644 --- a/rtl/sys_gen/tst_rlink/nexys3/sys_tst_rlink_n3.vhd +++ b/rtl/sys_gen/tst_rlink/nexys3/sys_tst_rlink_n3.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_n3.vhd 538 2013-10-06 17:21:25Z mueller $ +-- $Id: sys_tst_rlink_n3.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2011-2013 by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -27,15 +27,18 @@ -- Test bench: tb/tb_tst_rlink_n3 -- -- Target Devices: generic --- Tool versions: xst 13.1, 14.6; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 13.1 131013 xc6slx16-2 917 1379 64 513 t 8.9 -- 2011-12-18 440 13.1 O40d xc6slx16-2 752 1258 48 439 t 7.9 -- 2011-11-26 433 13.1 O40d xc6slx16-2 722 1199 36 423 t 9.7 -- -- Revision History: -- Date Rev Version Comment +-- 2014-11-09 603 1.4 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.3 rb_mreq addr now 16 bit -- 2013-10-06 538 1.2 pll support, use clksys_vcodivide ect -- 2011-12-18 440 1.1.1 use [rt]xok for DSP_DP -- 2011-12-11 438 1.1 use now rbd_tst_rlink and rlink_sp1c @@ -131,12 +134,12 @@ architecture syn of sys_tst_rlink_n3 is signal RB_SRES_TST : rb_sres_type := rb_sres_init; signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal SER_MONI : serport_moni_type := serport_moni_init; signal STAT : slv8 := (others=>'0'); - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := x"fef0"; -- fef0/4: 1111 1110 1111 00xx begin @@ -214,9 +217,9 @@ begin RLINK : rlink_sp1c generic map ( - ATOWIDTH => 6, - ITOWIDTH => 6, - CPREF => c_rlink_cpref, + BTOWIDTH => 6, + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, OFAWIDTH => 5, ENAPIN_RLMON => sbcntl_sbf_rlmon, diff --git a/rtl/sys_gen/tst_rlink/rbd_tst_rlink.vhd b/rtl/sys_gen/tst_rlink/rbd_tst_rlink.vhd index 24a5125d..032ff743 100644 --- a/rtl/sys_gen/tst_rlink/rbd_tst_rlink.vhd +++ b/rtl/sys_gen/tst_rlink/rbd_tst_rlink.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_tst_rlink.vhd 438 2011-12-11 23:40:52Z mueller $ +-- $Id: rbd_tst_rlink.vhd 603 2014-11-09 22:50:26Z mueller $ -- --- Copyright 2011- by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -26,16 +26,18 @@ -- Test bench: nexys3/tb/tb_tst_rlink_n3 -- -- Target Devices: generic --- Tool versions: xst 13.1; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-11-09 603 4.0 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-11-11 351 1.0 Initial version (derived from tst_rlink) ------------------------------------------------------------------------------ -- Usage of STAT signal: -- STAT(0): timer 0 busy -- STAT(1): timer 1 busy --- STAT(2:7): unused +-- STAT(2:3): unused library ieee; use ieee.std_logic_1164.all; @@ -55,7 +57,7 @@ entity rbd_tst_rlink is -- rbus device for tst_rlink RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response RB_LAM : out slv16; -- rbus: look at me - RB_STAT : out slv3; -- rbus: status flags + RB_STAT : out slv4; -- rbus: status flags RB_SRES_TOP : in rb_sres_type; -- top-level rb_sres, for rbd_mon RXSD : in slbit; -- serport rxsd, for rbd_emon RXACT : in slbit; -- serport rxact, for rbd_emon @@ -81,12 +83,12 @@ architecture syn of rbd_tst_rlink is signal TIM1_DONE : slbit := '0'; signal TIM1_BUSY : slbit := '0'; - constant rbaddr_mon : slv8 := "11111100"; -- 111111xx - constant rbaddr_emon : slv8 := "11111000"; -- 111110xx - constant rbaddr_bram : slv8 := "11110100"; -- 111101xx - constant rbaddr_test : slv8 := "11110000"; -- 111100xx - constant rbaddr_tim1 : slv8 := "11100001"; -- 11100001 - constant rbaddr_tim0 : slv8 := "11100000"; -- 11100000 + constant rbaddr_mon : slv16 := x"ffe8"; -- ffe8/8: 1111 1111 1110 1xxx + constant rbaddr_test : slv16 := x"ffe0"; -- ffe0/8: 1111 1111 1110 0xxx + constant rbaddr_emon : slv16 := x"ffd0"; -- ffd0/4: 1111 1111 1101 00xx + constant rbaddr_tim1 : slv16 := x"fe11"; -- fe11/1: 1111 1110 0001 0001 + constant rbaddr_tim0 : slv16 := x"fe10"; -- fe10/1: 1111 1110 0001 0000 + constant rbaddr_bram : slv16 := x"fe00"; -- fe00/2: 1111 1110 0000 00xx begin diff --git a/rtl/sys_gen/tst_rlink/s3board/sys_tst_rlink_s3.vhd b/rtl/sys_gen/tst_rlink/s3board/sys_tst_rlink_s3.vhd index c4bf874f..2dea40a1 100644 --- a/rtl/sys_gen/tst_rlink/s3board/sys_tst_rlink_s3.vhd +++ b/rtl/sys_gen/tst_rlink/s3board/sys_tst_rlink_s3.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_s3.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: sys_tst_rlink_s3.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2011- by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -26,14 +26,17 @@ -- Test bench: tb/tb_tst_rlink_s3 -- -- Target Devices: generic --- Tool versions: xst 13.1; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 14.7 131013 xc3s1000e-4 916 1973 128 1316 t 15.9 -- 2011-12-22 442 13.1 O40d xc3s1000e-4 765 1672 96 1088 t 12.6 -- -- Revision History: -- Date Rev Version Comment +-- 2014-11-09 603 1.2 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.1 rb_mreq addr now 16 bit -- 2011-12-22 442 1.0 Initial version (derived from sys_tst_rlink_n2) ------------------------------------------------------------------------------ -- Usage of S3board switches, Buttons, LEDs: @@ -119,12 +122,12 @@ architecture syn of sys_tst_rlink_s3 is signal RB_SRES_TST : rb_sres_type := rb_sres_init; signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal SER_MONI : serport_moni_type := serport_moni_init; signal STAT : slv8 := (others=>'0'); - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := x"fef0"; -- fef0/4: 1111 1110 1111 00xx begin @@ -187,9 +190,9 @@ begin RLINK : rlink_sp1c generic map ( - ATOWIDTH => 6, - ITOWIDTH => 6, - CPREF => c_rlink_cpref, + BTOWIDTH => 6, + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, OFAWIDTH => 5, ENAPIN_RLMON => sbcntl_sbf_rlmon, diff --git a/rtl/sys_gen/tst_rlink_cuff/Makefile b/rtl/sys_gen/tst_rlink_cuff/Makefile index 46e5bec5..7c7b15d8 100644 --- a/rtl/sys_gen/tst_rlink_cuff/Makefile +++ b/rtl/sys_gen/tst_rlink_cuff/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment @@ -9,7 +9,7 @@ NGC_all = $(VBOM_all:.vbom=.ngc) # include $(RETROBASE)/rtl/make/xflow_default_nexys2.mk # -.PHONY : all clean realclean +.PHONY : all clean # all : $(NGC_all) # @@ -18,6 +18,7 @@ clean : ise_clean # #---- # +include $(RETROBASE)/tools/make/dontincdep.mk include $(RETROBASE)/rtl/make/generic_xflow.mk # ifndef DONTINCDEP diff --git a/rtl/sys_gen/tst_rlink_cuff/atlys/sys_tst_rlink_cuff_atlys.vhd b/rtl/sys_gen/tst_rlink_cuff/atlys/sys_tst_rlink_cuff_atlys.vhd index 95b45ab3..810a2965 100644 --- a/rtl/sys_gen/tst_rlink_cuff/atlys/sys_tst_rlink_cuff_atlys.vhd +++ b/rtl/sys_gen/tst_rlink_cuff/atlys/sys_tst_rlink_cuff_atlys.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_cuff_atlys.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: sys_tst_rlink_cuff_atlys.vhd 583 2014-08-16 07:40:12Z mueller $ -- --- Copyright 2013- by Walter F.J. Mueller +-- Copyright 2013-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -27,7 +27,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.3; ghdl 0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri ctl/MHz @@ -35,6 +35,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.1 rb_mreq addr now 16 bit -- 2013-01-06 472 1.0 Initial version; derived from sys_tst_rlink_cuff_n3 -- and sys_tst_fx2loop_atlys ------------------------------------------------------------------------------ @@ -140,7 +141,7 @@ architecture syn of sys_tst_rlink_cuff_atlys is signal FX2_TX2AFULL : slbit := '0'; signal FX2_MONI : fx2ctl_moni_type := fx2ctl_moni_init; - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := "0000000011000000"; -- 110000xx begin diff --git a/rtl/sys_gen/tst_rlink_cuff/nexys2/sys_tst_rlink_cuff_n2.vhd b/rtl/sys_gen/tst_rlink_cuff/nexys2/sys_tst_rlink_cuff_n2.vhd index 049a1d74..041a780b 100644 --- a/rtl/sys_gen/tst_rlink_cuff/nexys2/sys_tst_rlink_cuff_n2.vhd +++ b/rtl/sys_gen/tst_rlink_cuff/nexys2/sys_tst_rlink_cuff_n2.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_cuff_n2.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: sys_tst_rlink_cuff_n2.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2012-2013 by Walter F.J. Mueller +-- Copyright 2012-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -28,10 +28,11 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.3; ghdl 0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri ctl/MHz +-- 2014-12-20 614 14.7 131013 xc3s1200e-4 1023 2160 192 1486 p 16.0 ic2/ 50 -- 2013-01-04 469 13.3 O76d xc3s1200e-4 846 1798 160 1215 p 16.3 ic2/ 50 -- 2012-12-29 466 13.3 O76d xc3s1200e-4 808 1739 160 1172 p 16.3 as2/ 50 -- 2013-01-02 467 13.3 O76d xc3s1200e-4 843 1792 160 1209 p 15.2 ic2/ 50 @@ -39,6 +40,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.1 rb_mreq addr now 16 bit -- 2012-12-29 466 1.0 Initial version; derived from sys_tst_fx2loop_n2 -- the now obsoleted sys_tst_rlink_n2_cuff design ------------------------------------------------------------------------------ @@ -158,7 +160,7 @@ architecture syn of sys_tst_rlink_cuff_n2 is signal FX2_TX2AFULL : slbit := '0'; signal FX2_MONI : fx2ctl_moni_type := fx2ctl_moni_init; - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := "0000000011000000"; -- 110000xx begin diff --git a/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd b/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd index d32aaeea..9e24c740 100644 --- a/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd +++ b/rtl/sys_gen/tst_rlink_cuff/nexys3/sys_tst_rlink_cuff_n3.vhd @@ -1,6 +1,6 @@ --- $Id: sys_tst_rlink_cuff_n3.vhd 538 2013-10-06 17:21:25Z mueller $ +-- $Id: sys_tst_rlink_cuff_n3.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2013- by Walter F.J. Mueller +-- Copyright 2013-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -28,14 +28,15 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.3, 14.6; ghdl 0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri ctl/MHz --- 2013-01-04 469 13.3 O76d xc6slx16-2 ??? ???? ??? ???? p ??.? ic2/ 50 +-- 2014-12-20 614 14.4 131013 xc6slx16-2 1029 1519 104 566 p 9.2 ic2/100 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 1.2 rb_mreq addr now 16 bit -- 2013-10-06 538 1.1 pll support, use clksys_vcodivide ect -- 2012-12-29 466 1.0 Initial version; derived from sys_tst_rlink_cuff_n2 -- and sys_tst_fx2loop_n3 @@ -157,7 +158,7 @@ architecture syn of sys_tst_rlink_cuff_n3 is signal FX2_TX2AFULL : slbit := '0'; signal FX2_MONI : fx2ctl_moni_type := fx2ctl_moni_init; - constant rbaddr_hio : slv8 := "11000000"; -- 110000xx + constant rbaddr_hio : slv16 := "0000000011000000"; -- 110000xx begin diff --git a/rtl/sys_gen/tst_rlink_cuff/tst_rlink_cuff.vhd b/rtl/sys_gen/tst_rlink_cuff/tst_rlink_cuff.vhd index 281deb35..12eed490 100644 --- a/rtl/sys_gen/tst_rlink_cuff/tst_rlink_cuff.vhd +++ b/rtl/sys_gen/tst_rlink_cuff/tst_rlink_cuff.vhd @@ -1,6 +1,6 @@ --- $Id: tst_rlink_cuff.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: tst_rlink_cuff.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2012-2013 by Walter F.J. Mueller +-- Copyright 2012-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -25,10 +25,11 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.3; ghdl 0.29 +-- Tool versions: xst 13.3-14.7; ghdl 0.29-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.1 use new rlink v4 iface generics and 4 bit STAT -- 2013-01-02 467 1.0.1 use 64 usec led pulse width -- 2012-12-29 466 1.0 Initial version ------------------------------------------------------------------------------ @@ -84,7 +85,7 @@ architecture syn of tst_rlink_cuff is signal RB_SRES_TST : rb_sres_type := rb_sres_init; signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal SER_MONI : serport_moni_type := serport_moni_init; signal STAT : slv8 := (others=>'0'); @@ -117,9 +118,9 @@ begin RLCORE : rlink_core8 generic map ( - ATOWIDTH => 6, - ITOWIDTH => 6, - CPREF => c_rlink_cpref, + BTOWIDTH => 6, + RTAWIDTH => 12, + SYSID => (others=>'0'), ENAPIN_RLMON => sbcntl_sbf_rlmon, ENAPIN_RBMON => sbcntl_sbf_rbmon) port map ( diff --git a/rtl/sys_gen/tst_serloop/Makefile b/rtl/sys_gen/tst_serloop/Makefile index 53be7e89..84603070 100644 --- a/rtl/sys_gen/tst_serloop/Makefile +++ b/rtl/sys_gen/tst_serloop/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-11-08 602 1.1 rename realclean->distclean # 2011-10-14 416 1.0 Initial version # VBOM_all = $(wildcard *.vbom) @@ -9,17 +10,18 @@ NGC_all = $(VBOM_all:.vbom=.ngc) # include $(RETROBASE)/rtl/make/xflow_default_s3board.mk # -.PHONY : all clean realclean +.PHONY : all clean distclean # all : tst_serloop # clean : ise_clean # -realclean : +distclean : rm -f tst_serloop # #---- # +include $(RETROBASE)/tools/make/dontincdep.mk include $(RETROBASE)/rtl/make/generic_xflow.mk # ifndef DONTINCDEP diff --git a/rtl/sys_gen/w11a/nexys2/sys_w11a_n2.vhd b/rtl/sys_gen/w11a/nexys2/sys_w11a_n2.vhd index 614a0216..be825c7a 100644 --- a/rtl/sys_gen/w11a/nexys2/sys_w11a_n2.vhd +++ b/rtl/sys_gen/w11a/nexys2/sys_w11a_n2.vhd @@ -1,6 +1,6 @@ --- $Id: sys_w11a_n2.vhd 561 2014-06-09 17:22:50Z mueller $ +-- $Id: sys_w11a_n2.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2010-2013 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -41,6 +41,7 @@ -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 14.7 131013 xc3s1200e-4 1714 4896 366 3125 ok: -RL11,rlv4 -- 2014-06-08 561 14.7 131013 xc3s1200e-4 1626 4821 360 3052 ok: +RL11 -- 2014-06-01 558 14.7 131013 xc3s1200e-4 1561 4597 334 2901 ok: -- 2013-04-20 509 13.3 O76d xc3s1200e-4 1541 4598 334 2889 ok: now + FX2 ! @@ -68,6 +69,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.6 use new rlink v4 iface generics and 4 bit STAT +-- 2014-08-15 583 1.5 rb_mreq addr now 16 bit -- 2013-04-20 509 1.4 added fx2 (cuff) support; ATOWIDTH=7 -- 2011-12-23 444 1.3 remove clksys output hack -- 2011-12-18 440 1.2.7 use rlink_sp1c @@ -209,7 +212,7 @@ architecture syn of sys_w11a_n2 is signal DSP_DP : slv4 := (others=>'0'); signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal RLB_MONI : rlb_moni_type := rlb_moni_init; signal SER_MONI : serport_moni_type := serport_moni_init; @@ -271,9 +274,9 @@ architecture syn of sys_w11a_n2 is signal DISPREG : slv16 := (others=>'0'); - constant rbaddr_core0 : slv8 := "00000000"; - constant rbaddr_ibus : slv8 := "10000000"; - constant rbaddr_hio : slv8 := "11000000"; + constant rbaddr_core0 : slv16 := "0000000000000000"; + constant rbaddr_ibus : slv16 := "0000000010000000"; + constant rbaddr_hio : slv16 := "0000000011000000"; begin @@ -344,9 +347,9 @@ begin RLINK : rlink_sp1c_fx2 generic map ( - ATOWIDTH => 7, -- 128 cycles access timeout - ITOWIDTH => 6, -- 64 periods max idle timeout - CPREF => c_rlink_cpref, + BTOWIDTH => 7, -- 128 cycles access timeout + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, -- 32 word input fifo OFAWIDTH => 5, -- 32 word output fifo PETOWIDTH => sys_conf_fx2_petowidth, diff --git a/rtl/sys_gen/w11a/nexys3/sys_w11a_n3.vhd b/rtl/sys_gen/w11a/nexys3/sys_w11a_n3.vhd index c8b27f40..017a64bd 100644 --- a/rtl/sys_gen/w11a/nexys3/sys_w11a_n3.vhd +++ b/rtl/sys_gen/w11a/nexys3/sys_w11a_n3.vhd @@ -1,6 +1,6 @@ --- $Id: sys_w11a_n3.vhd 561 2014-06-09 17:22:50Z mueller $ +-- $Id: sys_w11a_n3.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2011-2013 by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -41,6 +41,7 @@ -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 14.7 131013 xc6slx16-2 1640 3692 150 1297 ok: -RL11,rlv4 -- 2014-06-08 561 14.7 131013 xc6slx16-2 1531 3500 142 1165 ok: +RL11 -- 2014-05-29 556 14.7 131013 xc6slx16-2 1459 3342 128 1154 ok: -- 2013-04-21 509 13.3 O76d xc6slx16-2 1516 3274 140 1184 ok: now + FX2 ! @@ -49,6 +50,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.7 use new rlink v4 iface generics and 4 bit STAT +-- 2014-08-15 583 1.6 rb_mreq addr now 16 bit -- 2013-10-06 538 1.5 pll support, use clksys_vcodivide ect -- 2013-04-21 509 1.4 added fx2 (cuff) support -- 2011-12-18 440 1.0.4 use rlink_sp1c @@ -172,7 +175,7 @@ architecture syn of sys_w11a_n3 is signal DSP_DP : slv4 := (others=>'0'); signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal RLB_MONI : rlb_moni_type := rlb_moni_init; signal SER_MONI : serport_moni_type := serport_moni_init; @@ -234,9 +237,9 @@ architecture syn of sys_w11a_n3 is signal DISPREG : slv16 := (others=>'0'); - constant rbaddr_core0 : slv8 := "00000000"; - constant rbaddr_ibus : slv8 := "10000000"; - constant rbaddr_hio : slv8 := "11000000"; + constant rbaddr_core0 : slv16 := "0000000000000000"; + constant rbaddr_ibus : slv16 := "0000000010000000"; + constant rbaddr_hio : slv16 := "0000000011000000"; begin @@ -312,9 +315,9 @@ begin RLINK : rlink_sp1c_fx2 generic map ( - ATOWIDTH => 7, -- 128 cycles access timeout - ITOWIDTH => 6, -- 64 periods max idle timeout - CPREF => c_rlink_cpref, + BTOWIDTH => 7, -- 128 cycles access timeout + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, -- 32 word input fifo OFAWIDTH => 5, -- 32 word output fifo PETOWIDTH => sys_conf_fx2_petowidth, diff --git a/rtl/sys_gen/w11a/s3board/sys_w11a_s3.vhd b/rtl/sys_gen/w11a/s3board/sys_w11a_s3.vhd index 704cf254..bdeefdea 100644 --- a/rtl/sys_gen/w11a/s3board/sys_w11a_s3.vhd +++ b/rtl/sys_gen/w11a/s3board/sys_w11a_s3.vhd @@ -1,6 +1,6 @@ --- $Id: sys_w11a_s3.vhd 561 2014-06-09 17:22:50Z mueller $ +-- $Id: sys_w11a_s3.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -39,6 +39,7 @@ -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-20 614 14.7 131013 xc3s1000-4 1455 4523 302 2807 OK: -RL11,rlv4 -- 2014-06-08 561 14.7 131013 xc3s1000-4 1374 4580 286 2776 OK: +RL11 -- 2014-06-01 558 14.7 131013 xc3s1000-4 1301 4306 270 2614 OK: -- 2011-12-21 442 13.1 O40d xc3s1000-4 1301 4307 270 2613 OK: LP+PC+DL+II @@ -75,6 +76,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.6 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.5 rb_mreq addr now 16 bit -- 2011-12-21 442 1.4.4 use rlink_sp1c; hio led usage now a for n2/n3 -- 2011-11-19 427 1.4.3 now numeric_std clean -- 2011-07-09 391 1.4.2 use now bp_rs232_2l4l_iob @@ -209,7 +212,7 @@ architecture syn of sys_w11a_s3 is signal DSP_DP : slv4 := (others=>'0'); signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal SER_MONI : serport_moni_type := serport_moni_init; @@ -266,9 +269,9 @@ architecture syn of sys_w11a_s3 is signal DISPREG : slv16 := (others=>'0'); - constant rbaddr_core0 : slv8 := "00000000"; - constant rbaddr_ibus : slv8 := "10000000"; - constant rbaddr_hio : slv8 := "11000000"; + constant rbaddr_core0 : slv16 := "0000000000000000"; + constant rbaddr_ibus : slv16 := "0000000010000000"; + constant rbaddr_hio : slv16 := "0000000011000000"; begin @@ -323,9 +326,9 @@ begin RLINK : rlink_sp1c generic map ( - ATOWIDTH => 6, -- 64 cycles access timeout - ITOWIDTH => 6, -- 64 periods max idle timeout - CPREF => c_rlink_cpref, + BTOWIDTH => 6, -- 64 cycles access timeout + RTAWIDTH => 12, + SYSID => (others=>'0'), IFAWIDTH => 5, -- 32 word input fifo OFAWIDTH => 5, -- 32 word output fifo ENAPIN_RLMON => sbcntl_sbf_rlmon, diff --git a/rtl/vlib/comlib/byte2cdata.vbom b/rtl/vlib/comlib/byte2cdata.vbom index 00d22b98..d3fa4391 100644 --- a/rtl/vlib/comlib/byte2cdata.vbom +++ b/rtl/vlib/comlib/byte2cdata.vbom @@ -1,4 +1,5 @@ # libs ../slvtypes.vhd +comlib.vhd # design byte2cdata.vhd diff --git a/rtl/vlib/comlib/byte2cdata.vhd b/rtl/vlib/comlib/byte2cdata.vhd index b97eb4f5..7e4d58a5 100644 --- a/rtl/vlib/comlib/byte2cdata.vhd +++ b/rtl/vlib/comlib/byte2cdata.vhd @@ -1,6 +1,6 @@ --- $Id: byte2cdata.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: byte2cdata.vhd 596 2014-10-17 19:50:07Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,10 +18,11 @@ -- Dependencies: - -- Test bench: - -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-17 596 2.0 re-write, commas now 2 byte sequences -- 2011-11-19 427 1.0.2 now numeric_std clean -- 2007-10-12 88 1.0.1 avoid ieee.std_logic_unsigned, use cast to unsigned -- 2007-08-27 76 1.0 Initial version @@ -32,40 +33,34 @@ use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.slvtypes.all; +use work.comlib.all; entity byte2cdata is -- byte stream -> 9bit comma,data - generic ( - CPREF : slv4 := "1000"; -- comma prefix - NCOMM : positive := 4); -- number of comma chars port ( CLK : in slbit; -- clock RESET : in slbit; -- reset DI : in slv8; -- input data - ENA : in slbit; -- write enable - BUSY : out slbit; -- write port hold + ENA : in slbit; -- input data enable + ERR : in slbit; -- input data error + BUSY : out slbit; -- input data busy DO : out slv9; -- output data; bit 8 = comma flag - VAL : out slbit; -- read valid - HOLD : in slbit -- read hold + VAL : out slbit; -- output data valid + HOLD : in slbit -- output data hold ); end byte2cdata; architecture syn of byte2cdata is - type state_type is ( - s_idle, - s_data, - s_escape - ); - type regs_type is record - data : slv9; -- current data - state : state_type; -- state + data : slv9; -- data + dataval : slbit; -- data valid + edpend : slbit; -- edata pending end record regs_type; constant regs_init : regs_type := ( - (others=>'0'), - s_idle + (others=>'0'), -- data + '0','0' -- dataval,edpend ); signal R_REGS : regs_type := regs_init; -- state registers @@ -73,10 +68,6 @@ architecture syn of byte2cdata is begin - assert NCOMM <= 14 - report "assert(NCOMM <= 14)" - severity FAILURE; - proc_regs: process (CLK) begin @@ -90,12 +81,13 @@ begin end process proc_regs; - proc_next: process (R_REGS, DI, ENA, HOLD) + proc_next: process (R_REGS, DI, ENA, ERR, HOLD) variable r : regs_type := regs_init; variable n : regs_type := regs_init; - variable ival : slbit := '0'; + variable idata : slv9 := (others=>'0'); + variable iesc : slbit := '0'; variable ibusy : slbit := '0'; begin @@ -103,46 +95,59 @@ begin r := R_REGS; n := R_REGS; - ival := '0'; - ibusy := '1'; + -- data path logic + idata := '1' & "00000" & "100"; -- clobber + iesc := '0'; - case r.state is - - when s_idle => - ibusy := '0'; - if ENA = '1' then - n.data := "0" & DI; - n.state := s_data; - if DI(7 downto 4) = CPREF then - if DI(3 downto 0) = "1111" then - n.state := s_escape; - elsif unsigned(DI(3 downto 0)) <= NCOMM then - n.data := "10000" & DI(3 downto 0); - n.state := s_data; - end if; + if r.edpend = '1' then + if DI(c_cdata_edf_pref) = c_cdata_ed_pref and + (not DI(c_cdata_edf_eci)) = DI(c_cdata_edf_ec) then + case DI(c_cdata_edf_ec) is + when c_cdata_ec_xon => + idata := '0' & c_cdata_xon; + when c_cdata_ec_xoff => + idata := '0' & c_cdata_xoff; + when c_cdata_ec_fill => + idata := '0' & c_cdata_fill; + when c_cdata_ec_esc => + idata := '0' & c_cdata_escape; + when others => + idata := '1' & "00000" & DI(c_cdata_edf_ec); + end case; + end if; + else + idata := '0' & DI; + if DI = c_cdata_escape then + iesc := '1'; + end if; + end if; + + -- control path logic + ibusy := '1'; + if HOLD = '0' then + ibusy := '0'; + n.dataval := '0'; + n.data := idata; + if ENA = '1' then + if r.edpend = '0' then + if iesc = '0' then + n.dataval := '1'; + else + n.edpend := '1'; end if; + else + n.dataval := '1'; + n.edpend := '0'; end if; - - when s_data => - ival := '1'; - if HOLD = '0' then - n.state := s_idle; - end if; - - when s_escape => - ibusy := '0'; - if ENA = '1' then - n.data := "0" & CPREF & DI(3 downto 0); - n.state := s_data; - end if; - - when others => null; - end case; + elsif ERR = '1' then + n.dataval := '1'; + end if; + end if; N_REGS <= n; - DO <= r.data; - VAL <= ival; + DO <= r.data; + VAL <= r.dataval; BUSY <= ibusy; end process proc_next; diff --git a/rtl/vlib/comlib/cdata2byte.vbom b/rtl/vlib/comlib/cdata2byte.vbom index 74fae6f2..8428f895 100644 --- a/rtl/vlib/comlib/cdata2byte.vbom +++ b/rtl/vlib/comlib/cdata2byte.vbom @@ -1,4 +1,5 @@ # libs ../slvtypes.vhd +comlib.vhd # design cdata2byte.vhd diff --git a/rtl/vlib/comlib/cdata2byte.vhd b/rtl/vlib/comlib/cdata2byte.vhd index 73cb265b..a5da5798 100644 --- a/rtl/vlib/comlib/cdata2byte.vhd +++ b/rtl/vlib/comlib/cdata2byte.vhd @@ -1,6 +1,6 @@ --- $Id: cdata2byte.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: cdata2byte.vhd 596 2014-10-17 19:50:07Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,10 +18,11 @@ -- Dependencies: - -- Test bench: - -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-12 596 2.0 re-write, commas now 2 byte sequences -- 2011-11-19 427 1.0.2 now numeric_std clean -- 2007-10-12 88 1.0.1 avoid ieee.std_logic_unsigned, use cast to unsigned -- 2007-06-30 62 1.0 Initial version @@ -32,42 +33,37 @@ use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.slvtypes.all; +use work.comlib.all; entity cdata2byte is -- 9bit comma,data -> byte stream - generic ( - CPREF : slv4 := "1000"; -- comma prefix - NCOMM : positive := 4); -- number of comma chars port ( CLK : in slbit; -- clock RESET : in slbit; -- reset + ESCXON : in slbit; -- enable xon/xoff escaping + ESCFILL : in slbit; -- enable fill escaping DI : in slv9; -- input data; bit 8 = comma flag - ENA : in slbit; -- write enable - BUSY : out slbit; -- write port hold + ENA : in slbit; -- input data enable + BUSY : out slbit; -- input data busy DO : out slv8; -- output data - VAL : out slbit; -- read valid - HOLD : in slbit -- read hold + VAL : out slbit; -- output data valid + HOLD : in slbit -- output data hold ); end cdata2byte; architecture syn of cdata2byte is - type state_type is ( - s_idle, - s_data, - s_comma, - s_escape, - s_edata - ); - type regs_type is record - data : slv8; -- current data - state : state_type; -- state + data : slv8; -- data + ecode : slv3; -- ecode + dataval : slbit; -- data valid + ecodeval : slbit; -- ecode valid end record regs_type; constant regs_init : regs_type := ( - (others=>'0'), - s_idle + (others=>'0'), -- data + (others=>'0'), -- ecode + '0','0' -- dataval,ecodeval ); signal R_REGS : regs_type := regs_init; -- state registers @@ -75,10 +71,6 @@ architecture syn of cdata2byte is begin - assert NCOMM <= 14 - report "assert(NCOMM <= 14)" - severity FAILURE; - proc_regs: process (CLK) begin @@ -92,79 +84,83 @@ begin end process proc_regs; - proc_next: process (R_REGS, DI, ENA, HOLD) + proc_next: process (R_REGS, DI, ENA, HOLD, ESCXON, ESCFILL) variable r : regs_type := regs_init; variable n : regs_type := regs_init; - variable ido : slv8 := (others=>'0'); - variable ival : slbit := '0'; - variable ibusy : slbit := '0'; + variable idata : slv8 := (others=>'0'); + variable iecode : slv3 := (others=>'0'); + variable iesc : slbit := '0'; + variable ibusy : slbit := '0'; begin r := R_REGS; n := R_REGS; - ido := r.data; - ival := '0'; + -- data path logic + iesc := '0'; + iecode := '0' & DI(1 downto 0); + if DI(8) = '1' then + iesc := '1'; + else + case DI(7 downto 0) is + when c_cdata_xon => + if ESCXON = '1' then + iesc := '1'; + iecode := c_cdata_ec_xon; + end if; + when c_cdata_xoff => + if ESCXON = '1' then + iesc := '1'; + iecode := c_cdata_ec_xoff; + end if; + when c_cdata_fill => + if ESCFILL = '1' then + iesc := '1'; + iecode := c_cdata_ec_fill; + end if; + when c_cdata_escape => + iesc := '1'; + iecode := c_cdata_ec_esc; + when others => null; + end case; + end if; + + if iesc = '0' then + idata := DI(7 downto 0); + else + idata := c_cdata_escape; + end if; + + -- control path logic ibusy := '1'; - - case r.state is - - when s_idle => + if HOLD = '0' then + n.dataval := '0'; + if r.ecodeval = '1' then + n.data(c_cdata_edf_pref) := c_cdata_ed_pref; + n.data(c_cdata_edf_eci) := not r.ecode; + n.data(c_cdata_edf_ec ) := r.ecode; + n.dataval := '1'; + n.ecodeval := '0'; + else ibusy := '0'; if ENA = '1' then - n.data := DI(7 downto 0); - n.state := s_data; - if DI(8) = '1' then - n.state := s_comma; - else - if DI(7 downto 4)=CPREF and - (DI(3 downto 0)="1111" or - unsigned(DI(3 downto 0))<=NCOMM) then - n.state := s_escape; - end if; - end if; + n.data := idata; + n.dataval := '1'; + n.ecode := iecode; + n.ecodeval := iesc; end if; - - when s_data => - ival := '1'; - if HOLD = '0' then - n.state := s_idle; - end if; - - when s_comma => - ido := CPREF & r.data(3 downto 0); - ival := '1'; - if HOLD = '0' then - n.state := s_idle; - end if; - - when s_escape => - ido := CPREF & "1111"; - ival := '1'; - if HOLD = '0' then - n.state := s_edata; - end if; - - when s_edata => - ido := (not CPREF) & r.data(3 downto 0); - ival := '1'; - if HOLD = '0' then - n.state := s_idle; - end if; - - when others => null; - end case; + end if; + end if; N_REGS <= n; - DO <= ido; - VAL <= ival; + DO <= r.data; + VAL <= r.dataval; BUSY <= ibusy; end process proc_next; - end syn; diff --git a/rtl/vlib/comlib/comlib.vhd b/rtl/vlib/comlib/comlib.vhd index 006078af..88eb9bae 100644 --- a/rtl/vlib/comlib/comlib.vhd +++ b/rtl/vlib/comlib/comlib.vhd @@ -1,6 +1,6 @@ --- $Id: comlib.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: comlib.vhd 596 2014-10-17 19:50:07Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,9 +16,11 @@ -- Description: communication components -- -- Dependencies: - --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- Revision History: -- Date Rev Version Comment +-- 2014-09-27 595 1.6 add crc16 (using CRC-CCITT polynomial) +-- 2014-09-14 593 1.5 new iface for cdata2byte and byte2cdata -- 2011-09-17 410 1.4 now numeric_std clean; use for crc8 'A6' polynomial -- of Koopman et al.; crc8_update(_tbl) now function -- 2011-07-30 400 1.3 added byte2word, word2byte @@ -65,41 +67,51 @@ component word2byte is -- 1 word -> 2 byte stream converter ); end component; +constant c_cdata_escape : slv8 := "11001010"; -- char escape +constant c_cdata_fill : slv8 := "11010101"; -- char fill +constant c_cdata_xon : slv8 := "00010001"; -- char xon: ^Q = hex 11 +constant c_cdata_xoff : slv8 := "00010011"; -- char xoff: ^S = hex 13 +constant c_cdata_ec_xon : slv3 := "100"; -- escape code: xon +constant c_cdata_ec_xoff : slv3 := "101"; -- escape code: xoff +constant c_cdata_ec_fill : slv3 := "110"; -- escape code: fill +constant c_cdata_ec_esc : slv3 := "111"; -- escape code: escape +constant c_cdata_ed_pref : slv2 := "01"; -- edata: prefix +subtype c_cdata_edf_pref is integer range 7 downto 6; -- edata pref field +subtype c_cdata_edf_eci is integer range 5 downto 3; -- edata inv field +subtype c_cdata_edf_ec is integer range 2 downto 0; -- edata code field + component cdata2byte is -- 9bit comma,data -> byte stream - generic ( - CPREF : slv4 := "1000"; -- comma prefix - NCOMM : positive := 4); -- number of comma chars port ( CLK : in slbit; -- clock RESET : in slbit; -- reset - DI : in slv9; -- input data; bit 8 = komma flag - ENA : in slbit; -- write enable - BUSY : out slbit; -- write port hold + ESCXON : in slbit; -- enable xon/xoff escaping + ESCFILL : in slbit; -- enable fill escaping + DI : in slv9; -- input data; bit 8 = comma flag + ENA : in slbit; -- input data enable + BUSY : out slbit; -- input data busy DO : out slv8; -- output data - VAL : out slbit; -- read valid - HOLD : in slbit -- read hold + VAL : out slbit; -- output data valid + HOLD : in slbit -- output data hold ); end component; component byte2cdata is -- byte stream -> 9bit comma,data - generic ( - CPREF : slv4 := "1000"; -- comma prefix - NCOMM : positive := 4); -- number of comma chars port ( CLK : in slbit; -- clock RESET : in slbit; -- reset DI : in slv8; -- input data - ENA : in slbit; -- write enable - BUSY : out slbit; -- write port hold - DO : out slv9; -- output data; bit 8 = komma flag - VAL : out slbit; -- read valid - HOLD : in slbit -- read hold + ENA : in slbit; -- input data enable + ERR : in slbit; -- input data error + BUSY : out slbit; -- input data busy + DO : out slv9; -- output data; bit 8 = comma flag + VAL : out slbit; -- output data valid + HOLD : in slbit -- output data hold ); end component; component crc8 is -- crc-8 generator, checker generic ( - INIT: slv8 := "00000000"); -- initial state of crc register + INIT: slv8 := "00000000"); -- initial state of crc register port ( CLK : in slbit; -- clock RESET : in slbit; -- reset @@ -109,15 +121,37 @@ component crc8 is -- crc-8 generator, checker ); end component; +component crc16 is -- crc-16 generator, checker + generic ( + INIT: slv16 := (others=>'0')); -- initial state of crc register + port ( + CLK : in slbit; -- clock + RESET : in slbit; -- reset + ENA : in slbit; -- update enable + DI : in slv8; -- input data + CRC : out slv16 -- crc code + ); +end component; + function crc8_update (crc : in slv8; data : in slv8) return slv8; function crc8_update_tbl (crc : in slv8; data : in slv8) return slv8; + function crc16_update (crc : in slv16; data : in slv8) return slv16; + function crc16_update_tbl (crc : in slv16; data : in slv8) return slv16; + end package comlib; -- ---------------------------------------------------------------------------- package body comlib is - + + -- crc8_update and crc8_update_tbl implement the 'A6' polynomial of + -- Koopman and Chakravarty + -- x^8 + x^6 + x^3 + x^2 + 1 (0xa6) + -- see + -- http://dx.doi.org/10.1109%2FDSN.2004.1311885 + -- http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf + -- function crc8_update (crc: in slv8; data: in slv8) return slv8 is variable t : slv8 := (others=>'0'); variable n : slv8 := (others=>'0'); @@ -182,4 +216,88 @@ package body comlib is end function crc8_update_tbl; + -- crc16_update and crc16_update_tbl implement the CCITT polynomial + -- x^16 + x^12 + x^5 + 1 (0x1021) + -- + function crc16_update (crc: in slv16; data: in slv8) return slv16 is + variable n : slv16 := (others=>'0'); + variable t : slv8 := (others=>'0'); + begin + + t := data xor crc(15 downto 8); + + n(0) := t(4) xor t(0); + n(1) := t(5) xor t(1); + n(2) := t(6) xor t(2); + n(3) := t(7) xor t(3); + n(4) := t(4); + n(5) := t(5) xor t(4) xor t(0); + n(6) := t(6) xor t(5) xor t(1); + n(7) := t(7) xor t(6) xor t(2); + + n(8) := t(7) xor t(3) xor crc(0); + n(9) := t(4) xor crc(1); + n(10) := t(5) xor crc(2); + n(11) := t(6) xor crc(3); + n(12) := t(7) xor t(4) xor t(0) xor crc(4); + n(13) := t(5) xor t(1) xor crc(5); + n(14) := t(6) xor t(2) xor crc(6); + n(15) := t(7) xor t(3) xor crc(7); + + return n; + + end function crc16_update; + + function crc16_update_tbl (crc: in slv16; data: in slv8) return slv16 is + + type crc16_tbl_type is array (0 to 255) of integer; + variable crc16_tbl : crc16_tbl_type := + ( 0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, + 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935, + 4657, 528, 12915, 8786, 21173, 17044, 29431, 25302, + 37689, 33560, 45947, 41818, 54205, 50076, 62463, 58334, + 9314, 13379, 1056, 5121, 25830, 29895, 17572, 21637, + 42346, 46411, 34088, 38153, 58862, 62927, 50604, 54669, + 13907, 9842, 5649, 1584, 30423, 26358, 22165, 18100, + 46939, 42874, 38681, 34616, 63455, 59390, 55197, 51132, + 18628, 22757, 26758, 30887, 2112, 6241, 10242, 14371, + 51660, 55789, 59790, 63919, 35144, 39273, 43274, 47403, + 23285, 19156, 31415, 27286, 6769, 2640, 14899, 10770, + 56317, 52188, 64447, 60318, 39801, 35672, 47931, 43802, + 27814, 31879, 19684, 23749, 11298, 15363, 3168, 7233, + 60846, 64911, 52716, 56781, 44330, 48395, 36200, 40265, + 32407, 28342, 24277, 20212, 15891, 11826, 7761, 3696, + 65439, 61374, 57309, 53244, 48923, 44858, 40793, 36728, + 37256, 33193, 45514, 41451, 53516, 49453, 61774, 57711, + 4224, 161, 12482, 8419, 20484, 16421, 28742, 24679, + 33721, 37784, 41979, 46042, 49981, 54044, 58239, 62302, + 689, 4752, 8947, 13010, 16949, 21012, 25207, 29270, + 46570, 42443, 38312, 34185, 62830, 58703, 54572, 50445, + 13538, 9411, 5280, 1153, 29798, 25671, 21540, 17413, + 42971, 47098, 34713, 38840, 59231, 63358, 50973, 55100, + 9939, 14066, 1681, 5808, 26199, 30326, 17941, 22068, + 55628, 51565, 63758, 59695, 39368, 35305, 47498, 43435, + 22596, 18533, 30726, 26663, 6336, 2273, 14466, 10403, + 52093, 56156, 60223, 64286, 35833, 39896, 43963, 48026, + 19061, 23124, 27191, 31254, 2801, 6864, 10931, 14994, + 64814, 60687, 56684, 52557, 48554, 44427, 40424, 36297, + 31782, 27655, 23652, 19525, 15522, 11395, 7392, 3265, + 61215, 65342, 53085, 57212, 44955, 49082, 36825, 40952, + 28183, 32310, 20053, 24180, 11923, 16050, 3793, 7920 + ); + + variable ch : slv16 := (others=>'0'); + variable t : slv8 := (others=>'0'); + variable td : integer := 0; + + begin + + -- (crc<<8) ^ crc16_tbl[((crc>>8) ^ data) & 0x00ff] + ch := crc(7 downto 0) & "00000000"; + t := data xor crc(15 downto 8); + td := crc16_tbl(to_integer(unsigned(t))); + return ch xor slv(to_unsigned(td, 16)); + + end function crc16_update_tbl; + end package body comlib; diff --git a/rtl/vlib/comlib/crc8.vbom b/rtl/vlib/comlib/crc16.vbom similarity index 81% rename from rtl/vlib/comlib/crc8.vbom rename to rtl/vlib/comlib/crc16.vbom index 2b111e3d..cdb76060 100644 --- a/rtl/vlib/comlib/crc8.vbom +++ b/rtl/vlib/comlib/crc16.vbom @@ -2,4 +2,4 @@ ../slvtypes.vhd comlib.vhd # design -crc8.vhd +crc16.vhd diff --git a/rtl/vlib/comlib/crc8.vhd b/rtl/vlib/comlib/crc16.vhd similarity index 52% rename from rtl/vlib/comlib/crc8.vhd rename to rtl/vlib/comlib/crc16.vhd index e04e5d9d..7c76063f 100644 --- a/rtl/vlib/comlib/crc8.vhd +++ b/rtl/vlib/comlib/crc16.vhd @@ -1,6 +1,6 @@ --- $Id: crc8.vhd 410 2011-09-18 11:23:09Z mueller $ +-- $Id: crc16.vhd 595 2014-09-28 08:47:45Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2014- by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -12,32 +12,23 @@ -- for complete details. -- ------------------------------------------------------------------------------ --- Module Name: crc8 - syn --- Description: 8bit CRC generator, use 'A6' polynomial of Koopman and --- Chakravarty. Has HD=3 for up to 247 bits and optimal HD=2 --- error detection for longer messages: +-- Module Name: crc16 - syn +-- Description: 16bit CRC generator, use CCITT polynomial +-- x^16 + x^12 + x^5 + 1 (0x1021) -- --- x^8 + x^6 + x^3 + x^2 + 1 (0xa6) --- --- It is irreducible, and can be implemented with <= 37 xor's --- This polynomial is described in --- http://dx.doi.org/10.1109%2FDSN.2004.1311885 -- -- Dependencies: - -- Test bench: - -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2,.., 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 14.7; ghdl 0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri --- 2011-09-17 410 13.1 O40d xc3s1200e-4 8 25 - 13 (A6 polynom) --- 2011-09-17 409 13.1 O40d xc3s1200e-4 8 18 - 10 (SAE J1850) +-- 2014-09-27 595 14.7 131013 xc6slx16-2 16 16 - 4 -- -- Revision History: -- Date Rev Version Comment --- 2011-09-17 409 1.1 use now 'A6' polynomial of Koopman et al. --- 2011-08-14 406 1.0.1 remove superfluous variable r --- 2007-07-08 65 1.0 Initial version +-- 2014-09-27 595 1.0 Initial version ------------------------------------------------------------------------------ library ieee; @@ -46,21 +37,21 @@ use ieee.std_logic_1164.all; use work.slvtypes.all; use work.comlib.all; -entity crc8 is -- crc-8 generator, checker +entity crc16 is -- crc-16 generator, checker generic ( - INIT: slv8 := "00000000"); -- initial state of crc register + INIT: slv16 := (others=>'0')); -- initial state of crc register port ( CLK : in slbit; -- clock RESET : in slbit; -- reset ENA : in slbit; -- update enable DI : in slv8; -- input data - CRC : out slv8 -- crc code + CRC : out slv16 -- crc code ); -end crc8; +end crc16; -architecture syn of crc8 is - signal R_CRC : slv8 := INIT; -- state registers +architecture syn of crc16 is + signal R_CRC : slv16 := INIT; -- state registers begin proc_regs: process (CLK) @@ -71,7 +62,7 @@ begin R_CRC <= INIT; else if ENA = '1' then - R_CRC <= crc8_update(R_CRC, DI); + R_CRC <= crc16_update(R_CRC, DI); end if; end if; end if; diff --git a/rtl/vlib/comlib/misc/.cvsignore b/rtl/vlib/comlib/misc/.cvsignore index 928e0799..2b2abf8c 100644 --- a/rtl/vlib/comlib/misc/.cvsignore +++ b/rtl/vlib/comlib/misc/.cvsignore @@ -1,2 +1,4 @@ gen_crc8_tbl gen_crc8_tbl_check +gen_crc16_tbl +gen_crc16_tbl_check diff --git a/rtl/vlib/comlib/misc/Makefile b/rtl/vlib/comlib/misc/Makefile index e58a5066..f12ee764 100644 --- a/rtl/vlib/comlib/misc/Makefile +++ b/rtl/vlib/comlib/misc/Makefile @@ -1,11 +1,12 @@ -# $Id: Makefile 477 2013-01-27 14:07:10Z mueller $ +# $Id: Makefile 595 2014-09-28 08:47:45Z mueller $ # # Revision History: # Date Rev Version Comment # 2011-08-13 405 1.1 use includes from rtl/make # 2007-11-26 98 1.0 Initial version # -EXE_all = gen_crc8_tbl gen_crc8_tbl_check +EXE_all = gen_crc8_tbl gen_crc8_tbl_check +EXE_all += gen_crc16_tbl gen_crc16_tbl_check # # .PHONY : all clean diff --git a/rtl/vlib/comlib/tb/.cvsignore b/rtl/vlib/comlib/tb/.cvsignore new file mode 100644 index 00000000..e8880ab3 --- /dev/null +++ b/rtl/vlib/comlib/tb/.cvsignore @@ -0,0 +1,5 @@ +tb_cdata2byte +tb_cdata2byte_stim +tb_cdata2byte_[sft]sim +tb_cdata2byte_ISim +tb_cdata2byte_ISim_[sft]sim diff --git a/rtl/vlib/comlib/tb/Makefile b/rtl/vlib/comlib/tb/Makefile new file mode 100644 index 00000000..645b2eef --- /dev/null +++ b/rtl/vlib/comlib/tb/Makefile @@ -0,0 +1,36 @@ +# $Id: Makefile 596 2014-10-17 19:50:07Z mueller $ +# +# Revision History: +# Date Rev Version Comment +# 2014-10-17 596 1.0 Initial version +# +EXE_all = tb_cdata2byte +# +# reference board for test synthesis is Spartan-6 based Nexys3 +ifndef XTW_BOARD + XTW_BOARD=nexys3 +endif +include $(RETROBASE)/rtl/make/xflow_default_$(XTW_BOARD).mk +# +.PHONY : all all_ssim all_tsim clean +# +all : $(EXE_all) +all_ssim : $(EXE_all:=_ssim) +all_tsim : $(EXE_all:=_tsim) +# +clean : ise_clean ghdl_clean isim_clean +# +#----- +# +include $(RETROBASE)/rtl/make/generic_ghdl.mk +include $(RETROBASE)/rtl/make/generic_isim.mk +include $(RETROBASE)/rtl/make/generic_xflow.mk +# +VBOM_all = $(wildcard *.vbom) +# +ifndef DONTINCDEP +include $(VBOM_all:.vbom=.dep_xst) +include $(VBOM_all:.vbom=.dep_ghdl) +include $(VBOM_all:.vbom=.dep_isim) +endif +# diff --git a/rtl/vlib/comlib/tb/tb_cdata2byte.vbom b/rtl/vlib/comlib/tb/tb_cdata2byte.vbom new file mode 100644 index 00000000..9ce038e2 --- /dev/null +++ b/rtl/vlib/comlib/tb/tb_cdata2byte.vbom @@ -0,0 +1,10 @@ +# libs +../../slvtypes.vhd +../../simlib/simlib.vhd +../comlib.vhd +# components +../../simlib/simclk.vbom +../../simlib/simclkcnt.vbom +${tbd_cdata2byte := tbd_cdata2byte.vbom} +# design +tb_cdata2byte.vhd diff --git a/rtl/vlib/comlib/tb/tb_cdata2byte.vhd b/rtl/vlib/comlib/tb/tb_cdata2byte.vhd new file mode 100644 index 00000000..8401c249 --- /dev/null +++ b/rtl/vlib/comlib/tb/tb_cdata2byte.vhd @@ -0,0 +1,278 @@ +-- $Id: tb_cdata2byte.vhd 599 2014-10-25 13:43:56Z mueller $ +-- +-- Copyright 2014- by Walter F.J. Mueller +-- +-- This program is free software; you may redistribute 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. +-- +-- 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 complete details. +-- +------------------------------------------------------------------------------ +-- Module Name: tb_cdata2byte - sim +-- Description: Test bench for cdata2byte and byte2cdata +-- +-- Dependencies: simlib/simclk +-- simlib/simclkcnt +-- tbd_cdata2byte [UUT] +-- +-- To test: cdata2byte +-- byte2cdata +-- +-- Target Devices: generic +-- +-- Verified (with tb_cdata2byte_stim.dat): +-- Date Rev Code ghdl ise Target Comment +-- 2014-10-25 599 _ssim 0.31 17.1 sc6slx16 c: ok +-- 2014-10-25 599 - 0.31 - c: ok +-- +-- Revision History: +-- Date Rev Version Comment +-- 2014-10-25 599 1.1.1 use wait_* to control stim and moni timing +-- 2014-10-19 598 1.1 use simfifo with shared variables +-- 2014-10-18 597 1.0 Initial version +------------------------------------------------------------------------------ + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; +use ieee.std_logic_textio.all; +use std.textio.all; + +use work.slvtypes.all; +use work.simlib.all; +use work.comlib.all; + +entity tb_cdata2byte is +end tb_cdata2byte; + +architecture sim of tb_cdata2byte is + + constant clk_dsc : clock_dsc := (20 ns, 1 ns, 1 ns); + constant clk_offset : time := 200 ns; + + signal CLK : slbit := '0'; + signal RESET : slbit := '0'; + + signal CLK_STOP : slbit := '0'; + signal CLK_CYCLE : integer := 0; + + signal C2B_ESCXON : slbit := '0'; + signal C2B_ESCFILL : slbit := '0'; + signal C2B_DI : slv9 := (others=>'0'); + signal C2B_ENA : slbit := '0'; + signal C2B_BUSY : slbit := '0'; + signal C2B_DO : slv8 := (others=>'0'); + signal C2B_VAL : slbit := '0'; + + signal B2C_BUSY : slbit := '0'; + signal B2C_DO : slv9 := (others=>'0'); + signal B2C_VAL : slbit := '0'; + signal B2C_HOLD : slbit := '0'; + + shared variable sv_sff_monc_cnt : natural := 0; + shared variable sv_sff_monc_arr : simfifo_type(0 to 7, 7 downto 0); + shared variable sv_sff_monb_cnt : natural := 0; + shared variable sv_sff_monb_arr : simfifo_type(0 to 7, 8 downto 0); + +begin + + CLKGEN : simclk + generic map ( + PERIOD => clk_dsc.period, + OFFSET => clk_offset) + port map ( + CLK => CLK, + CLK_STOP => CLK_STOP + ); + + CLKCNT : simclkcnt port map (CLK => CLK, CLK_CYCLE => CLK_CYCLE); + + UUT : entity work.tbd_cdata2byte + port map ( + CLK => CLK, + RESET => RESET, + C2B_ESCXON => C2B_ESCXON, + C2B_ESCFILL => C2B_ESCFILL, + C2B_DI => C2B_DI, + C2B_ENA => C2B_ENA, + C2B_BUSY => C2B_BUSY, + C2B_DO => C2B_DO, + C2B_VAL => C2B_VAL, + B2C_BUSY => B2C_BUSY, + B2C_DO => B2C_DO, + B2C_VAL => B2C_VAL, + B2C_HOLD => B2C_HOLD + ); + + proc_stim: process + file fstim : text open read_mode is "tb_cdata2byte_stim"; + variable iline : line; + variable oline : line; + variable ok : boolean; + variable dname : string(1 to 6) := (others=>' '); + variable idel : natural := 0; + variable ilen : natural := 0; + variable nbusy : integer := 0; + + variable iesc : slbit := '0'; + variable itxdata9 : slbit := '0'; + variable itxdata : slv8 := (others=>'0'); + variable irxdata9 : slbit := '0'; + variable irxdata : slv8 := (others=>'0'); + variable dat9 : slv9 := (others=>'0'); + + begin + + wait_nextstim(CLK, clk_dsc); + + file_loop: while not endfile(fstim) loop + + readline (fstim, iline); + + readcomment(iline, ok); + next file_loop when ok; + + readword(iline, dname, ok); + if ok then + case dname is + when ".reset" => -- .reset + write(oline, string'(".reset")); + writeline(output, oline); + RESET <= '1'; + wait_nextstim(CLK, clk_dsc); + RESET <= '0'; + wait_nextstim(CLK, clk_dsc); + + when ".wait " => -- .wait + read_ea(iline, idel); + wait_nextstim(CLK, clk_dsc, idel); + + when "escxon" => -- escxon + read_ea(iline, iesc); + C2B_ESCXON <= iesc; + + when "escfil" => -- escfil + read_ea(iline, iesc); + C2B_ESCFILL <= iesc; + + when "bhold " => -- bhold + read_ea(iline, idel); + read_ea(iline, ilen); + B2C_HOLD <= '1' after idel*clk_dsc.period, + '0' after (idel+ilen)*clk_dsc.period; + + when "data " => -- data + read_ea(iline, itxdata9); + readgen_ea(iline, itxdata); + read_ea(iline, irxdata9); + if irxdata9 = '0' then + simfifo_put(sv_sff_monc_cnt, sv_sff_monc_arr, itxdata); + else + readgen_ea(iline, irxdata); + simfifo_put(sv_sff_monc_cnt, sv_sff_monc_arr, c_cdata_escape); + simfifo_put(sv_sff_monc_cnt, sv_sff_monc_arr, irxdata); + end if; + dat9 := itxdata9 & itxdata; + simfifo_put(sv_sff_monb_cnt, sv_sff_monb_arr, dat9); + + C2B_DI <= dat9; + C2B_ENA <= '1'; + + wait_stim2moni(CLK, clk_dsc); + wait_untilsignal(CLK, clk_dsc, C2B_BUSY, '0', nbusy); + + writetimestamp(oline, CLK_CYCLE, ": stim "); + write(oline, itxdata9, right, 2); + write(oline, itxdata, right, 9); + writeoptint(oline, " nbusy=", nbusy); + writeline(output, oline); + + wait_nextstim(CLK, clk_dsc); + C2B_ENA <= '0'; + + when others => -- unknown command + write(oline, string'("?? unknown command: ")); + write(oline, dname); + writeline(output, oline); + report "aborting" severity failure; + end case; + + else + report "failed to find command" severity failure; + + end if; + + testempty_ea(iline); + end loop; -- file_loop: + + writetimestamp(oline, CLK_CYCLE, ": DONE "); + writeline(output, oline); + + wait_nextstim(CLK, clk_dsc, 12); + + CLK_STOP <= '1'; + + wait; -- suspend proc_stim forever + -- clock is stopped, sim will end + + end process proc_stim; + + + proc_monc: process + variable oline : line; + variable nhold : integer := 0; + begin + + loop + wait_nextmoni(CLK, clk_dsc); + + if C2B_VAL = '1' then + if B2C_BUSY = '1' then -- c2b_hold = b2c_busy ! + nhold := nhold + 1; + else + writetimestamp(oline, CLK_CYCLE, ": monc "); + write(oline, string'(" ")); + write(oline, C2B_DO, right, 9); + writeoptint(oline, " nhold=", nhold); + simfifo_writetest(oline, sv_sff_monc_cnt, sv_sff_monc_arr, C2B_DO); + writeline(output, oline); + nhold := 0; + end if; + end if; + + end loop; + + end process proc_monc; + + + proc_monb: process + variable oline : line; + variable nhold : integer := 0; + begin + + loop + wait_nextmoni(CLK, clk_dsc); + + if B2C_VAL = '1' then + if B2C_HOLD = '1' then + nhold := nhold + 1; + else + writetimestamp(oline, CLK_CYCLE, ": monb "); + write(oline, B2C_DO(8), right, 2); + write(oline, B2C_DO(7 downto 0), right, 9); + writeoptint(oline, " nhold=", nhold); + simfifo_writetest(oline, sv_sff_monb_cnt, sv_sff_monb_arr, B2C_DO); + writeline(output, oline); + nhold := 0; + end if; + end if; + + end loop; + + end process proc_monb; + +end sim; diff --git a/rtl/vlib/comlib/tb/tb_cdata2byte_ssim.vbom b/rtl/vlib/comlib/tb/tb_cdata2byte_ssim.vbom new file mode 100644 index 00000000..f56950ff --- /dev/null +++ b/rtl/vlib/comlib/tb/tb_cdata2byte_ssim.vbom @@ -0,0 +1,4 @@ +# configure for _*sim case +tbd_cdata2byte = tbd_cdata2byte_ssim.vhd +tb_cdata2byte.vbom +@top:tb_cdata2byte diff --git a/rtl/vlib/comlib/tb/tb_cdata2byte_stim.dat b/rtl/vlib/comlib/tb/tb_cdata2byte_stim.dat new file mode 100644 index 00000000..3e9d2822 --- /dev/null +++ b/rtl/vlib/comlib/tb/tb_cdata2byte_stim.dat @@ -0,0 +1,182 @@ +# $Id: tb_cdata2byte_stim.dat 601 2014-11-07 22:44:43Z mueller $ +# +# +C ---------------------------------------------------------------------------- +C test normal chars +# +.reset +.wait 10 +# +data 0 00000000 0 +data 0 00001111 0 +data 0 11110000 0 +data 0 11111111 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test commas +# +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test escapes (xon=0,fill=0) +# +data 0 11001010 1 01000111 +data 0 11010101 0 +data 0 00010001 0 +data 0 00010011 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test escapes (xon=1,fill=0) +# +escxon 1 +escfil 0 +data 0 11001010 1 01000111 +data 0 11010101 0 +data 0 00010001 1 01011100 +data 0 00010011 1 01010101 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test escapes (xon=0,fill=1) +# +escxon 0 +escfil 1 +data 0 11001010 1 01000111 +data 0 11010101 1 01001110 +data 0 00010001 0 +data 0 00010011 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test escapes (xon=1,fill=1) +# +escxon 1 +escfil 1 +data 0 11001010 1 01000111 +data 0 11010101 1 01001110 +data 0 00010001 1 01011100 +data 0 00010011 1 01010101 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: normal chars and bhold 0 8 +# +bhold 0 8 +data 0 10000000 0 +data 0 10000001 0 +data 0 10000010 0 +data 0 10000011 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: normal chars and bhold 1 8 +# +bhold 1 8 +data 0 10000000 0 +data 0 10000001 0 +data 0 10000010 0 +data 0 10000011 0 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: normal chars and bhold 2 8 +# +bhold 2 8 +data 0 10000000 0 +data 0 10000001 0 +data 0 10000010 0 +data 0 10000011 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: normal chars and bhold 3 8 +# +bhold 3 8 +data 0 10000000 0 +data 0 10000001 0 +data 0 10000010 0 +data 0 10000011 0 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 0 1 +# +bhold 0 1 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 1 1 +# +bhold 1 1 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 2 1 +# +bhold 2 1 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 3 1 +# +bhold 3 1 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 0 2 +# +bhold 0 2 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +# +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 1 2 +# +bhold 1 2 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 2 2 +# +bhold 2 2 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +.wait 10 +C ---------------------------------------------------------------------------- +C test back pressure: commas and bhold 3 2 +# +bhold 3 2 +data 1 00000000 1 01111000 +data 1 00000001 1 01110001 +data 1 00000010 1 01101010 +data 1 00000011 1 01100011 +# +#----- DONE +.wait 20 +C ----- \ No newline at end of file diff --git a/rtl/vlib/comlib/tb/tbd_cdata2byte.vbom b/rtl/vlib/comlib/tb/tbd_cdata2byte.vbom new file mode 100644 index 00000000..a896cb8d --- /dev/null +++ b/rtl/vlib/comlib/tb/tbd_cdata2byte.vbom @@ -0,0 +1,8 @@ +# libs +../../slvtypes.vhd +../comlib.vhd +# components +../cdata2byte.vbom +../byte2cdata.vbom +# design +tbd_cdata2byte.vhd diff --git a/rtl/vlib/comlib/tb/tbd_cdata2byte.vhd b/rtl/vlib/comlib/tb/tbd_cdata2byte.vhd new file mode 100644 index 00000000..634aa22f --- /dev/null +++ b/rtl/vlib/comlib/tb/tbd_cdata2byte.vhd @@ -0,0 +1,101 @@ +-- $Id: tbd_cdata2byte.vhd 597 2014-10-18 18:27:55Z mueller $ +-- +-- Copyright 2014- by Walter F.J. Mueller +-- +-- This program is free software; you may redistribute 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. +-- +-- 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 complete details. +-- +------------------------------------------------------------------------------ +-- Module Name: tbd_cdata2byte - syn +-- Description: Wrapper for cdata2byte + byte2cdata. +-- +-- Dependencies: cdata2byte +-- byte2cdata +-- +-- To test: cdata2byte +-- byte2cdata +-- +-- Target Devices: generic +-- +-- Synthesized (xst): +-- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-10-18 597 14.7 xc6slx16 25 67 0 28 s 3.56 +-- +-- Tool versions: xst 14.7; ghdl 0.31 +-- Revision History: +-- Date Rev Version Comment +-- 2014-10-18 597 1.0 Initial version +------------------------------------------------------------------------------ + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +use work.slvtypes.all; +use work.comlib.all; + +entity tbd_cdata2byte is -- cdata2byte + byte2cdata [tb design] + port ( + CLK : in slbit; -- clock + RESET : in slbit; -- reset + C2B_ESCXON : in slbit; -- c2b: enable xon/xoff escaping + C2B_ESCFILL : in slbit; -- c2b: enable fill escaping + C2B_DI : in slv9; -- c2b: input data; bit 8 = comma flag + C2B_ENA : in slbit; -- c2b: input data enable + C2B_BUSY : out slbit; -- c2b: input data busy + C2B_DO : out slv8; -- c2b: output data + C2B_VAL : out slbit; -- c2b: output data valid + B2C_BUSY : out slbit; -- b2c: input data busy + B2C_DO : out slv9; -- b2c: output data; bit 8 = comma flag + B2C_VAL : out slbit; -- b2c: output data valid + B2C_HOLD : in slbit -- b2c: output data hold + ); +end tbd_cdata2byte; + + +architecture syn of tbd_cdata2byte is + + signal C2B_DO_L : slv8 := (others=>'0'); + signal C2B_VAL_L : slbit := '0'; + signal B2C_BUSY_L : slbit := '0'; + +begin + + C2B : cdata2byte + port map ( + CLK => CLK, + RESET => RESET, + ESCXON => C2B_ESCXON, + ESCFILL => C2B_ESCFILL, + DI => C2B_DI, + ENA => C2B_ENA, + BUSY => C2B_BUSY, + DO => C2B_DO_L, + VAL => C2B_VAL_L, + HOLD => B2C_BUSY_L + ); + + B2C : byte2cdata + port map ( + CLK => CLK, + RESET => RESET, + DI => C2B_DO_L, + ENA => C2B_VAL_L, + ERR => '0', + BUSY => B2C_BUSY_L, + DO => B2C_DO, + VAL => B2C_VAL, + HOLD => B2C_HOLD + ); + + C2B_DO <= C2B_DO_L; + C2B_VAL <= C2B_VAL_L; + B2C_BUSY <= B2C_BUSY_L; + +end syn; diff --git a/rtl/vlib/rbus/rb_mon.vhd b/rtl/vlib/rbus/rb_mon.vhd index fc37c685..dded05c1 100644 --- a/rtl/vlib/rbus/rb_mon.vhd +++ b/rtl/vlib/rbus/rb_mon.vhd @@ -1,6 +1,6 @@ --- $Id: rb_mon.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: rb_mon.vhd 599 2014-10-25 13:43:56Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -17,10 +17,14 @@ -- -- Dependencies: - -- Test bench: - --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-25 599 4.1.1 use writeoptint() +-- 2014-09-03 591 4.1 add burst counter; add state checker +-- 2014-08-30 589 4.0 use hex for addr; 4 bit STAT; monitor ACK=0 +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-12-23 444 3.1 CLK_CYCLE now integer -- 2011-11-19 427 3.0.1 now numeric_std clean -- 2010-12-22 346 3.0 renamed rritb_rbmon -> rb_mon @@ -55,7 +59,7 @@ entity rb_mon is -- rbus monitor (for tb's) RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16 := (others=>'0'); -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end rb_mon; @@ -66,27 +70,29 @@ begin proc_moni: process variable oline : line; - variable nhold : integer := 0; + variable nhold : integer := 0; + variable nburst : integer := 0; variable data : slv16 := (others=>'0'); variable tag : string(1 to 8) := (others=>' '); variable err : slbit := '0'; + variable r_sel : slbit := '0'; procedure write_data(L: inout line; tag: in string; data: in slv16; - nhold: in integer := 0; + nhold: in integer := 0; + nburst: in integer := 0; cond: in boolean := false; ctxt: in string := " ") is begin writetimestamp(L, CLK_CYCLE, tag); - write(L, RB_MREQ.addr, right, 10); - write(L, string'(" ")); + writehex(L, RB_MREQ.addr, right, 4); + write(L, string'(" ")); writegen(L, data, right, 0, DBASE); + write(L, string'(" ")); write(L, RB_STAT, right, 4); - if nhold > 0 then - write(L, string'(" nhold=")); - write(L, nhold); - end if; + writeoptint(L, " hold=", nhold, 2); + writeoptint(L, " b=", nburst, 2); if cond then write(L, ctxt); end if; @@ -103,7 +109,11 @@ begin wait until rising_edge(CLK); -- check at end of clock cycle - if RB_MREQ.aval='1' and (RB_MREQ.re='1' or RB_MREQ.we='1') then + if RB_MREQ.aval='1' and r_sel='0' then + nburst := 0; + end if; + + if RB_MREQ.re='1' or RB_MREQ.we='1' then if RB_SRES.err = '1' then err := '1'; end if; @@ -121,31 +131,137 @@ begin tag := ": rbwe "; end if; - write_data(oline, tag, data, nhold, err='1', " ERR='1'"); + if RB_SRES.ack = '1' then + write_data(oline, tag, data, nhold, nburst, err='1', " ERR='1'"); + else + write_data(oline, tag, data, nhold, nburst, true, " ACK='0'"); + end if; + nburst := nburst + 1; nhold := 0; end if; else if nhold > 0 then - write_data(oline, tag, data, nhold, true, " TIMEOUT"); + write_data(oline, tag, data, nhold, nburst, true, " TIMEOUT"); end if; nhold := 0; err := '0'; end if; if RB_MREQ.init = '1' then -- init - if RB_MREQ.we = '1' then - write_data(oline, ": rbini ", RB_MREQ.din); -- external - else - write_data(oline, ": rbint ", RB_MREQ.din); -- internal - end if; + write_data(oline, ": rbini ", RB_MREQ.din); end if; if unsigned(RB_LAM) /= 0 then - write_data(oline, ": rblam ", RB_LAM, 0, true, " RB_LAM active"); + write_data(oline, ": rblam ", RB_LAM, 0, 0, true, " RB_LAM active"); end if; - + + r_sel := RB_MREQ.aval; + end loop; end process proc_moni; + + proc_check: process (CLK) + variable r_sel : slbit := '0'; + variable r_addr : slv16 := (others=>'0'); + variable idump : boolean := false; + variable oline : line; + begin + + if rising_edge(CLK) then + idump := false; + + -- check that addr doesn't change after 1st aval cycle + if r_sel='1' and RB_MREQ.addr /= r_addr then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: addr changed after aval; initial addr="); + writehex(oline, r_addr, right, 4); + writeline(output, oline); + idump := true; + end if; + + -- check that we,re don't come together in core select time + -- (aval and r_sel) and not at all outside + if RB_MREQ.aval='1' and r_sel='1' then + if RB_MREQ.we='1' and RB_MREQ.re='1' then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: we and re both active"); + writeline(output, oline); + idump := true; + end if; + if RB_MREQ.init='1' then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: init seen inside select"); + writeline(output, oline); + idump := true; + end if; + else + if RB_MREQ.we='1' or RB_MREQ.re='1' then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: no select and we,re seen"); + writeline(output, oline); + idump := true; + end if; + end if; + + -- check that init not seen when aval or select is active + if RB_MREQ.aval='1' or r_sel='1' then + if RB_MREQ.init='1' then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: init seen inside aval or select"); + writeline(output, oline); + idump := true; + end if; + end if; + + -- check that SRES isn't touched unless aval or select is active + if RB_MREQ.aval='0' and r_sel='0' then + if RB_SRES.dout/=x"0000" or RB_SRES.busy='1' or + RB_SRES.ack='1' or RB_SRES.err='1' then + writetimestamp(oline, CLK_CYCLE, + ": FAIL rb_mon: SRES driven outside aval or select"); + writeline(output, oline); + idump := true; + end if; + end if; + + -- dump rbus state in case of any error seen above + if idump then + write(oline, string'(" FAIL: MREQ aval=")); + write(oline, RB_MREQ.aval, right, 1); + write(oline, string'(" re=")); + write(oline, RB_MREQ.re , right, 1); + write(oline, string'(" we=")); + write(oline, RB_MREQ.we , right, 1); + write(oline, string'(" init=")); + write(oline, RB_MREQ.init, right, 1); + write(oline, string'(" sel=")); + write(oline, r_sel , right, 1); + write(oline, string'(" addr=")); + writehex(oline, RB_MREQ.addr, right, 4); + write(oline, string'(" din=")); + writehex(oline, RB_MREQ.din, right, 4); + writeline(output, oline); + + write(oline, string'(" FAIL: SRES ack=")); + write(oline, RB_SRES.ack , right, 1); + write(oline, string'(" busy=")); + write(oline, RB_SRES.busy, right, 1); + write(oline, string'(" err=")); + write(oline, RB_SRES.err , right, 1); + write(oline, string'(" dout=")); + writehex(oline, RB_SRES.dout, right, 4); + writeline(output, oline); + end if; + + -- keep track of select state and latch current addr + if RB_MREQ.aval='1' and r_sel='0' then -- if 1st cycle of aval + r_addr := RB_MREQ.addr; -- latch addr + end if; + -- select simply aval if last cycle (assume all addr are valid) + r_sel := RB_MREQ.aval; + end if; + + end process proc_check; end sim; diff --git a/rtl/vlib/rbus/rb_mon_sb.vhd b/rtl/vlib/rbus/rb_mon_sb.vhd index 6f8e4fd9..d8a742a5 100644 --- a/rtl/vlib/rbus/rb_mon_sb.vhd +++ b/rtl/vlib/rbus/rb_mon_sb.vhd @@ -1,6 +1,6 @@ --- $Id: rb_mon_sb.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: rb_mon_sb.vhd 589 2014-08-30 12:43:16Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -19,10 +19,11 @@ -- simlib/simclkcnt -- rb_mon -- Test bench: - --- Tool versions: xst 8.2, 9.1, 9.2, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 4.0 use new rlink v4 iface and 4 bit STAT -- 2011-12-23 444 3.1 use simclkcnt instead of simbus global -- 2010-12-22 346 3.0 renamed rritb_rbmon_sb -> rb_mon_sb -- 2010-06-05 301 2.0.2 renamed _rpmon -> _rbmon @@ -52,7 +53,7 @@ entity rb_mon_sb is -- simbus wrapper for rbus monitor RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16 := (others=>'0'); -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end rb_mon_sb; diff --git a/rtl/vlib/rbus/rb_sel.vbom b/rtl/vlib/rbus/rb_sel.vbom new file mode 100644 index 00000000..7f3639b1 --- /dev/null +++ b/rtl/vlib/rbus/rb_sel.vbom @@ -0,0 +1,6 @@ +# libs +../slvtypes.vhd +rblib.vhd +# components +# design +rb_sel.vhd diff --git a/rtl/vlib/rbus/rb_sel.vhd b/rtl/vlib/rbus/rb_sel.vhd new file mode 100644 index 00000000..a0cc6488 --- /dev/null +++ b/rtl/vlib/rbus/rb_sel.vhd @@ -0,0 +1,70 @@ +-- $Id: rb_sel.vhd 583 2014-08-16 07:40:12Z mueller $ +-- +-- Copyright 2010-2014 by Walter F.J. Mueller +-- +-- This program is free software; you may redistribute 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. +-- +-- 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 complete details. +-- +------------------------------------------------------------------------------ +-- Module Name: rb_sel - syn +-- Description: rbus: address select logic +-- +-- Dependencies: - +-- Test bench: - +-- Target Devices: generic +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 +-- +-- Revision History: +-- Date Rev Version Comment +-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit +-- 2010-12-26 349 1.0 Initial version (cloned from ibus/ib_sel) +------------------------------------------------------------------------------ + +library ieee; +use ieee.std_logic_1164.all; + +use work.slvtypes.all; +use work.rblib.all; + +-- ---------------------------------------------------------------------------- + +entity rb_sel is -- rbus address select logic + generic ( + RB_ADDR : slv16; -- rbus address base + SAWIDTH : natural := 0); -- device subaddress space width + port ( + CLK : in slbit; -- clock + RB_MREQ : in rb_mreq_type; -- ibus request + SEL : out slbit -- select state bit + ); +end rb_sel; + +architecture syn of rb_sel is + signal R_SEL : slbit := '0'; +begin + + assert SAWIDTH<=15 -- at most 32k word devices + report "assert(SAWIDTH<=15)" severity failure; + + proc_regs: process (CLK) + variable isel : slbit := '0'; + begin + if rising_edge(CLK) then + isel := '0'; + if RB_MREQ.aval='1' and + RB_MREQ.addr(15 downto SAWIDTH)=RB_ADDR(15 downto SAWIDTH) then + isel := '1'; + end if; + R_SEL <= isel; + end if; + end process proc_regs; + + SEL <= R_SEL; + +end syn; diff --git a/rtl/vlib/rbus/rbd_bram.vhd b/rtl/vlib/rbus/rbd_bram.vhd index 3675d116..44f909d3 100644 --- a/rtl/vlib/rbus/rbd_bram.vhd +++ b/rtl/vlib/rbus/rbd_bram.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_bram.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbd_bram.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: rlink/tb/tb_rlink_tba_ttcombo -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -28,6 +28,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-13 593 4.1 no default rbus addess anymore, def=0 +-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit -- 2011-11-19 427 1.0.3 now numeric_std clean -- 2010-12-31 352 1.0.2 simplify irb_ack logic -- 2010-12-29 351 1.0.1 default addr 1111001x->1111010x @@ -36,11 +38,11 @@ -- -- rbus registers: -- --- Address Bits Name r/w/f Function --- bbbbbbb0 cntl r/w/- Control register --- 15:10 nbusy r/w/- busy cycles --- 9:00 addr r/w/- bram address (will auto-increment) --- bbbbbbb1 15:00 data r/w/- Data register (read/write to bram via addr) +-- Addr Bits Name r/w/f Function +-- 0 cntl r/w/- Control register +-- 15:10 nbusy r/w/- busy cycles +-- 9:00 addr r/w/- bram address (will auto-increment) +-- 1 15:00 data r/w/- Data register (read/write to bram via addr) -- library ieee; @@ -54,7 +56,7 @@ use work.rblib.all; entity rbd_bram is -- rbus dev: rbus bram test target -- complete rrirp_aif interface generic ( - RB_ADDR : slv8 := slv(to_unsigned(2#11110100#,8))); + RB_ADDR : slv16 := (others=>'0')); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset @@ -150,7 +152,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 1)=RB_ADDR(7 downto 1) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 1)=RB_ADDR(15 downto 1) then n.rbsel := '1'; ibramen := '1'; diff --git a/rtl/vlib/rbus/rbd_eyemon.vhd b/rtl/vlib/rbus/rbd_eyemon.vhd index 572a20d7..afd7b5fb 100644 --- a/rtl/vlib/rbus/rbd_eyemon.vhd +++ b/rtl/vlib/rbus/rbd_eyemon.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_eyemon.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbd_eyemon.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -29,6 +29,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-13 593 4.1 no default rbus addess anymore, def=0 +-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit -- 2011-11-19 427 1.0.3 now numeric_std clean -- 2011-04-02 375 1.0.2 handle back-to-back chars properly (in sim..) -- 2010-12-31 352 1.0.1 simplify irb_ack logic @@ -37,18 +39,18 @@ -- -- rbus registers: -- --- Address Bits Name r/w/f Function --- bbbbbb00 cntl r/w/- Control register --- 03 ena01 r/w/- track 0->1 rxsd transitions --- 02 ena10 r/w/- track 1->0 rxsd transitions --- 01 clr r/-/f w: writing a 1 starts memory clear +-- Addr Bits Name r/w/f Function +-- 00 cntl r/w/- Control register +-- 03 ena01 r/w/- track 0->1 rxsd transitions +-- 02 ena10 r/w/- track 1->0 rxsd transitions +-- 01 clr r/-/f w: writing a 1 starts memory clear -- r: 1 indicates clr in progress (512 cyc) --- 00 go r/w/- enables monitor --- bbbbbb01 7:00 rdiv r/w/- Sample rate divider --- bbbbbb10 addr r/w/- Address register --- 9:01 laddr r/w/ line address --- 00 waddr r/w/ word address --- bbbbbb11 15:00 data r/-/- Data register +-- 00 go r/w/- enables monitor +-- 01 7:00 rdiv r/w/- Sample rate divider +-- 10 addr r/w/- Address register +-- 9:01 laddr r/w/ line address +-- 00 waddr r/w/ word address +-- 11 15:00 data r/-/- Data register -- -- data format: -- word 1 counter msb's @@ -65,8 +67,8 @@ use work.rblib.all; entity rbd_eyemon is -- rbus dev: eye monitor for serport's generic ( - RB_ADDR : slv8 := slv(to_unsigned(2#11111000#,8)); - RDIV : slv8 := slv(to_unsigned(0,8))); + RB_ADDR : slv16 := (others=>'0'); + RDIV : slv8 := (others=>'0')); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset @@ -203,7 +205,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 2)=RB_ADDR(7 downto 2) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 2)=RB_ADDR(15 downto 2) then n.rbsel := '1'; ibramen := '1'; end if; diff --git a/rtl/vlib/rbus/rbd_rbmon.vhd b/rtl/vlib/rbus/rbd_rbmon.vhd index e2fe6582..ae4f8a2b 100644 --- a/rtl/vlib/rbus/rbd_rbmon.vhd +++ b/rtl/vlib/rbus/rbd_rbmon.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_rbmon.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbd_rbmon.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: rlink/tb/tb_rlink_tba_ttcombo -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -28,6 +28,8 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-13 593 4.1 change default address -> ffe8 +-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit -- 2011-11-19 427 1.0.3 now numeric_std clean -- 2011-03-27 374 1.0.2 rename ncyc -> nbusy because it counts busy cycles -- 2010-12-31 352 1.0.1 simplify irb_ack logic @@ -72,7 +74,7 @@ use work.rblib.all; entity rbd_rbmon is -- rbus dev: rbus monitor generic ( - RB_ADDR : slv8 := slv(to_unsigned(2#11111100#,8)); + RB_ADDR : slv16 := slv(to_unsigned(16#ffe8#,16)); AWIDTH : positive := 9); port ( CLK : in slbit; -- clock @@ -242,7 +244,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 2)=RB_ADDR(7 downto 2) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 2)=RB_ADDR(15 downto 2) then n.rbsel := '1'; ibramen := '1'; end if; @@ -323,8 +325,8 @@ begin rbtake := '0'; if RB_MREQ.aval='1' and irbena='1' then -- aval and (re or we) - if unsigned(RB_MREQ.addr)>=unsigned(r.lolim) and -- and in addr window - unsigned(RB_MREQ.addr)<=unsigned(r.hilim) and + if unsigned(RB_MREQ.addr(7 downto 0))>=unsigned(r.lolim) and -- and in addr window + unsigned(RB_MREQ.addr(7 downto 0))<=unsigned(r.hilim) and r.rbsel='0' then -- and not self rbtake := '1'; end if; @@ -334,7 +336,7 @@ begin end if; if rbtake = '1' then -- if capture active - n.rbaddr := RB_MREQ.addr; -- keep track of some state + n.rbaddr := RB_MREQ.addr(7 downto 0); -- keep track of some state n.rbinit := RB_MREQ.init; n.rbwe := RB_MREQ.we; if RB_MREQ.init='1' or RB_MREQ.we='1' then -- for write/init of din diff --git a/rtl/vlib/rbus/rbd_tester.vhd b/rtl/vlib/rbus/rbd_tester.vhd index 1f8f1afd..9e59dcd6 100644 --- a/rtl/vlib/rbus/rbd_tester.vhd +++ b/rtl/vlib/rbus/rbd_tester.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_tester.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbd_tester.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,15 +20,19 @@ -- Test bench: rlink/tb/tb_rlink (used as test target) -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-08-31 590 14.7 131013 xc6slx16-2 74 162 16 73 s 5.8 ver 4.1 -- 2010-12-12 344 12.1 M53d xc3s1000-4 78 204 32 133 s 8.0 -- 2010-12-04 343 12.1 M53d xc3s1000-4 75 214 32 136 s 9.3 -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-05 591 4.1 use new iface with 8 regs +-- 2014-08-30 589 4.0 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-11-19 427 1.0.4 now numeric_std clean -- 2010-12-31 352 1.0.3 simplify irb_ack logic -- 2010-12-29 351 1.0.2 default addr 111101xx->111100xx @@ -38,16 +42,17 @@ -- -- rbus registers: -- --- Address Bits Name r/w/f Function --- bbbbbb00 cntl r/w/- Control register --- 15 nofifo r/w/- a 1 disables fifo, to test delayed aborts --- 14:12 stat r/w/- echo'ed on RB_STAT --- 11:00 nbusy r/w/- busy cycles (for data and fifo access) --- bbbbbb01 15:00 data r/w/- Data register (just w/r reg, no function) --- bbbbbb10 15:00 fifo r/w/- Fifo interface register --- bbbbbb11 attn r/w/- Attn/Length register --- 15:00 w: ping RB_LAM lines --- 9:00 r: return cycle length of last access +-- Addr Bits Name r/w/f Function +-- 000 cntl r/w/- Control register +-- 15 wchk r/w/- write check seen (cleared on data write) +-- 09:00 nbusy r/w/- busy cycles (for data,dinc,fifo,lnak) +-- 001 03:00 stat r/w/- status send to RB_STAT +-- 010 attn -/w/f Attn register: ping RB_LAM lines +-- 011 09:00 ncyc r/-/- return cycle length of last access +-- 100 data r/w/- Data register (plain read/write) +-- 101 dinc r/w/- Data register (autoinc and write check) +-- 110 fifo r/w/- Fifo interface register +-- 111 lnak r/w/- delayed ack deassert -- library ieee; @@ -61,14 +66,14 @@ use work.rblib.all; entity rbd_tester is -- rbus dev: rbus tester -- complete rrirp_aif interface generic ( - RB_ADDR : slv8 := slv(to_unsigned(2#11110000#,8))); + RB_ADDR : slv16 := slv(to_unsigned(16#ffe0#,16))); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response RB_LAM : out slv16; -- rbus: look at me - RB_STAT : out slv3 -- rbus: status flags + RB_STAT : out slv4 -- rbus: status flags ); end entity rbd_tester; @@ -77,13 +82,16 @@ architecture syn of rbd_tester is constant awidth : positive := 4; -- fifo address width - constant rbaddr_cntl : slv2 := "00"; -- cntl address offset - constant rbaddr_data : slv2 := "01"; -- data address offset - constant rbaddr_fifo : slv2 := "10"; -- fifo address offset - constant rbaddr_attn : slv2 := "11"; -- attn address offset + constant rbaddr_cntl : slv3 := "000"; -- cntl address offset + constant rbaddr_stat : slv3 := "001"; -- stat address offset + constant rbaddr_attn : slv3 := "010"; -- attn address offset + constant rbaddr_ncyc : slv3 := "011"; -- ncyc address offset + constant rbaddr_data : slv3 := "100"; -- data address offset + constant rbaddr_dinc : slv3 := "101"; -- dinc address offset + constant rbaddr_fifo : slv3 := "110"; -- fifo address offset + constant rbaddr_lnak : slv3 := "111"; -- lnak address offset - constant cntl_rbf_nofifo : integer := 15; - subtype cntl_rbf_stat is integer range 14 downto 12; + constant cntl_rbf_wchk : integer := 15; subtype cntl_rbf_nbusy is integer range 9 downto 0; constant init_rbf_cntl : integer := 0; @@ -92,8 +100,8 @@ architecture syn of rbd_tester is type regs_type is record -- state registers rbsel : slbit; -- rbus select - nofifo : slbit; -- disable fifo flag - stat : slv3; -- stat setting + wchk : slbit; -- write check flag + stat : slv4; -- stat setting nbusy : slv10; -- nbusy setting data : slv16; -- data register act_1 : slbit; -- rbsel and (re or we) in last cycle @@ -103,8 +111,7 @@ architecture syn of rbd_tester is end record regs_type; constant regs_init : regs_type := ( - '0', -- rbsel - '0', -- nofifo + '0','0', -- rbsel, wchk (others=>'0'), -- stat (others=>'0'), -- nbusy (others=>'0'), -- data @@ -193,7 +200,7 @@ begin -- rbus address decoder n.rbsel := '0'; - if RB_MREQ.aval='1' and RB_MREQ.addr(7 downto 2)=RB_ADDR(7 downto 2) then + if RB_MREQ.aval='1' and RB_MREQ.addr(15 downto 3)=RB_ADDR(15 downto 3) then n.rbsel := '1'; @@ -218,55 +225,73 @@ begin irb_ack := irbena; -- ack all (some rejects later) - case RB_MREQ.addr(1 downto 0) is + case RB_MREQ.addr(2 downto 0) is when rbaddr_cntl => if RB_MREQ.we='1' then - n.nofifo := RB_MREQ.din(cntl_rbf_nofifo); - n.stat := RB_MREQ.din(cntl_rbf_stat); + n.wchk := RB_MREQ.din(cntl_rbf_wchk); n.nbusy := RB_MREQ.din(cntl_rbf_nbusy); - if r.nofifo='1' and RB_MREQ.din(cntl_rbf_nofifo)='0' then - ififo_reset := '1'; - end if; + end if; + + when rbaddr_stat => + if RB_MREQ.we='1' then + n.stat := RB_MREQ.din(r.stat'range); + end if; + + when rbaddr_attn => + if RB_MREQ.we = '1' then -- on we + irblam := RB_MREQ.din; -- ping lam lines + elsif RB_MREQ.re = '1' then -- on re + irb_err := '1'; -- reject + end if; + + when rbaddr_ncyc => + if RB_MREQ.we = '1' then -- on we + irb_err := '1'; -- reject end if; when rbaddr_data => irb_busy := irbena and isbusy; if RB_MREQ.we='1' and isbusy='0' then + n.wchk := '0'; n.data := RB_MREQ.din; end if; - when rbaddr_fifo => - if r.nofifo = '0' then -- if fifo enabled - irb_busy := irbena and isbusy; - if RB_MREQ.re='1' and isbusy='0' then - if FIFO_EMPTY = '1' then - irb_err := '1'; - else - ififo_re := '1'; - end if; - end if; - if RB_MREQ.we='1' and isbusy='0' then - if FIFO_FULL = '1' then - irb_err := '1'; - else - ififo_we := '1'; - end if; - end if; - - else -- else: if fifo disabled - irb_ack := '0'; -- nak it - if isbusy = '1' then -- or do a delayed nak - irb_ack := irbena; - irb_busy := irbena; + when rbaddr_dinc => + irb_busy := irbena and isbusy; + if RB_MREQ.we = '1' then + if r.data /= RB_MREQ.din then + n.wchk := '1'; end if; end if; - - when rbaddr_attn => - if RB_MREQ.we = '1' then - irblam := RB_MREQ.din; + if (RB_MREQ.re='1' or RB_MREQ.we='1') and isbusy='0' then + n.data := slv(unsigned(r.data) + 1); end if; + when rbaddr_fifo => + irb_busy := irbena and isbusy; + if RB_MREQ.re='1' and isbusy='0' then + if FIFO_EMPTY = '1' then + irb_err := '1'; + else + ififo_re := '1'; + end if; + end if; + if RB_MREQ.we='1' and isbusy='0' then + if FIFO_FULL = '1' then + irb_err := '1'; + else + ififo_we := '1'; + end if; + end if; + + when rbaddr_lnak => + irb_ack := '0'; -- nak it + if isbusy = '1' then -- or do a delayed nak + irb_ack := irbena; + irb_busy := irbena; + end if; + when others => null; end case; end if; @@ -276,31 +301,36 @@ begin -- send data only when busy=0 and err=0 -- this extra logic allows to debug rlink state machine if r.rbsel = '1' then + irb_dout := "0101010101010101"; -- drive this pattern when selected if RB_MREQ.re='1' and irb_busy='0' and irb_err='0' then - case RB_MREQ.addr(1 downto 0) is + case RB_MREQ.addr(2 downto 0) is when rbaddr_cntl => - irb_dout(cntl_rbf_stat) := r.stat; - irb_dout(cntl_rbf_nofifo) := r.nofifo; + irb_dout := (others=>'0'); + irb_dout(cntl_rbf_wchk) := r.wchk; irb_dout(cntl_rbf_nbusy) := r.nbusy; - when rbaddr_data => + when rbaddr_stat => + irb_dout := (others=>'0'); + irb_dout(r.stat'range) := r.stat; + when rbaddr_attn => null; + when rbaddr_ncyc => + irb_dout := (others=>'0'); + irb_dout(r.cntcyc'range) := r.ncyc; + when rbaddr_data | rbaddr_dinc => irb_dout := r.data; when rbaddr_fifo => - if r.nofifo='0' and FIFO_EMPTY = '0' then + if FIFO_EMPTY = '0' then irb_dout := FIFO_DO; end if; - when rbaddr_attn => - irb_dout(r.cntcyc'range) := r.ncyc; + when rbaddr_lnak => null; when others => null; end case; - else - irb_dout := "0101010101010101"; end if; end if; -- init transactions - if RB_MREQ.init='1' and RB_MREQ.we='1' and RB_MREQ.addr=RB_ADDR then + if RB_MREQ.init='1' and RB_MREQ.addr=RB_ADDR then if RB_MREQ.din(init_rbf_cntl) = '1' then - n.nofifo := '0'; + n.wchk := '0'; n.stat := (others=>'0'); n.nbusy := (others=>'0'); end if; diff --git a/rtl/vlib/rbus/rbd_timer.vhd b/rtl/vlib/rbus/rbd_timer.vhd index 65c5702a..af21f4dc 100644 --- a/rtl/vlib/rbus/rbd_timer.vhd +++ b/rtl/vlib/rbus/rbd_timer.vhd @@ -1,6 +1,6 @@ --- $Id: rbd_timer.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbd_timer.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -20,7 +20,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri @@ -28,15 +28,16 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-15 583 4.0 rb_mreq addr now 16 bit -- 2011-11-19 427 1.0.1 now numeric_std clean -- 2010-12-29 351 1.0 Initial version ------------------------------------------------------------------------------ -- -- rbus registers: -- --- Address Bits Name r/w/f Function --- bbbbbbbb time r/w/- Timer register --- w: if > 0 timer is running +-- Addr Bits Name r/w/f Function +-- 0 time r/w/- Timer register +-- w: if > 0 timer is running -- library ieee; @@ -48,7 +49,7 @@ use work.rblib.all; entity rbd_timer is -- rbus dev: usec precision timer generic ( - RB_ADDR : slv8 := slv(to_unsigned(2#00000000#,8))); + RB_ADDR : slv16 := (others=>'0')); port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- usec pulse diff --git a/rtl/vlib/rbus/rbdlib.vhd b/rtl/vlib/rbus/rbdlib.vhd index 9281c9c1..cdcc489d 100644 --- a/rtl/vlib/rbus/rbdlib.vhd +++ b/rtl/vlib/rbus/rbdlib.vhd @@ -1,6 +1,6 @@ --- $Id: rbdlib.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rbdlib.vhd 603 2014-11-09 22:50:26Z mueller $ -- --- Copyright 2010-2011 by Walter F.J. Mueller +-- Copyright 2010-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,23 +16,21 @@ -- Description: Definitions for rbus devices -- -- Dependencies: - --- Tool versions: xst 12.1, 13.1; ghdl 0.29 +-- Tool versions: xst 12.1-14.7; ghdl 0.29-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-13 593 4.0 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-11-19 427 1.2.1 now numeric_std clean -- 2010-12-29 351 1.2 new address layout; add rbd_timer -- 2010-12-27 349 1.1 now correct defs for _rbmon and _eyemon -- 2010-12-04 343 1.0 Initial version ------------------------------------------------------------------------------ -- --- base addresses of some standard rbus devices --- --- rbd_rbmon 111111xx -++-- these three used as monitors --- rbd_eyemon 111110xx / --- rbd_rlstat 1111011x / --- rbd_bram 1111010x \ --- rbd_tester 111100xx +- all five used in test benchs +-- two devices have standard addresses +-- rbd_rbmon x"ffe8" +-- rbd_tester x"ffe0" -- @@ -48,41 +46,26 @@ package rbdlib is -- ise 13.1 xst can bug check if generic defaults in a package are defined via -- 'slv(to_unsigned())'. The conv_ construct prior to numeric_std was ok. -- As workaround the ibus default addresses are defined here as constant. -constant rbaddr_tester : slv8 := slv(to_unsigned(2#11110000#,8)); -constant rbaddr_bram : slv8 := slv(to_unsigned(2#11110100#,8)); -constant rbaddr_rbmon : slv8 := slv(to_unsigned(2#11111100#,8)); -constant rbaddr_eyemon : slv8 := slv(to_unsigned(2#11111000#,8)); -constant rbaddr_timer : slv8 := slv(to_unsigned(2#00000000#,8)); +constant rbaddr_tester : slv16 := slv(to_unsigned(16#ffe0#,16)); +constant rbaddr_rbmon : slv16 := slv(to_unsigned(16#ffe8#,16)); component rbd_tester is -- rbus dev: rbus tester -- complete rbus_aif interface generic ( - RB_ADDR : slv8 := rbaddr_tester); + RB_ADDR : slv16 := rbaddr_tester); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response RB_LAM : out slv16; -- rbus: look at me - RB_STAT : out slv3 -- rbus: status flags - ); -end component; - -component rbd_bram is -- rbus dev: bram test target - -- incomplete rbus_aif interface - generic ( - RB_ADDR : slv8 := rbaddr_bram); - port ( - CLK : in slbit; -- clock - RESET : in slbit; -- reset - RB_MREQ : in rb_mreq_type; -- rbus: request - RB_SRES : out rb_sres_type -- rbus: response + RB_STAT : out slv4 -- rbus: status flags ); end component; component rbd_rbmon is -- rbus dev: rbus monitor generic ( - RB_ADDR : slv8 := rbaddr_rbmon; + RB_ADDR : slv16 := rbaddr_rbmon; AWIDTH : positive := 9); port ( CLK : in slbit; -- clock @@ -95,7 +78,7 @@ end component; component rbd_eyemon is -- rbus dev: eye monitor for serport's generic ( - RB_ADDR : slv8 := rbaddr_eyemon; + RB_ADDR : slv16 := (others=>'0'); RDIV : slv8 := (others=>'0')); port ( CLK : in slbit; -- clock @@ -107,9 +90,21 @@ component rbd_eyemon is -- rbus dev: eye monitor for serport's ); end component; +component rbd_bram is -- rbus dev: bram test target + -- incomplete rbus_aif interface + generic ( + RB_ADDR : slv16 := (others=>'0')); + port ( + CLK : in slbit; -- clock + RESET : in slbit; -- reset + RB_MREQ : in rb_mreq_type; -- rbus: request + RB_SRES : out rb_sres_type -- rbus: response + ); +end component; + component rbd_timer is -- rbus dev: usec precision timer generic ( - RB_ADDR : slv8 := rbaddr_timer); + RB_ADDR : slv16 := (others=>'0')); port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- usec pulse diff --git a/rtl/vlib/rbus/rblib.vhd b/rtl/vlib/rbus/rblib.vhd index ad4fce69..5552cfab 100644 --- a/rtl/vlib/rbus/rblib.vhd +++ b/rtl/vlib/rbus/rblib.vhd @@ -1,6 +1,6 @@ --- $Id: rblib.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: rblib.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,10 +16,12 @@ -- Description: Definitions for rbus interface and bus entities -- -- Dependencies: - --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-14 593 4.0 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-12-23 444 3.1 CLK_CYCLE now integer -- 2011-08-13 405 3.0.3 add in direction for FADDR,SEL ports -- 2010-12-26 349 3.0.2 add rb_sel @@ -42,7 +44,7 @@ type rb_mreq_type is record -- rbus - master request re : slbit; -- read enable we : slbit; -- write enable init : slbit; -- init - addr : slv8; -- address + addr : slv16; -- address din : slv16; -- data (input to slave) end record rb_mreq_type; @@ -64,7 +66,7 @@ constant rb_sres_init : rb_sres_type := component rb_sel is -- rbus address select logic generic ( - RB_ADDR : slv8; -- rbus address base + RB_ADDR : slv16; -- rbus address base SAWIDTH : natural := 0); -- device subaddress space width port ( CLK : in slbit; -- clock @@ -105,7 +107,7 @@ component rbus_aif is -- rbus, abstract interface RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response RB_LAM : out slv16; -- rbus: look at me - RB_STAT : out slv3 -- rbus: status flags + RB_STAT : out slv4 -- rbus: status flags ); end component; @@ -162,7 +164,7 @@ component rb_sres_or_mon is -- rbus result or monitor end component; -- simbus sb_cntl field usage for rbus -constant sbcntl_sbf_rbmon : integer := 14; +constant sbcntl_sbf_rbmon : integer := 13; component rb_mon is -- rbus monitor generic ( @@ -174,7 +176,7 @@ component rb_mon is -- rbus monitor RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16 := (others=>'0'); -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end component; @@ -187,7 +189,7 @@ component rb_mon_sb is -- simbus wrapper for rbus monitor RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16 := (others=>'0'); -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end component; diff --git a/rtl/vlib/rlink/Makefile b/rtl/vlib/rlink/Makefile index 0a7e9ce6..93cacabd 100644 --- a/rtl/vlib/rlink/Makefile +++ b/rtl/vlib/rlink/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 575 2014-07-27 20:55:41Z mueller $ +# $Id: Makefile 582 2014-08-14 21:37:51Z mueller $ # # Revision History: # Date Rev Version Comment @@ -14,7 +14,7 @@ NGC_all = $(VBOM_all:.vbom=.ngc) ifndef XTW_BOARD XTW_BOARD=nexys3 endif -include $(RETROBASE)/rtl/make/xflow_default_$(XTW_BOARD) +include $(RETROBASE)/rtl/make/xflow_default_$(XTW_BOARD).mk # .PHONY : all clean # diff --git a/rtl/vlib/rlink/rlink_core.vbom b/rtl/vlib/rlink/rlink_core.vbom index a6480499..b238d108 100644 --- a/rtl/vlib/rlink/rlink_core.vbom +++ b/rtl/vlib/rlink/rlink_core.vbom @@ -1,9 +1,17 @@ # libs ../slvtypes.vhd +../memlib/memlib.vhd ../comlib/comlib.vhd ../rbus/rblib.vhd rlinklib.vbom # components -../comlib/crc8.vbom +[ghdl,isim]../memlib/ram_2swsr_rfirst_gen.vbom +[xst]../memlib/ram_2swsr_rfirst_gen_unisim.vbom +../memlib/fifo_1c_dram.vbom +../comlib/crc16.vbom +../rbus/rb_sel.vbom +../rbus/rb_sres_or_2.vbom +[ghdl,isim]rlink_mon_sb.vbom +[ghdl,isim]../rbus/rb_mon_sb.vbom # design rlink_core.vhd diff --git a/rtl/vlib/rlink/rlink_core.vhd b/rtl/vlib/rlink/rlink_core.vhd index 2c304b73..b251f087 100644 --- a/rtl/vlib/rlink/rlink_core.vhd +++ b/rtl/vlib/rlink/rlink_core.vhd @@ -1,6 +1,6 @@ --- $Id: rlink_core.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: rlink_core.vhd 614 2014-12-20 15:00:45Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -13,26 +13,33 @@ -- ------------------------------------------------------------------------------ -- Module Name: rlink_core - syn --- Description: rlink core with 9bit interface +-- Description: rlink core with 9bit interface (with rlmon+rbmon) -- --- Dependencies: comlib/crc8 +-- Dependencies: memlib/ram_2swsr_rfirst_gen +-- memlib/fifo_1c_dram +-- comlib/crc16 +-- rb_sel +-- rb_sres_or_2 +-- rlink_mon_sb [sim only] +-- rbus/rb_mon_sb [sim only] -- -- Test bench: tb/tb_rlink_direct -- tb/tb_rlink_serport -- tb/tb_rlink_tba_ttcombo -- -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri --- 2010-12-04 343 12.1 M53d xc3s1000-4 155 322 0 199 s 8.9 --- 2010-06-06 302 11.4 L68 xc3s1000-4 151 323 0 197 s 8.9 --- 2010-04-03 274 11.4 L68 xc3s1000-4 148 313 0 190 s 8.0 --- 2009-07-11 232 10.1.03 K39 xc3s1000-4 147 321 0 197 s 8.3 +-- 2014-12-20 614 14.7 131013 xc6slx16-2 310 453 16 146 s 6.8 ver 4.0 +-- 2014-08-13 581 14.7 131013 xc6slx16-2 160 230 0 73 s 6.0 ver 3.0 +-- 2014-08-13 581 14.7 131013 xc3s1000-4 160 358 0 221 s 8.9 ver 3.0 -- -- Revision History: -- Date Rev Version Comment +-- 2014-12-20 614 4.0 largely rewritten; 2 FSMs; v3 protocol; 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit; add s_rxaddrl state -- 2011-11-19 427 3.1.3 now numeric_std clean -- 2010-12-25 348 3.1.2 drop RL_FLUSH support, add RL_MONI for rlink_core; -- 2010-12-24 347 3.1.1 rename: CP_*->RL->* @@ -58,104 +65,80 @@ -- 2007-09-15 82 1.0 Initial version, fully functional -- 2007-06-17 58 0.5 First preliminary version ------------------------------------------------------------------------------ --- --- Overall protocol: --- _idle : expect --- sop -> _txsop (echo sop, , to _txsop, _rxcmd) --- eop -> _txeop (send nak,eop , to _txnak, _txeop, _idle) --- nak -> _txnak (silently ignore nak) --- attn -> _txito (send ito , to _idle) --- data -> _idle (silently ignore data) --- _error: expect --- sop -> _txnak (send nak , to _txnak, _error) --- eop -> _txeop (echo eop , to _txeop, _idle) --- nak -> _txnak (echo nak , to _txnak, _error) --- attn -> _txito (silently ignore attn) --- data -> _idle (silently ignore data) --- _rxcmd: expect --- sop -> _txnak (send nak , to _txnak, _error) --- eop -> _txeop (echo eop , to _txeop, _idle) --- nak -> _txnak (echo nak , to _txnak, _error) --- attn -> _txito (silently ignore attn) --- data -> _idle (decode command) --- _rx...: expect --- sop -> _txnak (send nak , to _txnak, _error) --- eop -> _txnak (send nak,eop , to _txnak, _txeop, _idle) --- nak -> _txnak (echo nak , to _txnak, _error) --- attn -> _txito (silently ignore attn) --- data -> _idle (decode data) --- -- 7 supported commands: +-- nak aborts to _txnak are indicated as [nak:] +-- commands to rbus engine are indicated as [bcmd:] -- -- 000 read reg (rreg): --- rx: cmd addr ccrc --- tx: cmd dl dh stat crc --- seq: _rxcmd _rxaddr _rxccrc (_txcmd|_txnak) --- _rstart _rreg _txdatl _txdath _txstat _txcrc -> _rxcmd +-- rx: cmd al ah ccrcl ccrch +-- tx: cmd dl dh stat crcl crch +-- seq: _rxcmd _rxaddrl _rxaddrh +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _rstart[bcmd:rblk] {_txdat}* +-- _txstat _txcrcl[nak:rtovfl] -> _txcrch -> _rxcmd -- -- 001 read blk (rblk): --- rx: cmd addr cnt ccrc --- tx: cmd cnt dl dh ... stat crc --- seq: _rxcmd _rxaddr _rxcnt _rxccrc (_txcmd|_txnak) _txcnt --- {_rstart _rreg _txdatl _txdath _blk}* --- _txstat _txcrc -> _rxcmd +-- rx: cmd al ah cl ch ccrcl ccrch +-- tx: cmd cnt dl dh ... dcl dch stat crcl crch +-- seq: _rxcmd _rxaddrl _rxaddrh _rxcntl _rxcnth +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _txcntl _txcnth _rstart[bcmd:rblk] {_txdat}* _txdcntl _txdcnth +-- _txstat _txcrcl[nak:rtovfl] -> _txcrch -> _rxcmd -- -- 010 write reg (wreg): --- rx: cmd addr dl dh ccrc --- tx: cmd stat crc --- seq: _rxcmd _rxaddr _rxdatl _rxdath _rxccrc (_txcmd|_txnak) --- _wstart _wreg _txstat _txcrc -> _rxcmd +-- rx: cmd al ah dl dh ccrcl ccrch +-- tx: cmd stat crcl crch +-- seq: _rxcmd _rxaddrl _rxaddrh _rxdatl _rxdath +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _txcmd[bcmd:wblk] _wwait0 +-- _txstat _txcrcl[nak:rtovfl] -> _txcrch -> _rxcmd -- -- 011 write blk (wblk): --- rx: cmd addr cnt ccrc dl dh ... dcrc --- tx: cmd stat crc --- seq: _rxcmd _rxaddr _rxcnt _rxccrc (_txcmd|_txnak) --- {_rxdatl _rxdath _wstart _wreg _blk}* --- _rxdcrc _txstat _txcrc -> (_rxcmd|_txnak) +-- rx: cmd al ah cnt ccrcl ccrch dl dh ... dcrcl dcrch +-- tx: cmd dcl dch stat crcl crch +-- seq: _rxcmd _rxaddrl _rxaddrh _rxcntl _rxcnth +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _wblk {_rxwblk}* _rxdcrc[nak:dcrc,rtwblk] +-- _wblk0 _wblk1 _wblk2[bcmd:wblk] {_wblkl _wblkh}* +-- _wwait0 _wwait1 _txdcntl _txdcnth +-- _txstat _txcrcl[nak:rtovfl] -> _txcrch -> _rxcmd -- --- 100 read stat (stat): --- rx: cmd ccrc --- tx: cmd ccmd dl dh stat crc --- seq: _rxcmd _rxccrc (_txcmd|_txnak) --- _txccmd _txdatl _txdath _txstat _txcrc -> _rxcmd +-- 100 list abort (labo): +-- rx: cmd ccrcl ccrch +-- tx: cmd babo stat crcl crch +-- seq: _rxcmd +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _txlabo +-- _txstat_txcrcl[nak:rtovfl] -> _txcrch -> [_rxcmd|_rxeop] -- -- 101 read attn (attn): --- rx: cmd ccrc --- tx: cmd dl dh stat crc --- seq: _rxcmd _rxccrc (_txcmd|_txnak) --- _attn _txdatl _txdath _txstat _txcrc -> _rxcmd +-- rx: cmd ccrcl ccrch +-- tx: cmd dl dh stat crcl crch +-- seq: _rxcmd +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd +-- _attn _txcntl _txcnth +-- _txstat _txcrcl[nak:rtovfl] -> _txcrch -> _rxcmd -- -- 110 write init (init): --- rx: cmd addr dl dh ccrc --- tx: cmd stat crc --- seq: _rxcmd _rxaddr _rxdatl _rxdath _rxccrc (_txcmd|_txnak) --- _txstat _txcrc -> _rxcmd --- like wreg, but no rp_we - rp_hold, just a 1 cycle rp_init pulse +-- rx: cmd al ah dl dh ccrcl ccrch +-- tx: cmd stat crcl crch +-- seq: _rxcmd _rxaddrl _rxaddrh _rxdatl _rxdath +-- _rxccrcl[nak:ccrc] _rxccrch[nak:ccrc] _txcmd[bcmd:init] +-- _txstat _txcrc[nak:rtovfl] -> _rxcmd -- -- 111 is currently not a legal command and causes a nak -- seq: _txnak -- --- The state bits nakcerr and nakderr determine whether cerr/derr is set --- when s_txnak is entered. cerr is '1' during command receive, derr is '1' --- during data wblk data receive phase: --- nakcerr set in s_rxcmd (when command received, unless it's stat) --- clr in s_txcmd (when wblk) --- clr in s_txnak --- clr in s_txcrc (for sucessful completion) --- nakderr set in s_txcmd (when wblk) --- clr in s_txnak --- clr in s_txcrc (for sucessful completion) --- -- The different rbus cycle types are encoded as: -- -- init aval re we -- 0 0 0 0 idle --- 0 0 1 0 not allowed --- 0 0 0 1 not allowed -- 0 1 1 0 read -- 0 1 0 1 write --- 1 0 0 0 internal init --- 1 0 0 1 external init +-- 1 0 0 0 init +-- 0 0 1 0 not allowed +-- 0 0 0 1 not allowed +-- 1 0 0 1 not allowed -- 1 0 1 0 not allowed -- * * 1 1 not allowed -- 1 1 * * not allowed @@ -166,17 +149,21 @@ use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.slvtypes.all; +use work.memlib.all; use work.comlib.all; use work.rblib.all; use work.rlinklib.all; entity rlink_core is -- rlink core with 9bit interface generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6); -- idle timeout counter width + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RBMON : integer := -1); -- SB_CNTL for rbmon (-1=none) port ( CLK : in slbit; -- clock - CE_INT : in slbit := '0'; -- rri ito time unit clock enable + CE_INT : in slbit := '0'; -- rri ato time unit clock enable RESET : in slbit; -- reset RL_DI : in slv9; -- rlink 9b: data in RL_ENA : in slbit; -- rlink 9b: data enable @@ -188,705 +175,1482 @@ entity rlink_core is -- rlink core with 9bit interface RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); -end entity rlink_core; + attribute fsm_encoding : string; + attribute fsm_encoding of rlink_core : entity is "one-hot"; + +end entity rlink_core; architecture syn of rlink_core is - type state_type is ( - s_idle, -- s_idle: wait for sop - s_txito, -- s_txito: send timeout symbol - s_txsop, -- s_txsop: send sop - s_txnak, -- s_txnak: send nak - s_txeop, -- s_txeop: send eop - s_error, -- s_error: wait for eop - s_rxcmd, -- s_rxcmd: wait for cmd - s_rxaddr, -- s_rxaddr: wait for addr - s_rxdatl, -- s_rxdatl: wait for data low - s_rxdath, -- s_rxdath: wait for data high - s_rxcnt, -- s_rxcnt: wait for count - s_rxccrc, -- s_rxccrc: wait for command crc - s_txcmd, -- s_txcmd: send cmd - s_txcnt, -- s_txcnt: send cnt - s_rstart, -- s_rstart: start reg or blk read - s_rreg, -- s_rreg: do reg or blk read - s_txdatl, -- s_txdatl: send data low - s_txdath, -- s_txdath: send data high - s_wstart, -- s_wstart: start reg or blk write - s_wreg, -- s_wreg: do reg or blk write - s_blk, -- s_blk: block count handling - s_rxdcrc, -- s_rxdcrc: wait for data crc - s_attn, -- s_attn: handle attention flags - s_txccmd, -- s_txccmd: send last command - s_txstat, -- s_txstat: send status - s_txcrc -- s_txcrc: send crc + constant rbaddr : slv16:= "1111111111111100"; -- core config base (top 4) + constant rbaddr_cntl : slv2 := "11"; -- cntl address offset + constant rbaddr_stat : slv2 := "10"; -- stat address offset + constant rbaddr_id1 : slv2 := "01"; -- id1 address offset + constant rbaddr_id0 : slv2 := "00"; -- id0 address offset + + constant d_f_cflag : integer := 8; -- d9: comma flag + subtype d_f_ctyp is integer range 2 downto 0; -- d9: comma type + subtype d_f_data is integer range 7 downto 0; -- d9: data field + + subtype f_byte1 is integer range 15 downto 8; + subtype f_byte0 is integer range 7 downto 0; + + constant cntl_rbf_anena : integer := 15; -- anena flag + constant cntl_rbf_atoena : integer := 14; -- atoena flag + subtype cntl_rbf_atoval is integer range 7 downto 0; -- atoval value + subtype stat_rbf_lcmd is integer range 15 downto 8; -- lcmd + constant stat_rbf_babo : integer := 7; -- block abort flag + constant stat_rbf_arpend : integer := 6; -- attn read pend + subtype stat_rbf_rbsize is integer range 2 downto 0; -- rbuf size + + -- following 4 constants can derived from c_rlink_dat_sop,... + -- defined directly here to work around a ghdl bug + constant c_sop : slv3 := "000"; + constant c_eop : slv3 := "001"; + constant c_nak : slv3 := "010"; + constant c_attn : slv3 := "011"; + + constant c_bcmd_stat : slv2 := "00"; + constant c_bcmd_init : slv2 := "01"; + constant c_bcmd_rblk : slv2 := "10"; + constant c_bcmd_wblk : slv2 := "11"; + + constant cntawidth : positive := RTAWIDTH-1; -- cnt is word count + subtype cnt_f_dat is integer range cntawidth-1 downto 0; -- cnt data + + -- link FSM states and state vector ---------------------------------------- + type lstate_type is ( + sl_idle, -- sl_idle: wait for sop + sl_txanot, -- sl_txanot: send attn notify + sl_txsop, -- sl_txsop: send sop + sl_txnak, -- sl_txnak: send nak + sl_txnakcode, -- sl_txnakcode: send nakcode + sl_txrtbuf, -- sl_txrtbuf: send rtbuf + sl_txeop, -- sl_txeop: send eop + sl_rxeop, -- sl_rxeop: wait for eop + sl_rxcmd, -- sl_rxcmd: wait for cmd + sl_rxaddrl, -- sl_rxaddrl: wait for addr low + sl_rxaddrh, -- sl_rxaddrh: wait for addr high + sl_rxdatl, -- sl_rxdatl: wait for data low + sl_rxdath, -- sl_rxdath: wait for data high + sl_rxcntl, -- sl_rxcntl: wait for count low + sl_rxcnth, -- sl_rxcnth: wait for count low + sl_rxccrcl, -- sl_rxccrcl: wait for command crc low + sl_rxccrch, -- sl_rxccrcl: wait for command crc high + sl_txcmd, -- sl_txcmd: send cmd + sl_txcntl, -- sl_txcntl: send cnt lsb + sl_txcnth, -- sl_txcnth: send cnt msb + sl_rstart, -- sl_rstart: start rreg or rblk + sl_txdat, -- sl_txdat: send data + sl_wblk, -- sl_wblk: setup rx wblk data + sl_rxwblk, -- sl_rxwblk: wait for wblk data + sl_rxdcrcl, -- sl_rxdcrcl: wait for data crc low + sl_rxdcrch, -- sl_rxdcrch: wait for data crc high + sl_wblk0, -- sl_wblk0: start wblk pipe + sl_wblk1, -- sl_wblk1: start wblk data lsb + sl_wblk2, -- sl_wblk2: start wblk data msb + sl_wblkl, -- sl_wblkl: wblk data lsb + sl_wblkh, -- sl_wblkh: wblk data msb + sl_wwait0, -- sl_wwait0: wait for wdone + sl_wwait1, -- sl_wwait1: wait for dcnt + sl_txdcntl, -- sl_txdcntl: send dcnt lsb + sl_txdcnth, -- sl_txdcnth: send dcnt lsb + sl_txlabo, -- sl_txlabo: send labo flag + sl_attn, -- sl_attn: handle attention flags + sl_txstat, -- sl_txstat: send status + sl_txcrcl, -- sl_txcrcl: send crc low + sl_txcrch -- sl_txcrch: send crc high ); - type regs_type is record - state : state_type; -- state + type lregs_type is record + state : lstate_type; -- state rcmd : slv8; -- received command - ccmd : slv8; -- current command - addr : slv8; -- register address - dil : slv8; -- input data, lsb - dih : slv8; -- input data, msb - dol : slv8; -- output data, lsb - doh : slv8; -- output data, msb - cnt : slv8; -- block transfer count + lcmd : slv8; -- last command + addr : slv16; -- rbus register address + din : slv16; -- rbus input data + cnt : slv16; -- block transfer count + bcnt : slv(RTAWIDTH-1 downto 0); -- blk counter (byte and word) attn : slv16; -- attn mask - atocnt : slv(ATOWIDTH-1 downto 0); -- access timeout counter - itocnt : slv(ITOWIDTH-1 downto 0); -- idle timeout counter - itoval : slv(ITOWIDTH-1 downto 0); -- idle timeout value - itoena : slbit; -- idle timeout enable flag - anena : slbit; -- attn notification enable flag - andone : slbit; -- attn notification done - cerr : slbit; -- stat: command error - derr : slbit; -- stat: data error - rbnak: slbit; -- stat: rbus no ack or timeout - rberr : slbit; -- stat: rbus err bit set - nakeop : slbit; -- send eop after nak - nakcerr : slbit; -- set cerr after nak - nakderr : slbit; -- set derr after nak + anreq : slbit; -- attn notify request + anact : slbit; -- attn notify active + arpend : slbit; -- attn read pending + atocnt : slv8; -- attn timeout counter + babo : slbit; -- last blk aborted + nakdone : slbit; -- nak done + nakcode : slv3; -- nak code + cmdseen : slbit; -- 1st command seen + doretra : slbit; -- do a retransmit + dinl : slv8; -- din lsb for wblk pipeline + rtaddra : slv(RTAWIDTH-1 downto 0); -- rtbuf port a addr (write pointer) + rtaddra_red : slbit; -- rtaddra red (at max) + rtaddra_bad : slbit; -- rtaddra bad (inc beyond max) + rtaddrb : slv(RTAWIDTH-1 downto 0); -- rtbuf port b addr (aux pointer) + rtaddrb_red : slbit; -- rtaddrb red (at max) + rtaddrb_bad : slbit; -- rtaddrb bad (inc beyond max) + moneop : slbit; -- rl_moni: eop send pulse + monattn : slbit; -- rl_moni: attn send pulse + end record lregs_type; + + constant bcnt_zero : slv(RTAWIDTH-1 downto 0) := (others=>'0'); + constant rtaddr_zero : slv(RTAWIDTH-1 downto 0) := (others=>'0'); + constant rtaddr_tred : slv(RTAWIDTH-1 downto 0) := (0=>'0', others=>'1'); + + constant lregs_init : lregs_type := ( + sl_idle, -- state + (others=>'0'), -- rcmd + (others=>'1'), -- lcmd + (others=>'0'), -- addr + (others=>'0'), -- din + (others=>'0'), -- cnt + bcnt_zero, -- bcnt + (others=>'0'), -- attn + '0','0','0', -- anreq,anact,arpend + (others=>'0'), -- atocnt + '0', -- babo + '0', -- nakdone + (others=>'0'), -- nakcode + '0','0', -- cmdseen,doretra + (others=>'0'), -- dinl + rtaddr_zero, -- rtaddra + '0','0', -- rtaddra_red, rtaddra_bad + rtaddr_zero, -- rtaddrb + '0','0', -- rtaddrb_red, rtaddrb_bad + '0','0' -- moneop,monattn + ); + + -- bus FSM states and state vector ----------------------------------------- + type bstate_type is ( + sb_idle, -- sb_idle: wait for cmd + sb_rstart, -- sb_rstart: start rblk + sb_rreg0, -- sb_rreg0: rbus read cycle + sb_rreg1, -- sb_rreg1: send read data + sb_rwait, -- sb_rwait: wait for fifo + sb_rend, -- sb_rend: send last read data + sb_rabo0, -- sb_rabo0: rblk abort, lsb data + sb_rabo1, -- sb_rabo1: rblk abort, msb data + sb_wstart, -- sb_wstart: start wblk + sb_wreg0, -- sb_wreg0: rbus write cycle + sb_wreg1, -- sb_wreg1: wait write data + sb_wabo0, -- sb_wabo0: wblk abort, drop data + sb_wabo1 -- sb_wabo1: wblk abort, wait + ); + + type bregs_type is record + state : bstate_type; -- state rbinit : slbit; -- rbus init signal rbaval : slbit; -- rbus aval signal rbre : slbit; -- rbus re signal rbwe : slbit; -- rbus we signal - moneop : slbit; -- rl_moni: eop send pulse - monattn : slbit; -- rl_moni: attn send pulse - monlamp : slbit; -- rl_moni: attn pending state - stat : slv3; -- external status flags - end record regs_type; + rbdout : slv16; -- rbus dout + rbnak: slbit; -- rbus no ack or timeout + rberr : slbit; -- rbus err bit set + blkabo : slbit; -- blk abort + cnt : slv(cntawidth-1 downto 0); -- word count for rblk and wblk + dcnt : slv(cntawidth-1 downto 0); -- done count for rblk and wblk + btocnt : slv(BTOWIDTH-1 downto 0); -- rbus timeout counter + dathpend : slbit; -- dat msb pending + wfifo : slbit; -- wait for fifo + stat : slv4; -- external status flags + end record bregs_type; - constant atocnt_init : slv(ATOWIDTH-1 downto 0) := (others=>'1'); - constant itocnt_init : slv(ITOWIDTH-1 downto 0) := (others=>'0'); + constant btocnt_init : slv(BTOWIDTH-1 downto 0) := (others=>'1'); + constant cnt_zero : slv(cntawidth-1 downto 0) := (others=>'0'); - constant c_idle : slv4 := "0000"; - constant c_sop : slv4 := "0001"; - constant c_eop : slv4 := "0010"; - constant c_nak : slv4 := "0011"; - constant c_attn : slv4 := "0100"; - - constant regs_init : regs_type := ( - s_idle, -- - (others=>'0'), -- rcmd - (others=>'0'), -- ccmd - (others=>'0'), -- addr - (others=>'0'), -- dil - (others=>'0'), -- dih - (others=>'0'), -- dol - (others=>'0'), -- doh - (others=>'0'), -- cnt - (others=>'0'), -- attn - atocnt_init, -- atocnt - itocnt_init, -- itocnt - itocnt_init, -- itoval - '0', -- itoena - '0','0', -- anena, andone - '0','0','0','0', -- stat flags - '0','0','0', -- nakeop,nakcerr,nakderr + constant bregs_init : bregs_type := ( + sb_idle, -- state '0','0','0','0', -- rbinit,rbaval,rbre,rbwe - '0','0','0', -- moneop,monattn,monlamp + (others=>'0'), -- rbdout + '0','0', -- rbnak,rberr + '0', -- blkabo + cnt_zero, -- cnt + cnt_zero, -- dcnt + btocnt_init, -- btocnt + '0','0', -- dathpend,wfifo (others=>'0') -- stat ); - signal R_REGS : regs_type := regs_init; -- state registers - signal N_REGS : regs_type := regs_init; -- next value state regs + -- config state regs -------------------------------------------------------- + type cregs_type is record + anena : slbit; -- attn notification enable flag + atoena : slbit; -- attn timeout enable flag + atoval : slv8; -- attn timeout value + end record cregs_type; + + constant cregs_init : cregs_type := ( + '0','0', -- anena,atoena + (others=>'0') -- atoval + ); + + signal R_LREGS : lregs_type := lregs_init; -- state registers link FSM + signal N_LREGS : lregs_type := lregs_init; -- next value state regs link FSM + signal R_BREGS : bregs_type := bregs_init; -- state registers bus FSM + signal N_BREGS : bregs_type := bregs_init; -- next value state regs bus FSM + signal R_CREGS : cregs_type := cregs_init; -- state registers config + signal N_CREGS : cregs_type := cregs_init; -- next value state regs config + + signal RTBUF_ENB : slbit := '0'; + signal RTBUF_WEA : slbit := '0'; + signal RTBUF_WEB : slbit := '0'; + signal RTBUF_DIA : slv8 := (others=>'0'); + signal RTBUF_DIB : slv8 := (others=>'0'); + signal RTBUF_DOB : slv8 := (others=>'0'); + + signal DOFIFO_DI : slv8 := (others=>'0'); + signal DOFIFO_ENA : slbit := '0'; + signal DOFIFO_DO : slv8 := (others=>'0'); + signal DOFIFO_VAL : slbit := '0'; + signal DOFIFO_HOLD : slbit := '0'; + signal DOFIFO_SIZE : slv6 := (others=>'0'); signal CRC_RESET : slbit := '0'; - signal ICRC_ENA : slbit := '0'; - signal OCRC_ENA : slbit := '0'; - signal ICRC_OUT : slv8 := (others=>'0'); - signal OCRC_OUT : slv8 := (others=>'0'); - signal OCRC_IN : slv8 := (others=>'0'); + signal ICRC_ENA : slbit := '0'; + signal OCRC_ENA : slbit := '0'; + signal ICRC_OUT : slv16 := (others=>'0'); + signal OCRC_OUT : slv16 := (others=>'0'); + signal OCRC_IN : slv8 := (others=>'0'); + + signal RBSEL : slbit := '0'; + + signal RB_MREQ_L : rb_mreq_type := rb_mreq_init; -- internal mreq + signal RB_SRES_CONF : rb_sres_type := rb_sres_init; -- config sres + signal RB_SRES_TOT : rb_sres_type := rb_sres_init; -- total sres + + signal RL_BUSY_L : slbit := '0'; + signal RL_DO_L : slv9 := (others=>'0'); + signal RL_VAL_L : slbit := '0'; + + signal L2B_GO : slbit := '0'; + signal L2B_CMD : slv2 := (others=>'0'); + signal B2L_WDONE : slbit := '0'; begin - assert ITOWIDTH<=8 - report "assert(ITOWIDTH<=8): max byte size ITO counter supported" + -- allow 11 bit (1 x 18kbit BRAM) to 15 bit (8 x 36 kbit BRAMs) + assert RTAWIDTH>=11 and RTAWIDTH<=14 + report "assert(RTAWIDTH>=11 and RTAWIDTH<=15): unsupported RTAWIDTH" severity failure; - - ICRC : crc8 -- crc generator for input data - port map ( - CLK => CLK, - RESET => CRC_RESET, - ENA => ICRC_ENA, - DI => RL_DI(7 downto 0), - CRC => ICRC_OUT - ); - OCRC : crc8 -- crc generator for output data - port map ( - CLK => CLK, - RESET => CRC_RESET, - ENA => OCRC_ENA, - DI => OCRC_IN, - CRC => OCRC_OUT - ); + RTBUF : ram_2swsr_rfirst_gen + generic map ( + AWIDTH => RTAWIDTH, + DWIDTH => 8) + port map ( + CLKA => CLK, + CLKB => CLK, + ENA => RTBUF_WEA, -- port A write only, thus en=we + ENB => RTBUF_ENB, + WEA => RTBUF_WEA, + WEB => RTBUF_WEB, + ADDRA => R_LREGS.rtaddra, + ADDRB => R_LREGS.rtaddrb, + DIA => RTBUF_DIA, + DIB => RTBUF_DIB, + DOA => open, + DOB => RTBUF_DOB + ); + + DOFIFO : fifo_1c_dram + generic map ( + AWIDTH => 5, + DWIDTH => 8) + port map ( + CLK => CLK, + RESET => RESET, + DI => DOFIFO_DI, + ENA => DOFIFO_ENA, + BUSY => open, + DO => DOFIFO_DO, + VAL => DOFIFO_VAL, + HOLD => DOFIFO_HOLD, + SIZE => DOFIFO_SIZE + ); + + ICRC : crc16 -- crc generator for input data + port map ( + CLK => CLK, + RESET => CRC_RESET, + ENA => ICRC_ENA, + DI => RL_DI(d_f_data), + CRC => ICRC_OUT + ); + + OCRC : crc16 -- crc generator for output data + port map ( + CLK => CLK, + RESET => CRC_RESET, + ENA => OCRC_ENA, + DI => OCRC_IN, + CRC => OCRC_OUT + ); + + SEL : rb_sel -- rbus address select for config regs + generic map ( + RB_ADDR => rbaddr, + SAWIDTH => 2) + port map ( + CLK => CLK, + RB_MREQ => RB_MREQ_L, + SEL => RBSEL + ); + + RB_SRES_OR : rb_sres_or_2 + port map ( + RB_SRES_1 => RB_SRES, + RB_SRES_2 => RB_SRES_CONF, + RB_SRES_OR => RB_SRES_TOT + ); proc_regs: process (CLK) begin if rising_edge(CLK) then if RESET = '1' then - R_REGS <= regs_init; + R_LREGS <= lregs_init; + R_BREGS <= bregs_init; + R_CREGS <= cregs_init; else - R_REGS <= N_REGS; - end if; + R_LREGS <= N_LREGS; + R_BREGS <= N_BREGS; + R_CREGS <= N_CREGS; + end if; end if; end process proc_regs; - proc_next: process (R_REGS, CE_INT, RL_DI, RL_ENA, RL_HOLD, RB_LAM, - RB_SRES, RB_STAT, ICRC_OUT, OCRC_OUT) + -- link FSM ================================================================ - variable r : regs_type := regs_init; - variable n : regs_type := regs_init; + proc_lnext: process (R_LREGS, R_CREGS, R_BREGS, + CE_INT, RL_DI, RL_ENA, RL_HOLD, RB_LAM, + ICRC_OUT, OCRC_OUT, RTBUF_DOB, + DOFIFO_DO, DOFIFO_VAL, + B2L_WDONE) + + variable r : lregs_type := lregs_init; + variable n : lregs_type := lregs_init; variable ival : slbit := '0'; variable ibusy : slbit := '0'; variable ido : slv9 := (others=>'0'); - variable ato_go : slbit := '0'; - variable ato_end : slbit := '0'; - variable ito_go : slbit := '0'; - variable ito_end : slbit := '0'; variable crcreset : slbit := '0'; variable icrcena : slbit := '0'; variable ocrcena : slbit := '0'; variable has_attn : slbit := '0'; - variable snd_attn : slbit := '0'; variable idi8 : slv8 := (others=>'0'); variable is_comma : slbit := '0'; - variable comma_typ : slv4 := "0000"; - - procedure do_comma_abort(nstate : inout state_type; - nnakeop : inout slbit; - comma_typ : in slv4) is - begin - if comma_typ=c_sop or comma_typ=c_eop or comma_typ=c_nak then - if comma_typ = c_eop then - nnakeop := '1'; - end if; - nstate := s_txnak; -- next: send nak - end if; - end procedure do_comma_abort; + variable comma_typ : slv3 := "000"; + variable idohold : slbit := '0'; + variable cnt_iszero : slbit := '0'; + variable bcnt_load : slbit := '0'; + variable bcnt_val : slv(RTAWIDTH-1 downto 0) := (others=>'0'); + variable bcnt_dec : slbit := '0'; + variable bcnt_end : slbit := '0'; + variable irtwea : slbit := '0'; + variable irtreb : slbit := '0'; + variable irtweb : slbit := '0'; + variable addra_clear : slbit := '0'; + variable addrb_load : slbit := '0'; + variable addrb_sela : slbit := '0'; + variable ibcmd : slv2 := (others=>'0'); + variable ibgo : slbit := '0'; begin - r := R_REGS; - n := R_REGS; + r := R_LREGS; + n := R_LREGS; - idi8 := RL_DI(7 downto 0); -- get data part of RL_DI - is_comma := RL_DI(8); -- get comma marker - comma_typ := RL_DI(3 downto 0); -- get comma type - - n.rbinit := '0'; -- clear rb(init|aval|re|we) by default - n.rbaval := '0'; -- they must always be set by the - n.rbre := '0'; -- 'previous state' - n.rbwe := '0'; -- - n.moneop := '0'; -- default '0', only set by states n.monattn := '0'; -- " - n.monlamp := '0'; -- - ibusy := '1'; -- default is to hold input ival := '0'; + ibusy := '1'; -- default is to hold input ido := (others=>'0'); crcreset := '0'; icrcena := '0'; ocrcena := '0'; - - for i in RB_LAM'range loop -- handle attention "LAM's" - if RB_LAM(i) = '1' then -- if LAM bit set - n.attn(i) := '1'; -- set attention bit - end if; - end loop; has_attn := '0'; - snd_attn := '0'; + + is_comma := RL_DI(d_f_cflag); -- get comma marker + comma_typ := RL_DI(d_f_ctyp); -- get comma type + idi8 := RL_DI(d_f_data); -- get data part of RL_DI + + idohold := '1'; -- default is to hold DOFIFO + + cnt_iszero := '0'; + if unsigned(r.cnt(cnt_f_dat)) = 0 then + cnt_iszero := '1'; + end if; - if unsigned(r.attn) /= 0 then -- is any of the attn bits set ? + bcnt_load := '0'; + bcnt_val := r.cnt(cnt_f_dat) & '0'; -- default: 2*cnt (most used) + bcnt_dec := '0'; + bcnt_end := '0'; + if unsigned(r.bcnt) = 1 then + bcnt_end := '1'; + end if; + + irtwea := '0'; + irtreb := '0'; + irtweb := '0'; + addra_clear := '0'; + addrb_load := '0'; + addrb_sela := '1'; -- default: addra (most used) + + ibcmd := (others=>'0'); + ibgo := '0'; + + -- handle attention "LAM's" + n.attn := r.attn or RB_LAM; + + -- detect attn notify requests + if unsigned(r.attn) /= 0 then -- if any of the attn bits set has_attn := '1'; - if r.anena='1' and r.andone='0' then -- is attn notification to be send ? - snd_attn := '1'; - n.monlamp := '1'; -- set lamp flag in rl_moni + if R_CREGS.anena='1' and r.arpend='0' then -- if attn to be send + n.anreq := '1'; -- set notify request flag end if; end if; - ato_go := '0'; -- default: keep access timeout in reset - ato_end := '0'; - if unsigned(r.atocnt) = 0 then -- if access timeout count at zero - ato_end := '1'; -- signal expiration - end if; + -- handle attn read timeouts + -- atocnt is held in reset when no attn read is pending + -- counting down in CE_INT cycles till zero + -- when zero, an attn notify is requested when atoena is set + -- the attn notify flag will reset atocnt to its start value + -- --> when atoena='1' this creates a notify every atoval CE_INT periods + -- --> when atoena='0' atocnt will count to zero and stay there - ito_go := '0'; -- default: keep idle timeout in reset - ito_end := '0'; - if unsigned(r.itocnt) = 0 then -- if idle timeout count at zero - ito_end := '1'; -- signal expiration + if r.arpend = '0' or r.anreq = '1' then -- if no attn read pending + n.atocnt := R_CREGS.atoval; -- keep at start value + else -- otherwise + if CE_INT = '1' then -- if CE_INT + if unsigned(r.atocnt) = 0 then -- alread counted down + n.anreq := R_CREGS.atoena; -- request attn notify if enabled + else -- not yet down + n.atocnt := slv(unsigned(r.atocnt) - 1); -- decrement + end if; + end if; end if; case r.state is - when s_idle => -- s_idle: wait for sop -------------- - ito_go := '1'; -- idle timeout active - if snd_attn = '1' then -- if attn notification to be send - n.state := s_txito; -- next: send ito byte + + when sl_idle => -- sl_idle: wait for sop ------------- + bcnt_val := r.rtaddra; -- used for nak handling + addrb_sela := '0'; + n.anact := '0'; + n.doretra := '0'; + crcreset := '1'; -- reset crc generators + if r.anreq = '1' then -- if attn notify requested + n.anreq := '0'; -- acknowledge request + n.arpend := '1'; -- mark attn read pending + n.state := sl_txanot; -- next: send attn notify else ibusy := '0'; -- accept input if RL_ENA = '1' then -- if input if is_comma = '1' then -- if comma case comma_typ is when c_sop => -- if sop - crcreset := '1'; -- reset crc generators - n.state := s_txsop; -- next: echo it - when c_eop => -- if eop (unexpected) - n.nakeop := '1'; -- send nak,eop - n.state := s_txnak; -- next: send nak + n.cmdseen := '0'; -- clear cmd seen flag + n.state := sl_txsop; -- next: echo it when c_attn => -- if attn - n.state := s_txito; -- next: send ito byte + n.state := sl_txanot; -- next: send attn notify + when c_nak => + addrb_load := '1'; + bcnt_load := '1'; + n.doretra := '1'; + n.state := sl_txsop; -- next: send sop when others => null; -- other commas: silently ignore + -- especially: eop is ignored end case; else -- if normal data - n.state := s_idle; -- silently dropped + n.state := sl_idle; -- silently dropped end if; - elsif (r.itoena='1' and -- if ito enable, expired and XSEC - ito_end='1' and CE_INT='1') then - n.state := s_txito; -- next: send ito byte end if; end if; - - when s_txito => -- s_txito: send timeout symbol ------ - if has_attn = '1' then - ido := c_rlink_dat_attn; -- if attn pending: send attn symbol - n.andone := '1'; - else - ido := c_rlink_dat_idle; -- otherwise: send idle symbol - end if; + + when sl_txanot => -- sl_txanot: send attn notify ------- + n.cnt := r.attn; -- transfer attn to cnt for transmit + n.anact := '1'; -- signal attn notify active + ido := c_rlink_dat_attn; -- send attn symbol ival := '1'; if RL_HOLD = '0' then -- wait for accept - n.monattn := has_attn; -- signal on rl_moni - n.state := s_idle; -- next: wait for sop + n.monattn := '1'; -- signal on rl_moni + n.state := sl_txcntl; -- next: send cnt lsb end if; - when s_txsop => -- s_txsop: send sop ----------------- + when sl_txsop => -- sl_txsop: send sop ---------------- ido := c_rlink_dat_sop; -- send sop character ival := '1'; if RL_HOLD = '0' then -- wait for accept - n.state := s_rxcmd; -- next: read first command + if r.doretra = '1' then -- if retra request + irtreb := '1'; -- request first byte + n.state := sl_txrtbuf; -- next: send rtbuf + else -- or normal command + n.state := sl_rxcmd; -- next: read first command + end if; end if; - when s_txnak => -- s_txnak: send nak ----------------- + when sl_txnak => -- sl_txnak: send nak ---------------- + n.nakdone := '1'; -- set nakdone flag ido := c_rlink_dat_nak; -- send nak character ival := '1'; if RL_HOLD = '0' then -- wait for accept - n.nakeop := '0'; -- clear all 'do on nak' state flags - n.nakcerr := '0'; - n.nakderr := '0'; - if r.nakcerr = '1' then -- if setting cerr requested - n.cerr := '1'; -- do it + n.state := sl_txnakcode; -- next: send nakcode + end if; + + when sl_txnakcode => -- sl_txnakcode: send nakcode -------- + ido := '0' & "10" & (not r.nakcode) & r.nakcode; + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + n.state := sl_rxeop; -- next: wait for eop + end if; + + when sl_rxeop => -- sl_rxeop: wait for eop ------------ + ibusy := '0'; -- accept input + if RL_ENA = '1' then + if is_comma = '1' and comma_typ = c_eop then -- if eop seen + n.state := sl_txeop; -- next: echo eop end if; - if r.nakderr = '1' then -- if settung derr requested - n.derr := '1'; -- do it - end if; - if r.nakeop = '1' then -- if eop after nak requested - n.state := s_txeop; -- next: send eop - else - n.state := s_error; -- next: error state, wait for eop + end if; + + when sl_txrtbuf => -- sl_txrtbuf: send rtbuf ------------ + ido := '0' & RTBUF_DOB; -- send rtbuf data + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + bcnt_dec := '1'; + if bcnt_end = '0' then -- if not yet done + irtreb := '1'; -- request next byte + else -- all done + if r.nakdone = '0' then -- if no nak active + n.state := sl_txeop; -- next: send eop + else + n.state := sl_txnak; -- next: send nak + end if; end if; end if; - when s_txeop => -- s_txeop: send eop ----------------- + when sl_txeop => -- sl_txeop: send eop ---------------- ido := c_rlink_dat_eop; -- send eop character ival := '1'; if RL_HOLD = '0' then -- wait for accept n.moneop := '1'; -- signal on rl_moni - n.state := s_idle; -- next: idle state, wait for sop + n.state := sl_idle; -- next: idle state, wait for sop end if; - when s_error => -- s_error: wait for eop ------------- - ibusy := '0'; -- accept input + when sl_rxcmd => -- sl_rxcmd: wait for cmd ------------ + ibusy := '0'; -- accept input + n.cnt := slv(to_unsigned(1,16)); -- preset cnt=1 (used for rreg) + n.rcmd := idi8; -- latch cmd (follow till valid) if RL_ENA = '1' then if is_comma = '1' then -- if comma - case comma_typ is - when c_sop => -- if sop (unexpected) - n.state := s_txnak; -- next: send nak - when c_eop => -- if eop - n.state := s_txeop; -- next: echo eop - when c_nak => -- if nak - n.state := s_txnak; -- next: echo nak - when others => null; -- other commas: silently ignore - end case; - else -- if normal data - n.state := s_error; -- silently dropped - end if; - end if; - - when s_rxcmd => -- s_rxcmd: wait for cmd ------------- - ibusy := '0'; -- accept input - if RL_ENA = '1' then - if is_comma = '1' then -- if comma - case comma_typ is - when c_sop => -- if sop (unexpected) - n.state := s_txnak; -- next: send nak - when c_eop => -- if eop - n.state := s_txeop; -- next: echo eop - when c_nak => -- if nak - n.state := s_txnak; -- next: echo nak - when others => null; --other commas: silently ignore - end case; - else -- if not comma - icrcena := '1'; -- update input crc - n.rcmd := idi8; -- latch received command code - -- unless the command is stat - if RL_DI(c_rlink_cmd_rbf_code) /= c_rlink_cmd_stat then - n.nakcerr := '1'; -- set cerr on eop/nak abort + if comma_typ = c_eop then -- eop seen + n.state := sl_txeop; -- next: echo eop + else -- any other comma seen + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak end if; + else -- if not comma + if r.cmdseen = '0' then -- if first cmd + n.nakdone := '0'; -- clear nakdone flag + addra_clear := '1'; -- clear rtbuf + end if; + n.cmdseen := '1'; -- set cmd seen flag + icrcena := '1'; -- update input crc case RL_DI(c_rlink_cmd_rbf_code) is when c_rlink_cmd_rreg | c_rlink_cmd_rblk | c_rlink_cmd_wreg | c_rlink_cmd_wblk | c_rlink_cmd_init => -- for commands needing addr(data) - n.state := s_rxaddr; -- next: read address - when c_rlink_cmd_stat | - c_rlink_cmd_attn => -- stat and attn commands - n.state := s_rxccrc; -- next: read command crc + n.state := sl_rxaddrl; -- next: read address lsb + when c_rlink_cmd_labo | + c_rlink_cmd_attn => -- labo and attn commands + n.state := sl_rxccrcl; -- next: read command crc low when others => - n.state := s_txnak; -- next: send nak - end case; -- rcmd,ccmd always hold good cmd + n.nakcode := c_rlink_nakcode_cmd; -- signal bad cmd + n.state := sl_txnak; -- next: send nak + end case; end if; end if; - - when s_rxaddr => -- s_rxaddr: wait for addr ----------- + + when sl_rxaddrl => -- sl_rxaddrl: wait for addr lsb ----- ibusy := '0'; -- accept input + n.addr(f_byte0) := idi8; -- latch addr lsb (follow till valid) + if RL_ENA = '1' then + if is_comma = '1' then -- if comma + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak, + else + icrcena := '1'; -- update input crc + n.state := sl_rxaddrh; -- next: read addr msb + end if; + end if; + + when sl_rxaddrh => -- sl_rxaddrh: wait for addr msb ----- + ibusy := '0'; -- accept input + n.addr(f_byte1) := idi8; -- latch addr msb (follow till valid) if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else icrcena := '1'; -- update input crc - n.addr := idi8; -- latch read address case r.rcmd(c_rlink_cmd_rbf_code) is when c_rlink_cmd_rreg => -- for rreg command - n.state := s_rxccrc; -- next: read command crc + n.state := sl_rxccrcl; -- next: read command crc low when c_rlink_cmd_wreg | c_rlink_cmd_init => -- for wreg, init command - n.state := s_rxdatl; -- next: read data lsb + n.state := sl_rxdatl; -- next: read data lsb when others => -- for rblk or wblk - n.state := s_rxcnt; -- next: read count + n.state := sl_rxcntl; -- next: read count lsb end case; end if; end if; - when s_rxdatl => -- s_rxdatl: wait for data low ------- + when sl_rxdatl => -- sl_rxdatl: wait for data low ------ ibusy := '0'; -- accept input + n.din(f_byte0) := idi8; -- latch data lsb (follow till valid) if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else icrcena := '1'; -- update input crc - n.dil := idi8; -- latch data lsb part - n.state := s_rxdath; -- next: read data msb + n.state := sl_rxdath; -- next: read data msb end if; end if; - - when s_rxdath => -- s_rxdath: wait for data high ------ + + when sl_rxdath => -- sl_rxdath: wait for data high ----- ibusy := '0'; -- accept input + n.din(f_byte1) := idi8; -- latch data msb (follow till valid) if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else icrcena := '1'; -- update input crc - n.dih := idi8; -- latch data msb part - if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_wblk then -- if wblk - n.rbaval := '1'; -- prepare rbus cycle - n.state := s_wstart; -- next: start write reg - else -- otherwise - n.state := s_rxccrc; -- next: read command crc - end if; + n.state := sl_rxccrcl; -- next: read command crc low end if; - end if; - - when s_rxcnt => -- s_rxcnt: wait for count ----------- + end if; + + when sl_rxcntl => -- sl_rxcntl: wait for count lsb ----- ibusy := '0'; -- accept input + n.cnt(f_byte0) := idi8; -- latch count lsb (follow till valid) if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else icrcena := '1'; -- update input crc - n.cnt := idi8; -- latch count - n.state := s_rxccrc; -- next: read command crc + n.state := sl_rxcnth; -- next: read count msb end if; end if; + + when sl_rxcnth => -- sl_rxcnth: wait for count msb ----- + ibusy := '0'; -- accept input + n.cnt(f_byte1) := idi8; -- latch count lsb (follow till valid) + if RL_ENA = '1' then + if is_comma = '1' then -- if comma + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak + else + icrcena := '1'; -- update input crc + if unsigned(idi8(7 downto cntawidth-8)) = 0 then -- if cnt ok + n.state := sl_rxccrcl; -- next: read command crc low + else + n.nakcode := c_rlink_nakcode_cnt; -- signal bad cnt + n.state := sl_txnak; -- next: send nak + end if; + end if; + end if; - when s_rxccrc => -- s_rxccrc: wait for command crc ---- + when sl_rxccrcl => -- sl_rxccrcl: wait for command crc low ibusy := '0'; -- accept input if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else - if idi8 /= ICRC_OUT then -- if crc error - -- unless the command is stat - if r.rcmd(c_rlink_cmd_rbf_code) /= c_rlink_cmd_stat then - n.cerr := '1'; -- set command error flag - end if; - n.state := s_txnak; -- next: send nak + if idi8 /= ICRC_OUT(f_byte0) then -- if crc error (lsb) + n.nakcode := c_rlink_nakcode_ccrc; -- signal bad ccrc + n.state := sl_txnak; -- next: send nak else -- if crc ok - n.state := s_txcmd; -- next: echo command + n.state := sl_rxccrch; -- next: wait for command crc high end if; end if; end if; - when s_txcmd => -- s_txcmd: send cmd ----------------- + when sl_rxccrch => -- sl_rxccrcl: wait for command crc high + ibusy := '0'; -- accept input + if RL_ENA = '1' then + if is_comma = '1' then -- if comma + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak + else + if idi8 /= ICRC_OUT(f_byte1) then -- if crc error (msb) + n.nakcode := c_rlink_nakcode_ccrc; -- signal bad ccrc + n.state := sl_txnak; -- next: send nak + else -- if crc ok + n.state := sl_txcmd; -- next: echo command + end if; + end if; + end if; + + when sl_txcmd => -- sl_txcmd: send cmd ----------------- ido := '0' & r.rcmd; -- send read command ival := '1'; if RL_HOLD = '0' then -- wait for accept - ocrcena := '1'; -- update output crc - if r.rcmd(c_rlink_cmd_rbf_code) /= c_rlink_cmd_stat then --unless stat - n.ccmd := r.rcmd; -- latch current command in ccmd - n.stat := RB_STAT; -- latch external status bits - n.cerr := '0'; - n.derr := '0'; - n.rbnak := '0'; - n.rberr := '0'; - end if; - n.nakcerr := '0'; -- all command rx done up to here + irtwea := '1'; + ocrcena := '1'; -- update output crc + ibcmd := c_bcmd_stat; -- latch external status bits + ibgo := '1'; case r.rcmd(c_rlink_cmd_rbf_code) is -- main command dispatcher when c_rlink_cmd_rreg => -- rreg ---------------- - n.rbaval := '1'; -- prepare rbus cycle - n.state := s_rstart; -- next: start read reg + n.state := sl_rstart; -- next: start rreg when c_rlink_cmd_rblk => -- rblk ---------------- - n.state := s_txcnt; + n.babo := '0'; -- clear babo flag + n.state := sl_txcntl; when c_rlink_cmd_wreg => -- wreg ---------------- - n.rbaval := '1'; -- prepare rbus cycle - n.state := s_wstart; -- next: start write reg + ibcmd := c_bcmd_wblk; + ibgo := '1'; + n.state := sl_wwait0; -- next: wait for wdone when c_rlink_cmd_wblk => -- wblk ---------------- - n.nakderr := '1'; -- set derr on eop/nak abort - n.state := s_rxdatl; - when c_rlink_cmd_stat => -- stat ---------------- - n.state := s_txccmd; - when c_rlink_cmd_attn => -- attn ---------------- - n.state := s_attn; - - when c_rlink_cmd_init => -- init ---------------- - n.rbinit := '1'; -- send init pulse - if r.addr(7 downto 3) = "11111" then -- is internal init - if r.addr(2 downto 0) = "111" then -- is rri init - n.anena := r.dih(c_rlink_iint_rbf_anena - 8); - n.itoena := r.dih(c_rlink_iint_rbf_itoena - 8); - n.itoval := r.dil(ITOWIDTH-1 downto 0); - -- note: itocnt will load in next - -- cycle because ito_go=0, so no - -- action required here - - end if; - else -- is external init - n.rbwe := '1'; -- send init with we + n.babo := '0'; -- clear babo flag + if cnt_iszero = '0' then -- if cnt /= 0 + n.state := sl_wblk; -- next: read wblk data + else -- otherwise cnt = 0 + n.state := sl_rxdcrcl; -- next: wait for dcrc low end if; - n.state := s_txstat; + when c_rlink_cmd_labo => -- labo ---------------- + n.state := sl_txlabo; + when c_rlink_cmd_attn => -- attn ---------------- + n.state := sl_attn; + when c_rlink_cmd_init => -- init ---------------- + ibcmd := c_bcmd_init; + ibgo := '1'; + n.state := sl_txstat; when others => -- '111' --------------- - n.state := s_txnak; -- send NAK on reserved command + n.nakcode := c_rlink_nakcode_cmd; -- signal bad cmd + n.state := sl_txnak; -- send NAK on reserved command end case; end if; - - when s_txcnt => -- s_txcnt: send cnt ----------------- - ido := '0' & r.cnt; -- send cnt + + when sl_txcntl => -- sl_txcntl: send cnt lsb ------------ + ido := '0' & r.cnt(f_byte0); -- send cnt lsb ival := '1'; if RL_HOLD = '0' then -- wait for accept + irtwea := not r.anact; -- no rtbuf for attn notify ocrcena := '1'; -- update output crc - n.rbaval := '1'; -- prepare rbus cycle - n.state := s_rstart; -- next: start first read reg + n.state := sl_txcnth; -- next: send cnt msb end if; - when s_rstart => -- s_rstart: start reg or blk read --- - n.rbaval := '1'; -- start actual read cycle - n.rbre := '1'; - n.state := s_rreg; -- next: reg read - - when s_rreg => -- s_rreg: do reg or blk read -------- - -- this state handles all rbus reads - ato_go := '1'; -- activate timeout counter - if RB_SRES.err = '1' then -- latch rbus error flag - n.rberr := '1'; - end if; - n.doh := RB_SRES.dout(15 downto 8); -- latch data - n.dol := RB_SRES.dout( 7 downto 0); - n.stat := RB_STAT; -- latch external status bits - if RB_SRES.busy='0' or ato_end='1' then -- wait for non-busy or timeout - if RB_SRES.busy='1' and ato_end='1' then -- if timeout and still busy - n.rbnak := '1'; -- set rbus nak flag - elsif RB_SRES.ack = '0' then -- if non-busy and no ack - n.rbnak := '1'; -- set rbus nak flag - end if; - n.state := s_txdatl; -- next: send data lsb - else -- otherwise rbus read continues - n.rbaval := '1'; -- extend cycle - n.rbre := '1'; - end if; - - when s_txdatl => -- s_txdatl: send data low ----------- - ido := '0' & r.dol; -- send data + when sl_txcnth => -- sl_txcnth: send cnt msb ------------ + ido := '0' & r.cnt(f_byte1); -- send cnt msb ival := '1'; if RL_HOLD = '0' then -- wait for accept - ocrcena := '1'; -- update output crc - n.state := s_txdath; -- next: send data msb - end if; - - when s_txdath => -- s_txdath: send data high - ido := '0' & r.doh; -- send data - ival := '1'; - if RL_HOLD = '0' then -- wait for accept - ocrcena := '1'; -- update output crc - if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_rblk then -- if rblk - n.state := s_blk; -- next: block count handling - else -- otherwise - n.state := s_txstat; -- next: send stat + irtwea := not r.anact; -- no rtbuf for attn notify + ocrcena := '1'; -- update output crc + if r.anact = '1' then -- if in attn notify + n.state := sl_txcrcl; -- next: send crc low + elsif r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_rblk then -- if rblk + if cnt_iszero = '0' then -- if cnt /= 0 + n.state := sl_rstart; -- next: start rblk + else -- otherwise cnt = 0 + n.state := sl_txdcntl; -- next: send dcnt lsb + end if; + else -- otherwise, must be attn + n.state := sl_txstat; -- next: send stat end if; end if; - - when s_wstart => -- s_wstart: start reg or blk write -- - n.rbaval := '1'; -- start actual write cycle - n.rbwe := '1'; - n.state := s_wreg; -- next: reg write - - when s_wreg => -- s_wreg: do reg or blk write ------- - -- this state handles all rbus writes - ato_go := '1'; -- activate timeout counter - if RB_SRES.err = '1' then -- latch rbus error flag - n.rberr := '1'; - end if; - n.stat := RB_STAT; -- latch external status bits - if RB_SRES.busy='0' or ato_end='1' then -- wait for non-busy or timeout - if RB_SRES.busy='1' and ato_end='1' then -- if timeout and still busy - n.rbnak := '1'; -- set rbus nak flag - elsif RB_SRES.ack='0' then -- if non-busy and no ack - n.rbnak := '1'; -- set rbus nak flag - end if; - if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_wblk then -- if wblk - n.state := s_blk; -- next: block count handling - else -- otherwise - n.state := s_txstat; -- next: send stat - end if; - else -- otherwise rbus write continues - n.rbaval := '1'; -- extend cycle - n.rbwe := '1'; - end if; - - when s_blk => -- s_blk: block count handling ------- - n.cnt := slv(unsigned(r.cnt) - 1);-- decrement transfer count - if unsigned(r.cnt) = 0 then -- if last transfer - if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_rblk then -- if rblk - n.state := s_txstat; -- next: send stat - else -- otherwise - n.state := s_rxdcrc; -- next: read data crc - end if; - else -- otherwise more to transfer - if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_rblk then -- if rblk - n.rbaval := '1'; -- prepare rbus cycle - n.state := s_rstart; -- next: start read blk - else -- otherwise - n.state := s_rxdatl; -- next: read data + when sl_rstart => -- sl_rstart: start rreg or rblk ----- + ibcmd := c_bcmd_rblk; + ibgo := '1'; + bcnt_load := '1'; + bcnt_val := r.cnt(cnt_f_dat) & '0'; -- 2*cnt + n.state := sl_txdat; + + when sl_txdat => -- sl_txdat: send data --------------- + ido := '0' & DOFIFO_DO; + if DOFIFO_VAL = '1' then -- wait for input + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + idohold := '0'; + irtwea := '1'; + ocrcena := '1'; -- update output crc + bcnt_dec := '1'; + if bcnt_end = '1' then + if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_rblk then -- if rblk + n.state := sl_txdcntl; + else + n.state := sl_txstat; + end if; + end if; end if; end if; - when s_rxdcrc => -- s_rxdcrc: wait for data crc ------- + when sl_wblk => -- sl_wblk: setup rx wblk data ------- + addrb_load := '1'; -- must be done here because addra + addrb_sela := '1'; -- is incremented in _txcmd + bcnt_load := '1'; + bcnt_val := r.cnt(cnt_f_dat) & '0'; -- 2*cnt + n.state := sl_rxwblk; + + when sl_rxwblk => -- sl_rxwblk: wait for wblk data ----- ibusy := '0'; -- accept input if RL_ENA = '1' then if is_comma = '1' then -- if comma - do_comma_abort(n.state, n.nakeop, comma_typ); + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak else - if idi8 /= ICRC_OUT then -- if crc error - n.derr := '1'; -- set data error flag + icrcena := '1'; -- update input crc + irtweb := '1'; -- write into rtbuf via b port + bcnt_dec := '1'; + if bcnt_end = '1' then -- if all done + n.state := sl_rxdcrcl; -- next: wait for data crc low + end if; + end if; + end if; + + when sl_rxdcrcl => -- sl_rxdcrcl: wait for data crc low - + ibusy := '0'; -- accept input + bcnt_val := r.cnt(cnt_f_dat) & '0'; -- 2 * cnt + addrb_sela := '1'; + if RL_ENA = '1' then + if is_comma = '1' then -- if comma + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak + else + if idi8 /= ICRC_OUT(f_byte0) then -- if crc error lsb + n.nakcode := c_rlink_nakcode_dcrc; -- signal bad dcrc + n.state := sl_txnak; -- next: send nak + else -- if crc ok + n.state := sl_rxdcrch; -- next: wait for data crc high end if; - n.state := s_txstat; -- next: echo command end if; end if; - when s_attn => -- s_attn: handle attention flags ---- - n.dol := r.attn(7 downto 0); -- move attention flags to do buffer - n.doh := r.attn(15 downto 8); - n.attn := RB_LAM; -- LAM in current cycle send next time - n.andone := '0'; -- reenable attn nofification - n.state := s_txdatl; -- next: send data lsb - - when s_txccmd => -- s_txccmd: send last command - ido := '0' & r.ccmd; -- send last accepted command - ival := '1'; - if RL_HOLD = '0' then -- wait for accept - ocrcena := '1'; -- update output crc - n.state := s_txdatl; -- next: send last data lsb + when sl_rxdcrch => -- sl_rxdcrch: wait for data crc high + ibusy := '0'; -- accept input + bcnt_val := r.cnt(cnt_f_dat) & '0'; -- 2 * cnt + addrb_sela := '1'; + if RL_ENA = '1' then + if is_comma = '1' then -- if comma + n.nakcode := c_rlink_nakcode_frame; -- signal framing error + n.state := sl_txnak; -- next: send nak + else + if idi8 /= ICRC_OUT(f_byte1) then -- if crc error msb + n.nakcode := c_rlink_nakcode_dcrc; -- signal bad dcrc + n.state := sl_txnak; -- next: send nak + else -- if crc ok + addrb_load := '1'; + bcnt_load := '1'; + if r.rtaddrb_bad = '0' then -- if rtbuf ok + n.state := sl_wblk0; -- next: start wblk pipe + else -- else rtbuf ovfl + n.nakcode := c_rlink_nakcode_rtwblk; -- signal ovfl in wblk + n.state := sl_txnak; -- next: send nak + end if; + end if; + end if; end if; - when s_txstat => -- s_txstat: send status ------------- - ido := (others=>'0'); - ido(c_rlink_stat_rbf_stat) := r.stat; + when sl_wblk0 => -- sl_wblk0: start wblk pipe --------- + if cnt_iszero = '0' then -- if cnt /= 0 + irtreb := '1'; -- request next byte + n.state := sl_wblk1; -- next: start data lsb + else -- otherwise cnt = 0 + n.state := sl_txdcntl; -- next: send dcnt lsb + end if; + + when sl_wblk1 => -- sl_wblk1: start wblk data lsb ----- + n.dinl := RTBUF_DOB; -- latch data lsb + irtreb := '1'; -- request next byte + bcnt_dec := '1'; + n.state := sl_wblk2; -- next: start data msb + + when sl_wblk2 => -- sl_wblk2: start wblk data msb ----- + n.din := RTBUF_DOB & r.dinl; -- setup din + bcnt_dec := '1'; + ibcmd := c_bcmd_wblk; -- start rbus sequencer + ibgo := '1'; + if bcnt_end = '0' then -- if not yet done + irtreb := '1'; -- request next byte + n.state := sl_wblkl; -- next: enter wblk pipe + else -- all done + n.state := sl_wwait0; -- next: wait for wdone + end if; + + when sl_wblkl => -- sl_wblkl: pipe wblk data lsb ------ + n.dinl := RTBUF_DOB; -- latch data lsb + irtreb := '1'; -- request next byte + bcnt_dec := '1'; + n.state := sl_wblkh; -- next: pipe msb + + when sl_wblkh => -- sl_wblkh: pipe wblk data msb ------ + if B2L_WDONE = '1' then -- if last write done + n.din := RTBUF_DOB & r.dinl; -- setup next din + bcnt_dec := '1'; + if bcnt_end = '0' then -- if not yet done + irtreb := '1'; + n.state := sl_wblkl; -- next: pipe lsb + else -- all done + n.state := sl_wwait0; -- next: wait last wdone + end if; + end if; + + when sl_wwait0 => -- sl_wwait0: wait for wdone --------- + if B2L_WDONE = '1' then + if r.rcmd(c_rlink_cmd_rbf_code) = c_rlink_cmd_wblk then -- if wblk + n.state := sl_wwait1; -- next: wait for dcnt + else + n.state := sl_txstat; -- next: send stat + end if; + end if; + + when sl_wwait1 => -- sl_wwait1: wait for dcnt ---------- + n.state := sl_txdcntl; -- next: send dcnt lsb + + when sl_txdcntl => -- sl_txdcntl: send dcnt lsb --------- + n.babo := R_BREGS.rbnak or R_BREGS.rberr; -- remember blk abort + ido := '0' & R_BREGS.dcnt(f_byte0); -- send dcnt lsb + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + irtwea := '1'; + ocrcena := '1'; -- update output crc + n.state := sl_txdcnth; -- next: send dcnt msb + end if; + + when sl_txdcnth => -- sl_txdcnth: send dcnt msb --------- + ido := (others=>'0'); -- send dcnt msb + ido(cntawidth-9 downto 0) := R_BREGS.dcnt(cntawidth-1 downto 8); + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + irtwea := '1'; + ocrcena := '1'; -- update output crc + n.state := sl_txstat; -- next: send stat + end if; + + when sl_txlabo => -- sl_txlabo: send labo flag --------- + ido := '0' & "0000000" & r.babo; -- send babo + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + irtwea := '1'; + ocrcena := '1'; -- update output crc + n.state := sl_txstat; -- next: send stat + end if; + + when sl_attn => -- sl_attn: handle attention flags --- + n.cnt := r.attn; -- use cnt to latch attn status + n.attn := RB_LAM; -- LAM in current cycle send next time + n.arpend := '0'; -- reenable attn nofification + n.anreq := '0'; -- cancel pending notify requests + n.state := sl_txcntl; -- next: send cnt lsb (holding attn) + + when sl_txstat => -- sl_txstat: send status ------------ + ido(c_rlink_stat_rbf_stat) := R_BREGS.stat; ido(c_rlink_stat_rbf_attn) := has_attn; - ido(c_rlink_stat_rbf_cerr) := r.cerr; - ido(c_rlink_stat_rbf_derr) := r.derr; - ido(c_rlink_stat_rbf_rbnak) := r.rbnak; - ido(c_rlink_stat_rbf_rberr) := r.rberr; + ido(c_rlink_stat_rbf_rbnak) := R_BREGS.rbnak; + ido(c_rlink_stat_rbf_rberr) := R_BREGS.rberr; ival := '1'; if RL_HOLD ='0' then -- wait for accept + irtwea := '1'; ocrcena := '1'; -- update output crc - n.state := s_txcrc; -- next: send crc + n.state := sl_txcrcl; -- next: send crc low end if; - when s_txcrc => -- s_txcrc: send crc ----------------- - ido := "0" & OCRC_OUT; -- send crc code + when sl_txcrcl => -- sl_txcrcl: send crc low ----------- + ido := "0" & OCRC_OUT(f_byte0); -- send crc code low ival := '1'; if RL_HOLD = '0' then -- wait for accept - -- if dcrc seen in wblk - if r.rcmd(c_rlink_cmd_rbf_code)=c_rlink_cmd_wblk and r.derr='1' then - n.state := s_txnak; -- next: send nak - else -- otherwise - n.nakcerr := '0'; -- clear 'set on nak' requests - n.nakderr := '0'; - n.state := s_rxcmd; -- next: read command or eop - end if; + irtwea := not r.anact; -- no rtbuf for attn notify + n.state := sl_txcrch; -- next: send crc high end if; - + + when sl_txcrch => -- sl_txcrch: send crc high ---------- + ido := "0" & OCRC_OUT(f_byte1); -- send crc code high + -- here check for rtbuf overflow + -- if space for 1 byte complete command and write crc + if r.rtaddra_red = '0' then -- if space for 1 byte + n.lcmd := r.rcmd; -- latch current command in lcmd + ival := '1'; + if RL_HOLD = '0' then -- wait for accept + irtwea := not r.anact; -- no rtbuf for attn notify + -- if this was attn notify, back to idle + if r.anact = '1' then + n.state := sl_txeop; -- next: send eop + -- here handle labo: if labo cmd and babo set, eat rest of list + elsif r.rcmd(c_rlink_cmd_rbf_code)=c_rlink_cmd_labo and + r.babo='1' then + n.state := sl_rxeop; -- next: wait for eop + else + n.state := sl_rxcmd; -- next: read command or eop + end if; + end if; + else + n.nakcode := c_rlink_nakcode_rtovfl; -- signal rtbuf ovfl + n.state := sl_txnak; -- next: send nak + end if; + when others => null; -- <> -------------------------------- + end case; - if ato_go = '0' then -- handle access timeout counter - n.atocnt := atocnt_init; -- if ato_go=0, keep in reset + -- addra logic (write pointer) + if addra_clear = '1' then -- clear + n.rtaddra := (others=>'0'); + n.rtaddra_red := '0'; + n.rtaddra_bad := '0'; else - n.atocnt := slv(unsigned(r.atocnt) - 1);-- otherwise count down - end if; - - if ito_go = '0' then -- handle idle timeout counter - n.itocnt := r.itoval; -- if ito_go=0, keep at start value - else - if CE_INT = '1' then - n.itocnt := slv(unsigned(r.itocnt) - 1);-- otherwise cnt dn every CE_INT + if irtwea = '1' then -- inc when write on port a + if r.rtaddra_red = '1' then -- if already red + n. rtaddra_bad := '1'; -- than flag bad + else -- still ok + n.rtaddra := slv(unsigned(r.rtaddra) + 1); -- inc + if r.rtaddra = rtaddr_tred then -- if inc'ed to red + n. rtaddra_red := '1'; -- flag red + end if; + end if; end if; end if; - - N_REGS <= n; - RL_BUSY <= ibusy; - RL_DO <= ido; - RL_VAL <= ival; + -- addrb logic (write and read pointer) + if addrb_load = '1' then -- load + if addrb_sela = '1' then + n.rtaddrb := r.rtaddra; + n.rtaddrb_red := r.rtaddra_red; + n.rtaddrb_bad := r.rtaddra_bad; + else + n.rtaddrb := (others=>'0'); + n.rtaddrb_red := '0'; + n.rtaddrb_bad := '0'; + end if; + else + if irtreb = '1' or irtweb = '1' then -- inc when read/write on port b + if r.rtaddrb_red = '1' then -- if already red + n. rtaddrb_bad := '1'; -- than flag bad + else -- still ok + n.rtaddrb := slv(unsigned(r.rtaddrb) + 1); -- inc + if r.rtaddrb = rtaddr_tred then -- if inc'ed to red + n. rtaddrb_red := '1'; -- flag red + end if; + end if; + end if; + end if; + + -- bcnt logic + if bcnt_load = '1' then + n.bcnt := bcnt_val; + else + if bcnt_dec ='1' then + n.bcnt := slv(unsigned(r.bcnt) - 1); + end if; + end if; + + N_LREGS <= n; + + RL_BUSY_L <= ibusy; + RL_DO_L <= ido; + RL_VAL_L <= ival; RL_MONI.eop <= r.moneop; RL_MONI.attn <= r.monattn; - RL_MONI.lamp <= r.monlamp; - - RB_MREQ <= rb_mreq_init; - RB_MREQ.aval <= r.rbaval; - RB_MREQ.re <= r.rbre; - RB_MREQ.we <= r.rbwe; - RB_MREQ.init <= r.rbinit; - RB_MREQ.addr <= r.addr; - RB_MREQ.din <= r.dih & r.dil; + RL_MONI.lamp <= r.arpend; + DOFIFO_HOLD <= idohold; + + RTBUF_WEA <= irtwea; + RTBUF_DIA <= ido(d_f_data); + RTBUF_ENB <= irtreb or irtweb; + RTBUF_WEB <= irtweb; + RTBUF_DIB <= idi8; + CRC_RESET <= crcreset; ICRC_ENA <= icrcena; OCRC_ENA <= ocrcena; - OCRC_IN <= ido(7 downto 0); + OCRC_IN <= ido(d_f_data); - end process proc_next; + L2B_CMD <= ibcmd; + L2B_GO <= ibgo; + + end process proc_lnext; + + -- bus FSM ================================================================= + + proc_bnext: process (R_BREGS, R_LREGS, + RB_STAT, RB_SRES_TOT, + DOFIFO_SIZE, + L2B_CMD, L2B_GO) + + variable r : bregs_type := bregs_init; + variable n : bregs_type := bregs_init; + + variable bto_go : slbit := '0'; + variable bto_end : slbit := '0'; + variable cnt_load : slbit := '0'; + variable cnt_dec : slbit := '0'; + variable cnt_end : slbit := '0'; + variable dcnt_clear : slbit := '0'; + variable dcnt_inc : slbit := '0'; + variable ival : slbit := '0'; + variable ido : slv8 := (others=>'0'); + variable iwdone : slbit := '0'; + + begin + + r := R_BREGS; + n := R_BREGS; + + bto_go := '0'; -- default: keep rbus timeout in reset + bto_end := '0'; + if unsigned(r.btocnt) = 0 then -- if rbus timeout count at zero + bto_end := '1'; -- signal expiration + end if; + + cnt_load := '0'; + cnt_dec := '0'; + cnt_end := '0'; + if unsigned(r.cnt) = 0 then + cnt_end := '1'; + end if; + + dcnt_clear := '0'; + dcnt_inc := '0'; + + ival := '0'; + ido := (others=>'0'); + + iwdone := '0'; + + -- FIXME: what is proper almost full limit ? + if unsigned(DOFIFO_SIZE) >= 28 then -- almost full + n.wfifo := '1'; + elsif unsigned(DOFIFO_SIZE) <= 2 then -- almost empty + n.wfifo := '0'; + end if; + + n.rbinit := '0'; -- clear rb(init|aval|re|we) by default + n.rbaval := '0'; -- they must always be set by the + n.rbre := '0'; -- 'previous state' + n.rbwe := '0'; -- + + case r.state is + + when sb_idle => -- sb_idle: wait for cmd ------------ + if L2B_GO = '1' then -- if cmd seen + n.stat := RB_STAT; -- always latch external status bits + n.rbnak := '0'; + n.rberr := '0'; + n.blkabo := '0'; + n.dathpend := '0'; + dcnt_clear := '1'; + cnt_load := '1'; + case L2B_CMD is + when c_bcmd_stat => -- stat --------------------- + null; -- nothing else todo + when c_bcmd_init => -- init --------------------- + n.rbinit := '1'; -- send init pulse + when c_bcmd_rblk => -- rblk --------------------- + n.rbaval := '1'; -- start aval chunk + n.state := sb_rstart; -- next: start rblk + when c_bcmd_wblk => -- wblk --------------------- + n.rbaval := '1'; -- start aval chunk + n.state := sb_wstart; -- next: start wblk + when others => null; + end case; + end if; + + when sb_rstart => -- sb_rstart: start rblk ------------- + n.rbaval := '1'; -- extend aval + n.rbre := '1'; -- start read cycle + n.state := sb_rreg0; -- next: do rreg + + when sb_rreg0 => -- sb_rreg0: rbus read cycle --------- + ido := r.rbdout(f_byte1); + n.stat := RB_STAT; -- follow external status bits + if r.dathpend = '1' then -- if pending data msb + ival := '1'; + n.dathpend := '0'; + end if; + n.rbaval := '1'; -- extend aval + bto_go := '1'; -- activate rbus timeout counter + if RB_SRES_TOT.err = '1' then -- latch rbus error flag + n.rberr := '1'; + n.blkabo := '1'; + end if; + n.rbdout := RB_SRES_TOT.dout; -- latch data (follow till valid) + if RB_SRES_TOT.busy='0' or bto_end='1' then -- wait non-busy or timeout + if RB_SRES_TOT.busy='1' and bto_end='1' then -- if timeout and busy + n.rbnak := '1'; -- set rbus nak flag + n.blkabo := '1'; + elsif RB_SRES_TOT.ack = '0' then -- if non-busy and no ack + n.rbnak := '1'; -- set rbus nak flag + n.blkabo := '1'; + end if; + cnt_dec := '1'; + n.state := sb_rreg1; -- next: send data lsb + else -- otherwise rbus read continues + n.rbre := '1'; -- extend read cycle + end if; + + when sb_rreg1 => -- sb_rreg1: send read data ---------- + ido := r.rbdout(f_byte0); + ival := '1'; -- send lsb + n.dathpend := '1'; -- signal mdb pending + dcnt_inc := not r.blkabo; -- inc dcnt if no error + if cnt_end = '0' then -- if not yet done + if r.blkabo = '0' then -- if no errors + if r.wfifo = '0' then -- if fifo fine + n.rbaval := '1'; -- extend aval + n.rbre := '1'; -- start read cycle + n.state := sb_rreg0; -- next: do rreg + else -- fifo is full + n.state := sb_rwait; -- next: fifo wait + end if; + else -- errors seen, rblk abort + n.state := sb_rabo1; -- next: send rblk abort msb data + end if; + else -- all done + n.state := sb_rend; + end if; + + when sb_rwait => -- sb_rwait: wait for fifo ----------- + if r.wfifo = '0' then -- if fifo fine + n.rbaval := '1'; -- start aval chunk + n.state := sb_rstart; -- restart rblk + end if; + + when sb_rend => -- sb_rend: send last read data ------ + ido := r.rbdout(f_byte1); + ival := '1'; -- send msb + n.dathpend := '0'; + n.state := sb_idle; -- next: idle + + when sb_rabo0 => -- sb_rabo0: rblk abort, lsb data ---- + ido := (others=>'0'); + ival := '1'; + cnt_dec := '1'; + n.state := sb_rabo1; -- next: send rblk abort, msb data + + when sb_rabo1 => -- sb_rabo1: rblk abort, msb data ---- + ido := (others=>'0'); + if r.wfifo = '0' then + n.dathpend := '0'; -- cancel msb pend + ival := '1'; + if cnt_end = '0' then -- if not yet done + n.state := sb_rabo0; -- next: send rblk abort, lsb data + else -- all done + n.state := sb_idle; -- next: idle + end if; + end if; + + when sb_wstart => -- sb_wstart: start wblk + n.rbaval := '1'; -- start aval chunk + n.rbwe := '1'; -- start write cycle + n.state := sb_wreg0; + + when sb_wreg0 => -- sb_wreg0: rbus write cycle + n.stat := RB_STAT; -- follow external status bits + n.rbaval := '1'; -- extend aval + bto_go := '1'; -- activate rbus timeout counter + if RB_SRES_TOT.err = '1' then -- latch rbus error flag + n.rberr := '1'; + n.blkabo := '1'; + end if; + if RB_SRES_TOT.busy='0' or bto_end='1' then -- wait non-busy or timeout + if RB_SRES_TOT.busy='1' and bto_end='1' then -- if timeout and busy + n.rbnak := '1'; -- set rbus nak flag + n.blkabo := '1'; + elsif RB_SRES_TOT.ack='0' then -- if non-busy and no ack + n.rbnak := '1'; -- set rbus nak flag + n.blkabo := '1'; + end if; + cnt_dec := '1'; + iwdone := '1'; + n.state := sb_wreg1; + else -- otherwise rbus write continues + n.rbwe := '1'; -- extend write cycle + end if; + + when sb_wreg1 => -- sb_wreg1: wait write data + dcnt_inc := not r.blkabo; -- inc dcnt if no error + if cnt_end = '0' then -- if not yet done + if r.blkabo = '0' then -- if no errors + n.rbaval := '1'; -- extend aval + n.rbwe := '1'; -- start write cycle + n.state := sb_wreg0; + else -- errors seen, rblk abort + n.state := sb_wabo0; -- next: drop wblk rest + end if; + else -- all done + n.state := sb_idle; -- next: idle + end if; + + when sb_wabo0 => -- sb_wabo0: wblk abort, drop data -- + iwdone := '1'; -- drop data + cnt_dec := '1'; + n.state := sb_wabo1; -- next: wblk abort, wair + + when sb_wabo1 => -- sb_wabo1: wblk abort, wait -------- + if cnt_end = '0' then -- if not yet done + n.state := sb_wabo0; -- next: wblk abort, drop + else -- all done + n.state := sb_idle; -- next: idle + end if; + + when others => null; -- <> -------------------------------- + + end case; + + if bto_go = '0' then -- handle access timeout counter + n.btocnt := btocnt_init; -- if bto_go=0, keep in reset + else + n.btocnt := slv(unsigned(r.btocnt) - 1);-- otherwise count down + end if; + + if cnt_load = '1' then + n.cnt := R_LREGS.cnt(cnt_f_dat); + else + if cnt_dec ='1' then + n.cnt := slv(unsigned(r.cnt) - 1); + end if; + end if; + + if dcnt_clear = '1' then + n.dcnt := (others=>'0'); + else + if dcnt_inc ='1' then + n.dcnt := slv(unsigned(r.dcnt) + 1); + end if; + end if; + + N_BREGS <= n; + + DOFIFO_DI <= ido; + DOFIFO_ENA <= ival; + + B2L_WDONE <= iwdone; + + end process proc_bnext; + + -- config rbus iface ======================================================= + + proc_cnext: process (R_CREGS, R_LREGS, RBSEL, RB_MREQ_L) + + variable r : cregs_type := cregs_init; + variable n : cregs_type := cregs_init; + variable irb_ack : slbit := '0'; + variable irb_dout : slv16 := (others=>'0'); + + begin + + r := R_CREGS; + n := R_CREGS; + + irb_ack := '0'; + irb_dout := (others=>'0'); + + -- rbus transactions + if RBSEL = '1' then + irb_ack := RB_MREQ_L.re or RB_MREQ_L.we; + + -- config register writes + if RB_MREQ_L.we = '1' then + case RB_MREQ_L.addr(1 downto 0) is + when rbaddr_cntl => + n.anena := RB_MREQ_L.din(cntl_rbf_anena); + n.atoena := RB_MREQ_L.din(cntl_rbf_atoena); + n.atoval := RB_MREQ_L.din(cntl_rbf_atoval); + when others => null; + end case; + end if; + + -- rbus output driver + case RB_MREQ_L.addr(1 downto 0) is + when rbaddr_cntl => + irb_dout(cntl_rbf_anena) := r.anena; + irb_dout(cntl_rbf_atoena) := r.atoena; + irb_dout(cntl_rbf_atoval) := r.atoval; + when rbaddr_stat => + irb_dout(stat_rbf_lcmd) := R_LREGS.lcmd; + irb_dout(stat_rbf_babo) := R_LREGS.babo; + irb_dout(stat_rbf_arpend) := R_LREGS.arpend; + irb_dout(stat_rbf_rbsize) := slv(to_unsigned(RTAWIDTH-10,3)); + when rbaddr_id0 => + irb_dout := SYSID(15 downto 0); + when rbaddr_id1 => + irb_dout := SYSID(31 downto 16); + when others => null; + end case; + + end if; + + N_CREGS <= n; + + RB_SRES_CONF.dout <= irb_dout; + RB_SRES_CONF.ack <= irb_ack; + RB_SRES_CONF.err <= '0'; + RB_SRES_CONF.busy <= '0'; + + end process proc_cnext; + + -- rbus driver ----------------------------------------------------- + + proc_mreq: process (R_LREGS, R_BREGS) + begin + + RB_MREQ_L <= rb_mreq_init; + RB_MREQ_L.aval <= R_BREGS.rbaval; + RB_MREQ_L.re <= R_BREGS.rbre; + RB_MREQ_L.we <= R_BREGS.rbwe; + RB_MREQ_L.init <= R_BREGS.rbinit; + RB_MREQ_L.addr <= R_LREGS.addr; + RB_MREQ_L.din <= R_LREGS.din; + + end process proc_mreq; + + RB_MREQ <= RB_MREQ_L; + + RL_BUSY <= RL_BUSY_L; + RL_DO <= RL_DO_L; + RL_VAL <= RL_VAL_L; + +-- synthesis translate_off + + RLMON: if ENAPIN_RLMON >= 0 generate + MON : rlink_mon_sb + generic map ( + DWIDTH => RL_DI'length, + ENAPIN => ENAPIN_RLMON) + port map ( + CLK => CLK, + RL_DI => RL_DI, + RL_ENA => RL_ENA, + RL_BUSY => RL_BUSY_L, + RL_DO => RL_DO_L, + RL_VAL => RL_VAL_L, + RL_HOLD => RL_HOLD + ); + end generate RLMON; + + RBMON: if ENAPIN_RBMON >= 0 generate + MON : rb_mon_sb + generic map ( + DBASE => 8, + ENAPIN => ENAPIN_RBMON) + port map ( + CLK => CLK, + RB_MREQ => RB_MREQ_L, + RB_SRES => RB_SRES_TOT, + RB_LAM => RB_LAM, + RB_STAT => RB_STAT + ); + end generate RBMON; + +-- synthesis translate_on end syn; diff --git a/rtl/vlib/rlink/rlink_core8.vbom b/rtl/vlib/rlink/rlink_core8.vbom index 42654dba..dd26930c 100644 --- a/rtl/vlib/rlink/rlink_core8.vbom +++ b/rtl/vlib/rlink/rlink_core8.vbom @@ -8,6 +8,5 @@ rlink_core.vbom ../comlib/byte2cdata.vbom ../comlib/cdata2byte.vbom [ghdl,isim]rlink_mon_sb.vbom -[ghdl,isim]../rbus/rb_mon_sb.vbom # design rlink_core8.vhd diff --git a/rtl/vlib/rlink/rlink_core8.vhd b/rtl/vlib/rlink/rlink_core8.vhd index b0b79378..4d1aa57b 100644 --- a/rtl/vlib/rlink/rlink_core8.vhd +++ b/rtl/vlib/rlink/rlink_core8.vhd @@ -1,6 +1,6 @@ --- $Id: rlink_core8.vhd 440 2011-12-18 20:08:09Z mueller $ +-- $Id: rlink_core8.vhd 612 2014-12-20 08:12:06Z mueller $ -- --- Copyright 2011- by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,20 +18,21 @@ -- Dependencies: rlink_core -- comlib/byte2cdata -- comlib/cdata2byte --- rlink_mon_sb [sim only] --- rbus/rb_mon_sb [sim only] +-- rlink_mon_sb [sim only, for 8bit level] -- -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.1; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri +-- 2014-12-05 596 14.7 131013 xc6slx16-2 352 492 24 176 s 7.0 ver 4.0 -- 2011-12-09 437 13.1 O40d xc3s1000-4 184 403 0 244 s 9.1 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-12 596 4.0 now rlink v4 iface, 4 bit STAT -- 2011-12-09 437 1.0 Initial version ------------------------------------------------------------------------------ @@ -46,14 +47,15 @@ use work.rlinklib.all; entity rlink_core8 is -- rlink core with 8bit interface generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon); -- SB_CNTL for rbmon (-1=none) + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1); -- SB_CNTL for rbmon (-1=none) port ( CLK : in slbit; -- clock - CE_INT : in slbit := '0'; -- rlink ito time unit clock enable + CE_INT : in slbit := '0'; -- rlink ato time unit clock enable RESET : in slbit; -- reset RLB_DI : in slv8; -- rlink 8b: data in RLB_ENA : in slbit; -- rlink 8b: data enable @@ -65,7 +67,7 @@ entity rlink_core8 is -- rlink core with 8bit interface RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end entity rlink_core8; @@ -78,14 +80,19 @@ architecture syn of rlink_core8 is signal RL_DO : slv9 := (others=>'0'); signal RL_VAL : slbit := '0'; signal RL_HOLD : slbit := '0'; - signal RB_MREQ_L : rb_mreq_type := rb_mreq_init; -- local, readable RB_MREQ + signal RLB_BUSY_L : slbit := '0'; + signal RLB_DO_L : slv8 := (others=>'0'); + signal RLB_VAL_L : slbit := '0'; begin RL : rlink_core generic map ( - ATOWIDTH => ATOWIDTH, - ITOWIDTH => ITOWIDTH) + BTOWIDTH => BTOWIDTH, + RTAWIDTH => RTAWIDTH, + SYSID => SYSID, + ENAPIN_RLMON => ENAPIN_RLMON, + ENAPIN_RBMON => ENAPIN_RBMON) port map ( CLK => CLK, CE_INT => CE_INT, @@ -97,25 +104,21 @@ begin RL_VAL => RL_VAL, RL_HOLD => RL_HOLD, RL_MONI => RL_MONI, - RB_MREQ => RB_MREQ_L, + RB_MREQ => RB_MREQ, RB_SRES => RB_SRES, RB_LAM => RB_LAM, RB_STAT => RB_STAT ); - RB_MREQ <= RB_MREQ_L; - -- RLB -> RL converter (DI handling) ------------- B2CD : byte2cdata -- byte stream -> 9bit comma,data - generic map ( - CPREF => CPREF, - NCOMM => c_rlink_ncomm) port map ( CLK => CLK, RESET => RESET, DI => RLB_DI, ENA => RLB_ENA, - BUSY => RLB_BUSY, + ERR => '0', + BUSY => RLB_BUSY_L, DO => RL_DI, VAL => RL_ENA, HOLD => RL_BUSY @@ -123,52 +126,41 @@ begin -- RL -> RLB converter (DO handling) ------------- CD2B : cdata2byte -- 9bit comma,data -> byte stream - generic map ( - CPREF => CPREF, - NCOMM => c_rlink_ncomm) port map ( - CLK => CLK, - RESET => RESET, - DI => RL_DO, - ENA => RL_VAL, - BUSY => RL_HOLD, - DO => RLB_DO, - VAL => RLB_VAL, - HOLD => RLB_HOLD + CLK => CLK, + RESET => RESET, + ESCXON => '0', + ESCFILL => '0', + DI => RL_DO, + ENA => RL_VAL, + BUSY => RL_HOLD, + DO => RLB_DO_L, + VAL => RLB_VAL_L, + HOLD => RLB_HOLD ); + + RLB_BUSY <= RLB_BUSY_L; + RLB_DO <= RLB_DO_L; + RLB_VAL <= RLB_VAL_L; -- synthesis translate_off - RLMON: if ENAPIN_RLMON >= 0 generate + RLBMON: if ENAPIN_RLBMON >= 0 generate MON : rlink_mon_sb generic map ( - DWIDTH => RL_DI'length, - ENAPIN => ENAPIN_RLMON) + DWIDTH => RLB_DI'length, + ENAPIN => ENAPIN_RLBMON) port map ( CLK => CLK, - RL_DI => RL_DI, - RL_ENA => RL_ENA, - RL_BUSY => RL_BUSY, - RL_DO => RL_DO, - RL_VAL => RL_VAL, - RL_HOLD => RL_HOLD + RL_DI => RLB_DI, + RL_ENA => RLB_ENA, + RL_BUSY => RLB_BUSY_L, + RL_DO => RLB_DO_L, + RL_VAL => RLB_VAL_L, + RL_HOLD => RLB_HOLD ); - end generate RLMON; + end generate RLBMON; - RBMON: if ENAPIN_RBMON >= 0 generate - MON : rb_mon_sb - generic map ( - DBASE => 8, - ENAPIN => ENAPIN_RBMON) - port map ( - CLK => CLK, - RB_MREQ => RB_MREQ_L, - RB_SRES => RB_SRES, - RB_LAM => RB_LAM, - RB_STAT => RB_STAT - ); - end generate RBMON; - -- synthesis translate_on end syn; diff --git a/rtl/vlib/rlink/rlink_mon.vbom b/rtl/vlib/rlink/rlink_mon.vbom index 5d7c87c2..0aaada22 100644 --- a/rtl/vlib/rlink/rlink_mon.vbom +++ b/rtl/vlib/rlink/rlink_mon.vbom @@ -1,6 +1,7 @@ # libs ../slvtypes.vhd ../simlib/simlib.vhd +../comlib/comlib.vhd rlinklib.vbom # components # design diff --git a/rtl/vlib/rlink/rlink_mon.vhd b/rtl/vlib/rlink/rlink_mon.vhd index 6d435973..9ff060f9 100644 --- a/rtl/vlib/rlink/rlink_mon.vhd +++ b/rtl/vlib/rlink/rlink_mon.vhd @@ -1,6 +1,6 @@ --- $Id: rlink_mon.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: rlink_mon.vhd 609 2014-12-07 19:35:25Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -17,10 +17,13 @@ -- -- Dependencies: - -- Test bench: - --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-17.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-11-08 602 4.0.2 annotate clobber commas +-- 2014-10-25 599 4.0.1 use writeoptint() +-- 2014-10-12 596 4.0 adopt to new escaping, better 8 bit output -- 2011-12-23 444 3.1 CLK_CYCLE now integer -- 2011-11-19 427 3.0.2 now numeric_std clean -- 2010-12-24 347 3.0.1 rename: CP_*->RL->* @@ -40,6 +43,7 @@ use std.textio.all; use work.slvtypes.all; use work.simlib.all; use work.rlinklib.all; +use work.comlib.all; entity rlink_mon is -- rlink monitor generic ( @@ -69,16 +73,26 @@ begin variable oline : line; variable nbusy : integer := 0; variable nhold : integer := 0; - + variable edatarx : boolean := false; + variable edatatx : boolean := false; + procedure write_val(L: inout line; data: in slv(DWIDTH-1 downto 0); nwait: in integer; - txt1: in string; - txt2: in string) is + txt1: in string(1 to 2); + txt2: in string; + edata: in boolean) is variable data9 : slv9 := (others=>'0'); + variable optxt : string(1 to 8) := ": ??rx "; begin - writetimestamp(L, CLK_CYCLE, txt1); + if DWIDTH = 9 then + optxt(3 to 4) := "rl"; + else + optxt(3 to 4) := "r8"; + end if; + optxt(5 to 6) := txt1; + writetimestamp(L, CLK_CYCLE, optxt); if DWIDTH = 9 then write(L, data(data'left), right, 1); @@ -87,10 +101,7 @@ begin end if; write(L, data(7 downto 0), right, 9); - if nwait > 0 then - write(L, txt2); - write(L, nwait); - end if; + writeoptint(L, txt2, nwait); if DWIDTH=9 and data(data'left)='1' then -- a copy to data9 needed to allow following case construct @@ -99,15 +110,47 @@ begin data9(data'range) := data; write(L, string'(" comma")); case data9 is - when c_rlink_dat_idle => write(L, string'(" idle")); when c_rlink_dat_sop => write(L, string'(" sop")); when c_rlink_dat_eop => write(L, string'(" eop")); when c_rlink_dat_nak => write(L, string'(" nak")); when c_rlink_dat_attn => write(L, string'(" attn")); - when others => null; + when others => write(L, string'(" clobber|oob")); end case; end if; + if DWIDTH = 8 then + + if edata then + write(L, string'(" edata")); + if data(c_cdata_edf_pref) /= c_cdata_ed_pref or + (not data(c_cdata_edf_eci)) /= data(c_cdata_edf_ec) then + write(L, string'(" FAIL: bad format")); + else + write(L, string'(" ec=")); + write(L, data(c_cdata_edf_ec)); + data9 := (others=>'0'); + data9(8) := '1'; + data9(c_cdata_edf_ec) := data(c_cdata_edf_ec); + case data9 is + when c_rlink_dat_sop => write(L, string'(" (sop)")); + when c_rlink_dat_eop => write(L, string'(" (eop)")); + when c_rlink_dat_nak => write(L, string'(" (nak)")); + when c_rlink_dat_attn => write(L, string'(" (attn)")); + when "100000" & c_cdata_ec_xon => write(L, string'(" (xon)")); + when "100000" & c_cdata_ec_xoff => write(L, string'(" (xoff)")); + when "100000" & c_cdata_ec_fill => write(L, string'(" (fill)")); + when "100000" & c_cdata_ec_esc => write(L, string'(" (esc)")); + when others => + write(L, string'(" FAIL: bad ec")); + end case; + end if; + end if; + + if data = c_cdata_escape then + write(L, string'(" escape")); + end if; + end if; + writeline(output, L); end procedure write_val; @@ -125,8 +168,9 @@ begin if RL_BUSY = '1' then nbusy := nbusy + 1; else - write_val(oline, RL_DI, nbusy, ": rlrx ", " nbusy="); - nbusy := 0; + write_val(oline, RL_DI, nbusy, "rx", " nbusy=", edatarx); + edatarx := RL_DI=c_cdata_escape; + nbusy := 0; end if; else nbusy := 0; @@ -136,8 +180,9 @@ begin if RL_HOLD = '1' then nhold := nhold + 1; else - write_val(oline, RL_DO, nhold, ": rltx ", " nhold="); - nhold := 0; + write_val(oline, RL_DO, nhold, "tx", " nhold=", edatatx); + edatatx := RL_DO=c_cdata_escape; + nhold := 0; end if; else nhold := 0; diff --git a/rtl/vlib/rlink/rlink_sp1c.vhd b/rtl/vlib/rlink/rlink_sp1c.vhd index 2570f353..3973fb71 100644 --- a/rtl/vlib/rlink/rlink_sp1c.vhd +++ b/rtl/vlib/rlink/rlink_sp1c.vhd @@ -1,6 +1,6 @@ --- $Id: rlink_sp1c.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: rlink_sp1c.vhd 610 2014-12-09 22:44:43Z mueller $ -- --- Copyright 2011- by Walter F.J. Mueller +-- Copyright 2011-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -21,7 +21,7 @@ -- Test bench: - -- -- Target Devices: generic --- Tool versions: xst 13.1; ghdl 0.29 +-- Tool versions: xst 13.1-14.7; ghdl 0.29-0.31 -- -- Synthesized (xst): -- Date Rev ise Target flop lutl lutm slic t peri ifa ofa @@ -29,6 +29,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 4.0 use rlink v4 iface, 4 bit STAT -- 2011-12-09 437 1.0 Initial version ------------------------------------------------------------------------------ @@ -43,20 +44,21 @@ use work.serportlib.all; entity rlink_sp1c is -- rlink_core8+serport_1clock combo generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id IFAWIDTH : natural := 5; -- input fifo address width (0=none) OFAWIDTH : natural := 5; -- output fifo address width (0=none) - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon; -- SB_CNTL for rbmon (-1=none) + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1; -- SB_CNTL for rbmon (-1=none) CDWIDTH : positive := 13; -- clk divider width CDINIT : natural := 15); -- clk divider initial/reset setting port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- 1 usec clock enable CE_MSEC : in slbit; -- 1 msec clock enable - CE_INT : in slbit := '0'; -- rri ito time unit clock enable + CE_INT : in slbit := '0'; -- rri ato time unit clock enable RESET : in slbit; -- reset ENAXON : in slbit; -- enable xon/xoff handling ENAESC : in slbit; -- enable xon/xoff escaping @@ -67,7 +69,7 @@ entity rlink_sp1c is -- rlink_core8+serport_1clock combo RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags RL_MONI : out rl_moni_type; -- rlink_core: monitor port SER_MONI : out serport_moni_type -- serport: monitor port ); @@ -87,10 +89,11 @@ begin CORE : rlink_core8 generic map ( - ATOWIDTH => ATOWIDTH, - ITOWIDTH => ITOWIDTH, - CPREF => CPREF, + BTOWIDTH => BTOWIDTH, + RTAWIDTH => RTAWIDTH, + SYSID => SYSID, ENAPIN_RLMON => ENAPIN_RLMON, + ENAPIN_RLBMON=> ENAPIN_RLBMON, ENAPIN_RBMON => ENAPIN_RBMON) port map ( CLK => CLK, diff --git a/rtl/vlib/rlink/rlinklib.vhd b/rtl/vlib/rlink/rlinklib.vhd index f4bf2a6f..694b9781 100644 --- a/rtl/vlib/rlink/rlinklib.vhd +++ b/rtl/vlib/rlink/rlinklib.vhd @@ -1,6 +1,6 @@ --- $Id: rlinklib.vhd 509 2013-04-21 20:46:20Z mueller $ +-- $Id: rlinklib.vhd 610 2014-12-09 22:44:43Z mueller $ -- --- Copyright 2007-2013 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,10 +16,12 @@ -- Description: Definitions for rlink interface and bus entities -- -- Dependencies: - --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.3; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-12 596 4.0 now rlink v4.0 iface, 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2013-04-21 509 3.3.2 add rlb_moni record definition -- 2012-12-29 466 3.3.1 add rlink_rlbmux -- 2011-12-23 444 3.3 CLK_CYCLE now integer @@ -61,37 +63,36 @@ use work.serportlib.all; package rlinklib is -constant c_rlink_cpref : slv4 := "1000"; -- default comma prefix -constant c_rlink_ncomm : positive := 4; -- number commas (sop,eop,nak,attn) - -constant c_rlink_dat_idle : slv9 := "100000000"; -constant c_rlink_dat_sop : slv9 := "100000001"; -constant c_rlink_dat_eop : slv9 := "100000010"; -constant c_rlink_dat_nak : slv9 := "100000011"; -constant c_rlink_dat_attn : slv9 := "100000100"; +constant c_rlink_dat_sop : slv9 := "100000000"; +constant c_rlink_dat_eop : slv9 := "100000001"; +constant c_rlink_dat_nak : slv9 := "100000010"; +constant c_rlink_dat_attn : slv9 := "100000011"; constant c_rlink_cmd_rreg : slv3 := "000"; constant c_rlink_cmd_rblk : slv3 := "001"; constant c_rlink_cmd_wreg : slv3 := "010"; constant c_rlink_cmd_wblk : slv3 := "011"; -constant c_rlink_cmd_stat : slv3 := "100"; +constant c_rlink_cmd_labo : slv3 := "100"; constant c_rlink_cmd_attn : slv3 := "101"; constant c_rlink_cmd_init : slv3 := "110"; -constant c_rlink_iint_rbf_anena: integer := 15; -- anena flag -constant c_rlink_iint_rbf_itoena: integer := 14; -- itoena flag -subtype c_rlink_iint_rbf_itoval is integer range 7 downto 0; -- itoval value - subtype c_rlink_cmd_rbf_seq is integer range 7 downto 3; -- sequence number subtype c_rlink_cmd_rbf_code is integer range 2 downto 0; -- command code -subtype c_rlink_stat_rbf_stat is integer range 7 downto 5; -- ext status bits -constant c_rlink_stat_rbf_attn: integer := 4; -- attention flags set -constant c_rlink_stat_rbf_cerr: integer := 3; -- command error -constant c_rlink_stat_rbf_derr: integer := 2; -- data error +subtype c_rlink_stat_rbf_stat is integer range 7 downto 4; -- ext status bits +constant c_rlink_stat_rbf_attn: integer := 3; -- attention flags set constant c_rlink_stat_rbf_rbnak: integer := 1; -- rbus no ack or timeout constant c_rlink_stat_rbf_rberr: integer := 0; -- rbus err bit set +constant c_rlink_nakcode_ccrc : slv3 := "000"; -- cmd crc error +constant c_rlink_nakcode_dcrc : slv3 := "001"; -- data crc error +constant c_rlink_nakcode_frame : slv3 := "010"; -- framing error +constant c_rlink_nakcode_unused : slv3 := "011"; -- +constant c_rlink_nakcode_cmd : slv3 := "100"; -- bad cmd +constant c_rlink_nakcode_cnt : slv3 := "101"; -- bad cnt +constant c_rlink_nakcode_rtovfl : slv3 := "110"; -- rtbuf ovfl +constant c_rlink_nakcode_rtwblk : slv3 := "111"; -- rtbuf ovfl in wblk + type rl_moni_type is record -- rlink_core monitor port eop : slbit; -- eop send in last cycle attn : slbit; -- attn send in last cycle @@ -111,23 +112,21 @@ end record rlb_moni_type; constant rlb_moni_init : rlb_moni_type := ('0','0','0','0'); -- rxval,rxhold,txena,txbusy --- ise 13.1 xst can bug check if generic defaults in a package are defined via --- 'slv(to_unsigned())'. The conv_ construct prior to numeric_std was ok. --- As workaround the ibus default addresses are defined here as constant. -constant rbaddr_rlink_serport : slv8 := slv(to_unsigned(2#11111110#,8)); - --- this definition logically belongs into the 'for test benches' section' --- must be here because it is needed as generic default in rlink_core8 --- simbus sb_cntl field usage for rlink -constant sbcntl_sbf_rlmon : integer := 15; +-- these definitions logically belongs into the 'for test benches' section' +-- it is here for convenience to simplify instantiations. +constant sbcntl_sbf_rlmon : integer := 15; +constant sbcntl_sbf_rlbmon : integer := 14; component rlink_core is -- rlink core with 9bit iface generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6); -- idle timeout counter width + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RBMON : integer := -1); -- SB_CNTL for rbmon (-1=none) port ( CLK : in slbit; -- clock - CE_INT : in slbit := '0'; -- rlink ito time unit clock enable + CE_INT : in slbit := '0'; -- rlink ato time unit clock enable RESET : in slbit; -- reset RL_DI : in slv9; -- rlink 9b: data in RL_ENA : in slbit; -- rlink 9b: data enable @@ -139,14 +138,14 @@ component rlink_core is -- rlink core with 9bit iface RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end component; component rlink_aif is -- rlink, abstract interface port ( CLK : in slbit; -- clock - CE_INT : in slbit := '0'; -- rlink ito time unit clock enable + CE_INT : in slbit := '0'; -- rlink ato time unit clock enable RESET : in slbit :='0'; -- reset RL_DI : in slv9; -- rlink 9b: data in RL_ENA : in slbit; -- rlink 9b: data enable @@ -159,14 +158,15 @@ end component; component rlink_core8 is -- rlink core with 8bit iface generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon); -- SB_CNTL for rbmon (-1=none) + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1); -- SB_CNTL for rbmon (-1=none) port ( CLK : in slbit; -- clock - CE_INT : in slbit := '0'; -- rlink ito time unit clock enable + CE_INT : in slbit := '0'; -- rlink ato time unit clock enable RESET : in slbit; -- reset RLB_DI : in slv8; -- rlink 8b: data in RLB_ENA : in slbit; -- rlink 8b: data enable @@ -178,7 +178,7 @@ component rlink_core8 is -- rlink core with 8bit iface RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end component; @@ -212,20 +212,21 @@ end component; component rlink_sp1c is -- rlink_core8+serport_1clock combo generic ( - ATOWIDTH : positive := 5; -- access timeout counter width - ITOWIDTH : positive := 6; -- idle timeout counter width - CPREF : slv4 := c_rlink_cpref; -- comma prefix + BTOWIDTH : positive := 5; -- rbus timeout counter width + RTAWIDTH : positive := 12; -- retransmit buffer address width + SYSID : slv32 := (others=>'0'); -- rlink system id IFAWIDTH : natural := 5; -- input fifo address width (0=none) OFAWIDTH : natural := 5; -- output fifo address width (0=none) - ENAPIN_RLMON : integer := sbcntl_sbf_rlmon; -- SB_CNTL for rlmon (-1=none) - ENAPIN_RBMON : integer := sbcntl_sbf_rbmon; -- SB_CNTL for rbmon (-1=none) + ENAPIN_RLMON : integer := -1; -- SB_CNTL for rlmon (-1=none) + ENAPIN_RLBMON: integer := -1; -- SB_CNTL for rlbmon (-1=none) + ENAPIN_RBMON : integer := -1; -- SB_CNTL for rbmon (-1=none) CDWIDTH : positive := 13; -- clk divider width CDINIT : natural := 15); -- clk divider initial/reset setting port ( CLK : in slbit; -- clock CE_USEC : in slbit; -- 1 usec clock enable CE_MSEC : in slbit; -- 1 msec clock enable - CE_INT : in slbit := '0'; -- rri ito time unit clock enable + CE_INT : in slbit := '0'; -- rri ato time unit clock enable RESET : in slbit; -- reset ENAXON : in slbit; -- enable xon/xoff handling ENAESC : in slbit; -- enable xon/xoff escaping @@ -236,7 +237,7 @@ component rlink_sp1c is -- rlink_core8+serport_1clock combo RB_MREQ : out rb_mreq_type; -- rbus: request RB_SRES : in rb_sres_type; -- rbus: response RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags RL_MONI : out rl_moni_type; -- rlink_core: monitor port SER_MONI : out serport_moni_type -- serport: monitor port ); diff --git a/rtl/vlib/rlink/tb/rlink_cext.c b/rtl/vlib/rlink/tb/rlink_cext.c index d55cadb9..af797fca 100644 --- a/rtl/vlib/rlink/tb/rlink_cext.c +++ b/rtl/vlib/rlink/tb/rlink_cext.c @@ -1,4 +1,4 @@ -/* $Id: rlink_cext.c 575 2014-07-27 20:55:41Z mueller $ +/* $Id: rlink_cext.c 602 2014-11-08 21:42:47Z mueller $ * * Copyright 2007-2014 by Walter F.J. Mueller * @@ -13,6 +13,7 @@ * * Revision History: * Date Rev Vers Comment + * 2014-11-02 602 2.0 sideband handling for rlink v4; count EAGAINs * 2014-07-27 575 1.3.2 add ssize_t -> int casts to avoid warnings * add fflush(stdout) after standart open/close msgs * 2011-03-05 366 1.3.1 add RLINK_CEXT_TRACE=2 trace level @@ -36,8 +37,8 @@ #include #include -#define CPREF 0x80 -#define CESC (CPREF|0x0f) +/* kSymEsc = 0xCA = 1100 1010 (bin) */ +#define CESC (0xCA) #define QRBUFSIZE 1024 static int fd_rx = -1; @@ -52,18 +53,6 @@ static int qr_nb = 0; static int qr_eof = 0; static int qr_err = EAGAIN; -/* returns: - * <0 if error - * >=0 <=0xff normal data - * == 0x100 idle - * 0x1aahhll if side band message seen - * - */ - -/* returns - 0 if EGAIN or - */ - static void rlink_cext_dotrace(const char *text, int dat) { int i; @@ -78,13 +67,23 @@ static void rlink_cext_dotrace(const char *text, int dat) static void rlink_cext_doread() { + static int neagain = 0; + char buf[1]; ssize_t nbyte; nbyte = read(fd_rx, buf, 1); if (io_trace > 1) { - printf("rlink_cext-I: read rc=%d", (int)nbyte); - if (nbyte < 0) printf(" errno=%d %s", errno, strerror(errno)); - printf("\n"); + if (nbyte < 0 && errno == EAGAIN) { + neagain += 1; + } else { + if (neagain) { + printf("rlink_cext-I: reads with EAGAIN: %d seen\n", neagain); + neagain = 0; + } + printf("rlink_cext-I: read rc=%d", (int)nbyte); + if (nbyte < 0) printf(" errno=%d %s", errno, strerror(errno)); + printf("\n"); + } } if (nbyte < 0) { @@ -105,6 +104,14 @@ static void rlink_cext_doread() } } +/* returns: + * <0 if error + * >=0 <=0xff normal data + * == 0x100 idle + * 0x01aahhll if side band message seen + * + */ + int rlink_cext_getbyte(int clk) { char buf[1]; @@ -139,16 +146,23 @@ int rlink_cext_getbyte(int clk) ncesc = 0; nside = -1; + /* determine trace level from RLINK_CEXT_TRACE: */ + /* "1" trace bytes read and written */ + /* "2" trace also read() and write() calls */ io_trace = 0; env_val = getenv("RLINK_CEXT_TRACE"); if (env_val) { printf("rlink_cext-I: seen RLINK_CEXT_TRACE=%s\n", env_val); - if (strcmp(env_val, "1") == 0) { - printf("rlink_cext-I: set trace level to 1\n"); + if (strcmp(env_val, "0") == 0) { + printf("rlink_cext-I: set trace level to 0 (off)\n"); + } else if (strcmp(env_val, "1") == 0) { + printf("rlink_cext-I: set trace level to 1 (bytes)\n"); io_trace = 1; } else if (strcmp(env_val, "2") == 0) { - printf("rlink_cext-I: set trace level to 2\n"); + printf("rlink_cext-I: set trace level to 2 (bytes + calls)\n"); io_trace = 2; + } else { + printf("rlink_cext-E: invalid RLINK_CEXT_TRACE value; ignored\n"); } } @@ -204,18 +218,34 @@ int rlink_cext_getbyte(int clk) return tdat; case 0: /* 2nd CESC, return it */ nside += 1; + odat = 0x01000000; /* init odat */ return tdat; - case 1: /* get ADDR byte */ + + /* decode oob data as formated by RlinkPacketBufSnd::SndOob() */ + /* odat format: 0x01aadddd */ + case 1: /* get ADDR(3:0) */ nside += 1; - odat = 0x1000000 | (tdat<<16); + odat |= (tdat&0x0f)<<16; return 0x100; - case 2: /* get DL byte */ + case 2: /* get ADDR(7:4) */ nside += 1; - odat |= tdat; + odat |= (tdat&0x0f)<<20; return 0x100; - case 3: /* get DH byte */ - nside = -1; - odat |= tdat<<8; + case 3: /* get data( 3: 0) */ + nside += 1; + odat |= (tdat&0x0f); + return 0x100; + case 4: /* get data( 7: 4) */ + nside += 1; + odat |= (tdat&0x0f)<<4; + return 0x100; + case 5: /* get data(11: 8) */ + nside += 1; + odat |= (tdat&0x0f)<<8; + return 0x100; + case 6: /* get data(15:12) */ + nside = -1; + odat |= (tdat&0x0f)<<12; return odat; } } diff --git a/rtl/vlib/rlink/tb/rlinktblib.vhd b/rtl/vlib/rlink/tb/rlinktblib.vhd index 40697cca..eddfe7a7 100644 --- a/rtl/vlib/rlink/tb/rlinktblib.vhd +++ b/rtl/vlib/rlink/tb/rlinktblib.vhd @@ -1,6 +1,6 @@ --- $Id: rlinktblib.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: rlinktblib.vhd 595 2014-09-28 08:47:45Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -16,9 +16,11 @@ -- Description: rlink test environment components -- -- Dependencies: - --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 4.0 now full rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-12-23 444 3.1 new clock iface for tbcore_rlink; drop .._dcm -- 2010-12-29 351 3.0.1 add rbtba_aif; -- 2010-12-24 347 3.0 rename rritblib->rlinktblib, CP_*->RL_*; @@ -54,8 +56,8 @@ package rlinktblib is type rlink_tba_cntl_type is record -- rlink_tba control cmd : slv3; -- command code ena : slbit; -- command enable - addr : slv8; -- address - cnt : slv8; -- block size + addr : slv16; -- address + cnt : slv16; -- block size eop : slbit; -- end packet after current command end record rlink_tba_cntl_type; @@ -71,12 +73,14 @@ type rlink_tba_stat_type is record -- rlink_tba status ack : slbit; -- command acknowledge err : slbit; -- command error flag stat : slv8; -- status flags - braddr : slv8; -- block read address (for wblk) + braddr : slv16; -- block read address (for wblk) bre : slbit; -- block read enable (for wblk) - bwaddr : slv8; -- block write address (for rblk) + bwaddr : slv16; -- block write address (for rblk) bwe : slbit; -- block write enable (for rblk) - attnpend : slbit; -- attn pending - attnint : slbit; -- attn interrupt + dcnt : slv16; -- block done count + apend : slbit; -- attn pending (from stat) + ano : slbit; -- attn notify seen + apat : slv16; -- attn pattern end record rlink_tba_stat_type; constant rlink_tba_stat_init : rlink_tba_stat_type := ( @@ -86,7 +90,10 @@ constant rlink_tba_stat_init : rlink_tba_stat_type := ( '0', -- bre (others=>'0'), -- bwaddr '0', -- bwe - '0','0'); -- attnpend, attnint + (others=>'0'), -- dcnt + '0','0', -- apend, ano + (others=>'0') -- apat + ); component rlink_tba is -- rlink test bench adapter port ( @@ -114,14 +121,14 @@ component rbtba_aif is -- rbus tba, abstract interface RB_MREQ_re : in slbit; -- rbus: request - re RB_MREQ_we : in slbit; -- rbus: request - we RB_MREQ_initt : in slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : in slv8; -- rbus: request - addr + RB_MREQ_addr : in slv16; -- rbus: request - addr RB_MREQ_din : in slv16; -- rbus: request - din RB_SRES_ack : out slbit; -- rbus: response - ack RB_SRES_busy : out slbit; -- rbus: response - busy RB_SRES_err : out slbit; -- rbus: response - err RB_SRES_dout : out slv16; -- rbus: response - dout RB_LAM : out slv16; -- rbus: look at me - RB_STAT : out slv3 -- rbus: status flags + RB_STAT : out slv4 -- rbus: status flags ); end component; diff --git a/rtl/vlib/rlink/tb/tb_rlink.vbom b/rtl/vlib/rlink/tb/tb_rlink.vbom index 102b177b..33595170 100644 --- a/rtl/vlib/rlink/tb/tb_rlink.vbom +++ b/rtl/vlib/rlink/tb/tb_rlink.vbom @@ -10,13 +10,12 @@ ../../rbus/rbdlib.vhd ../rlinklib.vbom ../../simlib/simlib.vhd +../../simlib/simbus.vhd # components ../../simlib/simclk.vbom ../../simlib/simclkcnt.vbom ../../genlib/clkdivce.vbom ../../rbus/rbd_tester.vbom -../../rbus/rb_mon.vbom -../rlink_mon.vbom ${tbd_rlink_gen := tbd_rlink_direct.vbom} # design tb_rlink.vhd diff --git a/rtl/vlib/rlink/tb/tb_rlink.vhd b/rtl/vlib/rlink/tb/tb_rlink.vhd index 10539850..af7586cb 100644 --- a/rtl/vlib/rlink/tb/tb_rlink.vhd +++ b/rtl/vlib/rlink/tb/tb_rlink.vhd @@ -1,6 +1,6 @@ --- $Id: tb_rlink.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: tb_rlink.vhd 596 2014-10-17 19:50:07Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -19,8 +19,6 @@ -- simlib/simclkcnt -- genlib/clkdivce -- rbus/tbd_tester --- rbus/rb_mon --- rlink/rlink_mon -- tbd_rlink_gen [UUT] -- -- To test: rlink_core (via tbd_rlink_direct) @@ -28,10 +26,14 @@ -- rlink_serport (via tbd_rlink_serport) -- -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-12 596 4.1 use readgen_ea; add get_cmd_ea; labo instead of stat +-- add txblk,rxblk,rxrbeg,rxrend,rxcbs,anmsg commands +-- 2014-08-28 588 4.0 now rlink v4 iface -> txcac has 16 bit; 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit; adopt txca,txcad,txcac -- 2011-12-23 444 3.1 use new simclk/simclkcnt -- 2011-11-19 427 3.0.7 fix crc8_update_tbl usage; now numeric_std clean -- 2010-12-29 351 3.0.6 use new rbd_tester addr 111100xx (from 111101xx) @@ -61,37 +63,61 @@ ------------------------------------------------------------------------------ -- command set: -- .reset assert RESET for 1 clk --- .rlmon ien enable rlink monitor +-- .rlmon ien enable rlink monitor (9 bit) +-- .rlbmo ien enable rlink monitor (8 bit) -- .rbmon ien enable rbus monitor --- .wait n wait n clks --- .iowt n wait n clks for rlink i/o; auto-extend --- .attn dat(16) pulse attn lines with dat +-- .wait n wait n clks +-- .iowt n wait n clks for rlink i/o; auto-extend +-- .attn dat(16) pulse attn lines with dat +-- +-- - high level --- +-- anmsg apat attn notify message +-- sop start packet +-- eop end packet +-- rreg seq addr data stat rreg cmd +-- wreg seq addr data stat wreg cmd +-- init seq addr data stat init cmd +-- attn seq data stat attn cmd +-- labo seq data stat labo cmd +-- rblks seq addr nblk data stat rblk cmd (with seq) +-- wblks seq addr nblk data stat wblk cmd (with seq) +-- rblkd seq addr ndone stat rblk cmd (with data list) +-- wblkd seq addr ndone stat wblk cmd (with data list) +-- .dclr clear data list +-- .dwrd data add word to data list +-- .dseq nblk data add sequence to data list +-- +-- - low level --- +-- txcrc send crc +-- txbad send bad (inverted) crc +-- txc cmd(8) send cmd - crc +-- txca cmd(8) addr(16) send cmd - al ah - crcl crch +-- txcad cmd(8) addr(16) dat(16) send cmd - al ah - dl dh - crcl crch +-- txcac cmd(8) addr(16) cnt(16) send cmd - al ah - cl ch - crcl crch +-- txoof dat(9) send out-of-frame symbol +-- rxcrc expect crc +-- rxcs cmd(8) stat(8) expect cmd - stat - crcl crch +-- rxcds cmd(8) dat(16) stat(8) expect cmd - dl dh - stat - crcl crch +-- rxcbs cmd(8) dat(8) stat(8) expect cmd - dl - stat - crcl crch +-- rxrbeg cmd(8) cnt(16) expect cmd - cl ch +-- rxrend dcnt(16) expect dcl dch - stat - crcl crch +-- rxoof dat(9) expect out-of-frame symbol +-- +-- - raw level --- -- txsop send -- txeop send -- txnak send --- txidle send -- txattn send --- tx8 dat(8) send 8 bit value --- tx16 dat(16) send 16 bit value --- txcrc send crc --- txbad send bad (inverted) crc --- txc cmd(8) send cmd - crc --- txca cmd(8) addr(8) send cmd - addr - crc --- txcad cmd(8) addr(8) dat(16) send cmd - addr - dl dh - crc --- txcac cmd(8) addr(8) cnt(8) send cmd - addr - cnt - crc --- txoof dat(9) send out-of-frame symbol +-- tx8 dat(8) send 8 bit value +-- tx16 dat(16) send 16 bit value +-- txblk n start send n 16 values -- rxsop reset rx list; expect sop -- rxeop expect -- rxnak expect --- rxidle expect -- rxattn expect --- rx8 dat(8) expect 8 bit value --- rx16 dat(16) expect 16 bit value --- rxcrc expect crc --- rxcs cmd(8) stat(8) expect cmd - stat - crc --- rxcds cmd(8) dat(16) stat(8) expect cmd - dl dh - stat - crc --- rxccd cmd(8) ccmd(8) dat(16) stat(8) expect cmd - ccmd - dl dh - stat - crc --- rxoof dat(9) expect out-of-frame symbol +-- rx8 dat(8) expect 8 bit value +-- rx16 dat(16) expect 16 bit value +-- rxblk n start expect n 16 values -- ------------------------------------------------------------------------------ @@ -108,12 +134,19 @@ use work.rblib.all; use work.rbdlib.all; use work.rlinklib.all; use work.simlib.all; +use work.simbus.all; entity tb_rlink is end tb_rlink; architecture sim of tb_rlink is + constant d_f_cflag : integer := 8; -- d9: comma flag + subtype d_f_data is integer range 7 downto 0; -- d9: data field + + subtype f_byte1 is integer range 15 downto 8; + subtype f_byte0 is integer range 7 downto 0; + signal CLK : slbit := '0'; signal CE_USEC : slbit := '0'; signal CE_MSEC : slbit := '0'; @@ -128,7 +161,7 @@ architecture sim of tb_rlink is signal RB_MREQ_re : slbit := '0'; signal RB_MREQ_we : slbit := '0'; signal RB_MREQ_initt: slbit := '0'; - signal RB_MREQ_addr : slv8 := (others=>'0'); + signal RB_MREQ_addr : slv16 := (others=>'0'); signal RB_MREQ_din : slv16 := (others=>'0'); signal RB_SRES_ack : slbit := '0'; signal RB_SRES_busy : slbit := '0'; @@ -137,25 +170,27 @@ architecture sim of tb_rlink is signal RB_LAM_TBENCH : slv16 := (others=>'0'); signal RB_LAM_TESTER : slv16 := (others=>'0'); signal RB_LAM : slv16 := (others=>'0'); - signal RB_STAT : slv3 := (others=>'0'); + signal RB_STAT : slv4 := (others=>'0'); signal TXRXACT : slbit := '0'; - signal RLMON_EN : slbit := '0'; - signal RBMON_EN : slbit := '0'; - signal RB_MREQ : rb_mreq_type := rb_mreq_init; signal RB_SRES : rb_sres_type := rb_sres_init; signal CLK_STOP : slbit := '0'; signal CLK_CYCLE : integer := 0; + constant rxlist_size : positive := 4096; -- size of rxlist + constant txlist_size : positive := 4096; -- size of txlist + constant datlist_size : positive := 2048; -- size of datlist + constant slv9_zero : slv9 := (others=>'0'); constant slv16_zero : slv16 := (others=>'0'); - - type slv9_array_type is array (0 to 255) of slv9; - type slv16_array_type is array (0 to 255) of slv16; - shared variable sv_rxlist : slv9_array_type := (others=>slv9_zero); + type rxlist_array_type is array (0 to rxlist_size-1) of slv9; + type txlist_array_type is array (0 to txlist_size-1) of slv9; + type datlist_array_type is array (0 to datlist_size-1) of slv16; + + shared variable sv_rxlist : rxlist_array_type := (others=>slv9_zero); shared variable sv_nrxlist : natural := 0; shared variable sv_rxind : natural := 0; @@ -180,14 +215,14 @@ component tbd_rlink_gen is -- rlink, generic tb design interface RB_MREQ_re : out slbit; -- rbus: request - re RB_MREQ_we : out slbit; -- rbus: request - we RB_MREQ_initt: out slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : out slv8; -- rbus: request - addr + RB_MREQ_addr : out slv16; -- rbus: request - addr RB_MREQ_din : out slv16; -- rbus: request - din RB_SRES_ack : in slbit; -- rbus: response - ack RB_SRES_busy : in slbit; -- rbus: response - busy RB_SRES_err : in slbit; -- rbus: response - err RB_SRES_dout : in slv16; -- rbus: response - dout RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags TXRXACT : out slbit -- txrx active flag ); end component; @@ -230,7 +265,7 @@ begin RBTEST : rbd_tester generic map ( - RB_ADDR => slv(to_unsigned(2#11110000#,8))) + RB_ADDR => slv(to_unsigned(16#ffe0#,16))) port map ( CLK => CLK, RESET => '0', @@ -242,34 +277,6 @@ begin RB_LAM <= RB_LAM_TESTER or RB_LAM_TBENCH; - RLMON : rlink_mon - generic map ( - DWIDTH => RL_DI'length) - port map ( - CLK => CLK, - CLK_CYCLE => CLK_CYCLE, - ENA => RLMON_EN, - RL_DI => RL_DI, - RL_ENA => RL_ENA, - RL_BUSY => RL_BUSY, - RL_DO => RL_DO, - RL_VAL => RL_VAL, - RL_HOLD => RL_HOLD - ); - - RBMON : rb_mon - generic map ( - DBASE => 2) - port map ( - CLK => CLK, - CLK_CYCLE => CLK_CYCLE, - ENA => RBMON_EN, - RB_MREQ => RB_MREQ, - RB_SRES => RB_SRES, - RB_LAM => RB_LAM, - RB_STAT => RB_STAT - ); - UUT : tbd_rlink_gen port map ( CLK => CLK, @@ -302,64 +309,279 @@ begin variable iline : line; variable oline : line; variable ien : slbit := '0'; - variable icmd : slv8 := (others=>'0'); - variable iaddr : slv8 := (others=>'0'); - variable icnt : slv8 := (others=>'0'); - variable istat : slv3 := (others=>'0'); + variable icmd : slv8 := (others=>'0'); + variable iaddr : slv16 := (others=>'0'); + variable icnt : slv16 := (others=>'0'); + variable ibabo : slv8 := (others=>'0'); + variable istat : slv8 := (others=>'0'); variable iattn : slv16 := (others=>'0'); variable idata : slv16 := (others=>'0'); + variable idat8 : slv8 := (others=>'0'); variable ioof : slv9 := (others=>'0'); + variable iblkval : slv16 := (others=>'0'); + variable iblkmsk : slv16 := (others=>'0'); + variable nblk : natural := 1; + variable ndone : natural := 1; + variable rxlabo : boolean := false; variable ok : boolean; variable dname : string(1 to 6) := (others=>' '); variable idelta : integer := 0; variable iowait : integer := 0; - variable txcrc,rxcrc : slv8 := (others=>'0'); - variable txlist : slv9_array_type := (others=>slv9_zero); + variable txcrc,rxcrc : slv16 := (others=>'0'); + variable txlist : txlist_array_type := (others=>slv9_zero); variable ntxlist : natural := 0; - - procedure do_tx8 (data : inout slv8) is + variable datlist : datlist_array_type := (others=>slv16_zero); + variable ndatlist : natural := 0; + + -- read command line helpers ------------------------------------ + procedure get_cmd_ea ( -- ---- get_cmd_ea ----------- + L : inout line; + icmd : out slv8) is + variable cname : string(1 to 4) := (others=>' '); + variable ival : natural; + variable ok : boolean; + variable cmd : slv3; + variable dat : slv8; begin - txlist(ntxlist) := '0' & data; + readword_ea(L, cname); + ival := 0; + readoptchar(L, ',', ok); + if ok then + readint_ea(L, ival, 0, 31); + end if; + case cname is + when "rreg" => cmd := c_rlink_cmd_rreg; + when "rblk" => cmd := c_rlink_cmd_rblk; + when "wreg" => cmd := c_rlink_cmd_wreg; + when "wblk" => cmd := c_rlink_cmd_wblk; + when "labo" => cmd := c_rlink_cmd_labo; + when "attn" => cmd := c_rlink_cmd_attn; + when "init" => cmd := c_rlink_cmd_init; + when others => + report "unknown cmd code" severity failure; + end case; + dat := (others=>'0'); + dat(c_rlink_cmd_rbf_seq) := slv(to_unsigned(ival,5)); + dat(c_rlink_cmd_rbf_code) := cmd; + icmd := dat; + end procedure get_cmd_ea; + + procedure get_seq_ea ( -- ---- get_seq_ea ----------- + L : inout line; + code : in slv3; + icmd : out slv8) is + variable ival : natural; + variable dat : slv8; + begin + readint_ea(L, ival, 0, 31); + dat := (others=>'0'); + dat(c_rlink_cmd_rbf_seq) := slv(to_unsigned(ival,5)); + dat(c_rlink_cmd_rbf_code) := code; + icmd := dat; + end procedure get_seq_ea; + + -- tx helpers ---------------------------------------------------- + procedure do_tx9 (data : in slv9) is -- ---- do_tx9 ------------- + begin + txlist(ntxlist) := data; ntxlist := ntxlist + 1; - txcrc := crc8_update_tbl(txcrc, data); + end procedure do_tx9; + + procedure do_tx8 (data : in slv8) is -- ---- do_tx8 ------------- + begin + do_tx9('0' & data); + txcrc := crc16_update_tbl(txcrc, data); end procedure do_tx8; - procedure do_tx16 (data : inout slv16) is + procedure do_tx16 (data : in slv16) is -- ---- do_tx16 ---------- begin - do_tx8(data( 7 downto 0)); - do_tx8(data(15 downto 8)); + do_tx8(data( f_byte0)); + do_tx8(data(f_byte1)); end procedure do_tx16; - procedure do_rx8 (data : inout slv8) is + procedure do_txcrc is -- ---- do_txcrc ------------- begin - sv_rxlist(sv_nrxlist) := '0' & data; - sv_nrxlist := sv_nrxlist + 1; - rxcrc := crc8_update_tbl(rxcrc, data); - end procedure do_rx8; - - procedure do_rx16 (data : inout slv16) is - begin - do_rx8(data( 7 downto 0)); - do_rx8(data(15 downto 8)); - end procedure do_rx16; + do_tx9('0' & txcrc(f_byte0)); + do_tx9('0' & txcrc(f_byte1)); + end procedure do_txcrc; - procedure checkmiss_rx is + procedure do_txsop is -- ---- do_txsop ------------- + begin + do_tx9(c_rlink_dat_sop); + txcrc := (others=>'0'); + end procedure do_txsop; + + procedure do_txeop is -- ---- do_txeop ------------- + begin + do_tx9(c_rlink_dat_eop); + end procedure do_txeop; + + procedure do_txc (icmd : in slv8) is -- ---- do_txc ------------- + begin + do_tx8(icmd); + do_txcrc; + end procedure do_txc; + + procedure do_txca ( -- ---- do_txca -------------- + icmd : in slv8; + iaddr : in slv16) is + begin + do_tx8(icmd); + do_tx16(iaddr); + do_txcrc; + end procedure do_txca; + + procedure do_txcad ( -- ---- do_txcad ------------- + icmd : in slv8; + iaddr : in slv16; + idata : in slv16) is + begin + do_tx8(icmd); + do_tx16(iaddr); + do_tx16(idata); + do_txcrc; + end procedure do_txcad; + + procedure do_txblks ( -- ---- do_txblks ------------ + nblk : in natural; + start : in slv16) is + variable idata : slv16; + begin + idata := start; + for i in 1 to nblk loop + do_tx16(idata); + idata := slv(unsigned(idata) + 1); + end loop; + end procedure do_txblks; + + -- rx helpers ---------------------------------------------------- + procedure checkmiss_rx is -- ---- checkmiss_rx --------- begin if sv_rxind < sv_nrxlist then for i in sv_rxind to sv_nrxlist-1 loop writetimestamp(oline, CLK_CYCLE, ": moni "); - write(oline, string'(" FAIL MISSING DATA=")); - write(oline, sv_rxlist(i)(8)); + write(oline, string'(" FAIL MISSING DATA=")); + write(oline, sv_rxlist(i)(d_f_cflag)); write(oline, string'(" ")); - write(oline, sv_rxlist(i)(7 downto 0)); + write(oline, sv_rxlist(i)(f_byte0)); writeline(output, oline); end loop; end if; end procedure checkmiss_rx; + procedure do_rx9 (data : in slv9) is -- ---- do_rx9 ------------- + begin + sv_rxlist(sv_nrxlist) := data; + sv_nrxlist := sv_nrxlist + 1; + end procedure do_rx9; + + procedure do_rx8 (data : in slv8) is -- ---- do_rx8 ------------- + begin + if not rxlabo then + do_rx9('0' & data); + rxcrc := crc16_update_tbl(rxcrc, data); + end if; + end procedure do_rx8; + + procedure do_rx16 (data : in slv16) is -- ---- do_rx16 ---------- + begin + do_rx8(data(f_byte0)); + do_rx8(data(f_byte1)); + end procedure do_rx16; + + procedure do_rxattn is -- ---- do_rxattn ------------ + begin + do_rx9(c_rlink_dat_attn); + rxcrc := (others=>'0'); + end procedure do_rxattn; + + procedure do_rxcrc is -- ---- do_rxcrc ------------- + begin + if not rxlabo then + do_rx9('0' & rxcrc(f_byte0)); + do_rx9('0' & rxcrc(f_byte1)); + end if; + end procedure do_rxcrc; + + procedure do_rxsop is -- ---- do_rxsop ------------- + begin + checkmiss_rx; + sv_nrxlist := 0; + sv_rxind := 0; + rxcrc := (others=>'0'); + do_rx9(c_rlink_dat_sop); + end procedure do_rxsop; + + procedure do_rxeop is -- ---- do_rxeop ------------- + begin + do_rx9(c_rlink_dat_eop); + end procedure do_rxeop; + + procedure do_rxcs ( -- ---- do_rxcs ---------- + icmd : in slv8; + istat : in slv8) is + begin + do_rx8(icmd); + do_rx8(istat); + do_rxcrc; + end procedure do_rxcs; + + procedure do_rxcds ( -- ---- do_rxcds ---------- + icmd : in slv8; + idata : in slv16; + istat : in slv8) is + begin + do_rx8(icmd); + do_rx16(idata); + do_rx8(istat); + do_rxcrc; + end procedure do_rxcds; + + procedure do_rxcbs ( -- ---- do_rxcbs ---------- + icmd : in slv8; + ibabo : in slv8; + istat : in slv8) is + begin + do_rx8(icmd); + do_rx8(ibabo); + do_rx8(istat); + do_rxcrc; + end procedure do_rxcbs; + + procedure do_rxrbeg ( -- ---- do_rxrbeg ------------- + icmd : in slv8; + nblk : in natural) is + begin + do_rx8(icmd); + do_rx16(slv(to_unsigned(nblk,16))); + end procedure do_rxrbeg; + + procedure do_rxrend ( -- ---- do_rxrend ------------- + nblk : in natural; + istat : in slv8) is + begin + do_rx16(slv(to_unsigned(nblk,16))); + do_rx8(istat); + do_rxcrc; + end procedure do_rxrend; + + procedure do_rxblks ( -- ---- do_rxblks ------------ + nblk : in natural; + start : in slv16) is + variable idata : slv16; + begin + idata := start; + for i in 1 to nblk loop + do_rx16(idata); + idata := slv(unsigned(idata) + 1); + end loop; + end procedure do_rxblks; + begin - + + SB_CNTL <= (others=>'0'); + wait for clock_offset - setup_time; file_loop: while not endfile(fstim) loop @@ -383,12 +605,17 @@ begin when ".rlmon" => -- .rlmon read_ea(iline, ien); - RLMON_EN <= ien; + SB_CNTL(sbcntl_sbf_rlmon) <= ien; + wait for 2*clock_period; -- wait for monitor to start + + when ".rlbmo" => -- .rlbmo + read_ea(iline, ien); + SB_CNTL(sbcntl_sbf_rlbmon) <= ien; wait for 2*clock_period; -- wait for monitor to start when ".rbmon" => -- .rbmon read_ea(iline, ien); - RBMON_EN <= ien; + SB_CNTL(sbcntl_sbf_rbmon) <= ien; wait for 2*clock_period; -- wait for monitor to start when ".wait " => -- .wait @@ -399,10 +626,10 @@ begin read_ea(iline, iowait); idelta := iowait; while idelta > 0 loop -- until time has expired - if TXRXACT = '1' then -- if any io activity - idelta := iowait; -- restart timer + if TXRXACT = '1' then -- if any io activity + idelta := iowait; -- restart timer else - idelta := idelta - 1; -- otherwise count down time + idelta := idelta - 1; -- otherwise count down time end if; wait for clock_period; end loop; @@ -414,151 +641,241 @@ begin RB_LAM_TBENCH <= (others=>'0'); when "txsop " => -- txsop send sop - txlist(0) := c_rlink_dat_sop; - ntxlist := 1; - txcrc := (others=>'0'); + do_txsop; when "txeop " => -- txeop send eop - txlist(0) := c_rlink_dat_eop; - ntxlist := 1; - txcrc := (others=>'0'); + do_txeop; when "txnak " => -- txnak send nak - txlist(0) := c_rlink_dat_nak; - ntxlist := 1; - txcrc := (others=>'0'); - - when "txidle" => -- txidle send idle - txlist(0) := c_rlink_dat_idle; - ntxlist := 1; + do_tx9(c_rlink_dat_nak); when "txattn" => -- txattn send attn - txlist(0) := c_rlink_dat_attn; - ntxlist := 1; + do_tx9(c_rlink_dat_attn); when "tx8 " => -- tx8 send 8 bit value - read_ea(iline, iaddr); - ntxlist := 0; - do_tx8(iaddr); + readgen_ea(iline, idat8, 2); + do_tx8(idat8); when "tx16 " => -- tx16 send 16 bit value - read_ea(iline, idata); - ntxlist := 0; + readgen_ea(iline, idata, 2); do_tx16(idata); + when "txblk " => -- txblk send n 16 bit values + read_ea(iline, nblk); + readgen_ea(iline, idata, 2); + do_txblks(nblk, idata); + when "txcrc " => -- txcrc send crc - txlist(0) := '0' & txcrc; - ntxlist := 1; - - when "txbad " => -- txbad send bad crc - txlist(0) := '0' & (not txcrc); - ntxlist := 1; + do_txcrc; + + when "txbad " => -- txbad send bad crc + do_tx9('0' & (not txcrc(f_byte0))); + do_tx9('0' & (not txcrc(f_byte1))); when "txc " => -- txc send: cmd crc - read_ea(iline, icmd); - ntxlist := 0; - do_tx8(icmd); - txlist(ntxlist) := '0' & txcrc; - ntxlist := ntxlist + 1; + get_cmd_ea(iline, icmd); + do_txc(icmd); when "txca " => -- txc send: cmd addr crc - read_ea(iline, icmd); - read_ea(iline, iaddr); - ntxlist := 0; - do_tx8(icmd); - do_tx8(iaddr); - txlist(ntxlist) := '0' & txcrc; - ntxlist := ntxlist + 1; + get_cmd_ea(iline, icmd); + readgen_ea(iline, iaddr, 2); + do_txca(icmd, iaddr); when "txcad " => -- txc send: cmd addr data crc - read_ea(iline, icmd); - read_ea(iline, iaddr); - read_ea(iline, idata); - ntxlist := 0; - do_tx8(icmd); - do_tx8(iaddr); - do_tx16(idata); - txlist(ntxlist) := '0' & txcrc; - ntxlist := ntxlist + 1; + get_cmd_ea(iline, icmd); + readgen_ea(iline, iaddr, 2); + readgen_ea(iline, idata, 2); + do_txcad(icmd, iaddr, idata); when "txcac " => -- txc send: cmd addr cnt crc - read_ea(iline, icmd); - read_ea(iline, iaddr); - read_ea(iline, icnt); - ntxlist := 0; - do_tx8(icmd); - do_tx8(iaddr); - do_tx8(icnt); - txlist(ntxlist) := '0' & txcrc; - ntxlist := ntxlist + 1; + get_cmd_ea(iline, icmd); + readgen_ea(iline, iaddr, 2); + readgen_ea(iline, icnt, 2); + do_txcad(icmd, iaddr, icnt); when "txoof " => -- txoof send out-of-frame symbol - read_ea(iline, txlist(0)); + readgen_ea(iline, txlist(0), 2); ntxlist := 1; when "rxsop " => -- rxsop expect sop - checkmiss_rx; - sv_rxlist(0) := c_rlink_dat_sop; - sv_nrxlist := 1; - sv_rxind := 0; - rxcrc := (others=>'0'); + do_rxsop; when "rxeop " => -- rxeop expect eop - sv_rxlist(sv_nrxlist) := c_rlink_dat_eop; - sv_nrxlist := sv_nrxlist + 1; - + do_rxeop; + when "rxnak " => -- rxnak expect nak - sv_rxlist(sv_nrxlist) := c_rlink_dat_nak; - sv_nrxlist := sv_nrxlist + 1; - when "rxidle" => -- rxidle expect idle - sv_rxlist(sv_nrxlist) := c_rlink_dat_idle; - sv_nrxlist := sv_nrxlist + 1; + do_rx9(c_rlink_dat_nak); when "rxattn" => -- rxattn expect attn - sv_rxlist(sv_nrxlist) := c_rlink_dat_attn; - sv_nrxlist := sv_nrxlist + 1; + do_rxattn; when "rx8 " => -- rx8 expect 8 bit value - read_ea(iline, iaddr); - do_rx8(iaddr); + readgen_ea(iline, idat8, 2); + do_rx8(idat8); when "rx16 " => -- rx16 expect 16 bit value - read_ea(iline, idata); + readgen_ea(iline, idata, 2); do_rx16(idata); + when "rxblk " => -- rxblk expect n 16 bit values + read_ea(iline, nblk); + readgen_ea(iline, idata, 2); + do_rxblks(nblk, idata); + when "rxcrc " => -- rxcrc expect crc - sv_rxlist(sv_nrxlist) := '0' & rxcrc; - sv_nrxlist := sv_nrxlist+1; + do_rxcrc; when "rxcs " => -- rxcs expect: cmd stat crc - read_ea(iline, icmd); - read_ea(iline, iaddr); - do_rx8(icmd); - do_rx8(iaddr); - sv_rxlist(sv_nrxlist) := '0' & rxcrc; - sv_nrxlist := sv_nrxlist + 1; + get_cmd_ea(iline, icmd); + readgen_ea(iline, istat, 2); + do_rxcs(icmd, istat); when "rxcds " => -- rxcsd expect: cmd data stat crc - read_ea(iline, icmd); - read_ea(iline, idata); - read_ea(iline, iaddr); - do_rx8(icmd); - do_rx16(idata); - do_rx8(iaddr); - sv_rxlist(sv_nrxlist) := '0' & rxcrc; - sv_nrxlist := sv_nrxlist + 1; + get_cmd_ea(iline, icmd); + readgen_ea(iline, idata, 2); + readgen_ea(iline, istat, 2); + do_rxcds(icmd, idata, istat); - when "rxccd " => -- rxccd expect: cmd ccmd dat stat crc - read_ea(iline, icmd); - read_ea(iline, icnt); - read_ea(iline, idata); - read_ea(iline, iaddr); - do_rx8(icmd); - do_rx8(icnt); - do_rx16(idata); - do_rx8(iaddr); - sv_rxlist(sv_nrxlist) := '0' & rxcrc; - sv_nrxlist := sv_nrxlist + 1; + when "rxcbs " => -- rxcsd expect: cmd babo stat crc + get_cmd_ea(iline, icmd); + readgen_ea(iline, ibabo, 2); + readgen_ea(iline, istat, 2); + do_rxcbs(icmd, ibabo, istat); + when "rxrbeg" => -- rxrbeg expect: cmd - cl ch + get_cmd_ea(iline, icmd); + read_ea(iline, nblk); + do_rxrbeg(icmd, nblk); + + when "rxrend" => -- rxrend expect: dcl dch - stat - crc + read_ea(iline, nblk); + readgen_ea(iline, istat, 2); + do_rxrend(nblk, istat); + when "rxoof " => -- rxoof expect: out-of-frame symbol - read_ea(iline, ioof); + readgen_ea(iline, ioof, 2); sv_rxlist(sv_nrxlist) := ioof; sv_nrxlist := sv_nrxlist + 1; + when "anmsg " => -- anmsg + readgen_ea(iline, idata, 2); -- apat + do_rxattn; + do_rx16(idata); + do_rxcrc; + do_rxeop; + + when "sop " => -- sop + do_rxsop; + do_txsop; + rxlabo := false; + when "eop " => -- eop + do_rxeop; + do_txeop; + + when "rreg " => -- rreg seq addr data stat + get_seq_ea(iline, c_rlink_cmd_rreg, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + readgen_ea(iline, idata, 2); -- data + readgen_ea(iline, istat, 2); -- stat + do_rxcds(icmd, idata, istat); -- rx: cmd dl sh stat ccsr + do_txca (icmd, iaddr); -- tx: cmd al ah ccsr + + when "wreg " => -- wreg seq addr data stat + get_seq_ea(iline, c_rlink_cmd_wreg, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + readgen_ea(iline, idata, 2); -- data + readgen_ea(iline, istat, 2); -- stat + do_rxcs (icmd, istat); -- rx: cmd stat ccsr + do_txcad(icmd, iaddr, idata); -- tx: cmd al ah dl dh ccsr + + when "init " => -- init seq addr data stat + get_seq_ea(iline, c_rlink_cmd_init, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + readgen_ea(iline, idata, 2); -- data + readgen_ea(iline, istat, 2); -- stat + do_rxcs (icmd, istat); -- rx: cmd stat ccsr + do_txcad(icmd, iaddr, idata); -- tx: cmd al ah dl dh ccsr + + when "attn " => -- attn seq data stat + get_seq_ea(iline, c_rlink_cmd_attn, icmd); -- seq + readgen_ea(iline, idata, 2); -- data + readgen_ea(iline, istat, 2); -- stat + do_rxcds (icmd, idata, istat); -- rx: cmd dl dh stat ccsr + do_txc (icmd); -- tx: cmd ccsr + + when "labo " => -- labo seq babo stat + get_seq_ea(iline, c_rlink_cmd_labo, icmd); -- seq + readgen_ea(iline, ibabo, 2); -- babo + readgen_ea(iline, istat, 2); -- stat + do_rxcbs (icmd, ibabo, istat); -- rx: cmd dl stat ccsr + do_txc (icmd); -- tx: cmd ccsr + rxlabo := ibabo /= x"00"; -- set rxlabo flag + + when "rblks " => -- rblks seq addr nblk data stat + get_seq_ea(iline, c_rlink_cmd_rblk, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + read_ea(iline, nblk); -- nblk + readgen_ea(iline, idata, 2); -- start + readgen_ea(iline, istat, 2); -- stat + do_rxrbeg(icmd, nblk); --rx: cmd cl ch + do_rxblks(nblk, idata); -- nblk*(dl dh) + do_rxrend(nblk, istat); -- dcl dch stat ccrc + do_txcad(icmd, iaddr, -- tx: cmd al ah cl ch ccrc + slv(to_unsigned(nblk,16))); + + when "wblks " => -- wblks seq addr nblk data stat + get_seq_ea(iline, c_rlink_cmd_wblk, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + read_ea(iline, nblk); -- nblk + readgen_ea(iline, idata, 2); -- start + readgen_ea(iline, istat, 2); -- stat + do_rxcds(icmd, -- rx: cmd dcl dch stat ccsr + slv(to_unsigned(nblk,16)), + istat); + do_txcad(icmd, iaddr, -- tx: cmd al ah cl ch ccrc + slv(to_unsigned(nblk,16))); + do_txblks(nblk, idata); -- nblk*(dl dh) + do_txcrc; -- dcrc + + when "rblkd " => -- rblkd seq addr ndone stat + get_seq_ea(iline, c_rlink_cmd_rblk, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + read_ea(iline, ndone); -- ndone + readgen_ea(iline, istat, 2); -- stat + do_rxrbeg(icmd, ndatlist); --rx: cmd cl ch + for i in 0 to ndatlist-1 loop + do_rx16(datlist(i)); -- nblk*(dl dh) + end loop; -- i + do_rxrend(ndone, istat); -- dcl dch stat ccrc + do_txcad(icmd, iaddr, -- tx: cmd al ah cl ch ccrc + slv(to_unsigned(ndatlist,16))); + + when "wblkd " => -- wblkd seq addr ndone stat + get_seq_ea(iline, c_rlink_cmd_wblk, icmd); -- seq + readgen_ea(iline, iaddr, 2); -- addr + read_ea(iline, ndone); -- ndone + readgen_ea(iline, istat, 2); -- stat + do_rxcds(icmd, -- rx: cmd dcl dch stat ccsr + slv(to_unsigned(ndone,16)), + istat); + do_txcad(icmd, iaddr, -- tx: cmd al ah cl ch ccrc + slv(to_unsigned(ndatlist,16))); + for i in 0 to ndatlist-1 loop + do_tx16(datlist(i)); -- nblk*(dl dh) + end loop; -- i + do_txcrc; -- dcrc + + when ".dclr " => -- .dclr + ndatlist := 0; + + when ".dwrd " => -- .dwrd data + readgen_ea(iline, idata, 2); + datlist(ndatlist) := idata; + ndatlist := ndatlist + 1; + + when ".dseq " => -- .dseq nblk start + read_ea(iline, nblk); + readgen_ea(iline, idata, 2); + for i in 1 to nblk loop + datlist(ndatlist) := idata; + ndatlist := ndatlist + 1; + idata := slv(unsigned(idata) + 1); + end loop; + when others => -- bad command write(oline, string'("?? unknown command: ")); write(oline, dname); @@ -570,6 +887,7 @@ begin report "failed to find command" severity failure; end if; + testempty_ea(iline); next file_loop when ntxlist=0; for i in 0 to ntxlist-1 loop @@ -578,12 +896,10 @@ begin RL_ENA <= '1'; writetimestamp(oline, CLK_CYCLE, ": stim"); - write(oline, txlist(i)(8), right, 3); - write(oline, txlist(i)(7 downto 0), right, 9); - if txlist(i)(8) = '1' then + write(oline, txlist(i)(d_f_cflag), right, 3); + write(oline, txlist(i)(d_f_data), right, 9); + if txlist(i)(d_f_cflag) = '1' then case txlist(i) is - when c_rlink_dat_idle => - write(oline, string'(" (idle)")); when c_rlink_dat_sop => write(oline, string'(" (sop) ")); when c_rlink_dat_eop => @@ -634,12 +950,10 @@ begin if RL_VAL = '1' then writetimestamp(oline, CLK_CYCLE, ": moni"); - write(oline, RL_DO(8), right, 3); - write(oline, RL_DO(7 downto 0), right, 9); - if RL_DO(8) = '1' then + write(oline, RL_DO(d_f_cflag), right, 3); + write(oline, RL_DO(d_f_data), right, 9); + if RL_DO(d_f_cflag) = '1' then case RL_DO is - when c_rlink_dat_idle => - write(oline, string'(" (idle)")); when c_rlink_dat_sop => write(oline, string'(" (sop) ")); when c_rlink_dat_eop => @@ -659,8 +973,8 @@ begin write(oline, string'(" OK")); else write(oline, string'(" FAIL, exp=")); - write(oline, sv_rxlist(sv_rxind)(8), right, 2); - write(oline, sv_rxlist(sv_rxind)(7 downto 0), right, 9); + write(oline, sv_rxlist(sv_rxind)(d_f_cflag), right, 2); + write(oline, sv_rxlist(sv_rxind)(d_f_data), right, 9); end if; sv_rxind := sv_rxind + 1; else diff --git a/rtl/vlib/rlink/tb/tb_rlink_sp1c_stim.dat b/rtl/vlib/rlink/tb/tb_rlink_sp1c_stim.dat index 4a5e5c02..863dc687 100644 --- a/rtl/vlib/rlink/tb/tb_rlink_sp1c_stim.dat +++ b/rtl/vlib/rlink/tb/tb_rlink_sp1c_stim.dat @@ -1,141 +1,57 @@ -# $Id: tb_rlink_sp1c_stim.dat 442 2011-12-23 10:03:28Z mueller $ +# $Id: tb_rlink_sp1c_stim.dat 593 2014-09-14 22:21:33Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-09-07 593 4.0 adopt for new comma encoding, use higl level cmds +# 2014-08-15 583 3.5 rb_mreq addr now 16 bit # 2011-12-22 442 1.1 remove RTS tests (now obsolete) # 2010-12-29 351 1.0.1 use new rbd_tester addr 111100xx (from 111101xx) # 2010-12-26 348 1.0 Initial version (Test 3 from tb_rlink_stim.dat) # #--------------------------------------- # rbus address mapping -# 11110000 rbd_tester cntl -# 11110001 rbd_tester data -# 11110010 rbd_tester fifo -# 11110011 rbd_tester attn +# ffe0 rbd_tester cntl +# ffe1 rbd_tester stat +# ffe2 rbd_tester attn +# ffe3 rbd_tester ncyc +# ffe4 rbd_tester data +# ffe5 rbd_tester dinc +# ffe6 rbd_tester fifo +# ffe7 rbd_tester lnak # -.rlmon 0 +.rlmon 1 +.rlbmo 1 .rbmon 1 # C ----------------------------------------------------------------------------- -C Test 1: wreg(data) -C data := 0011001111001100 -C ==> shows that rlink can write a register -C -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop -# -rxsop -rxcs 00001010 00000000 -rxeop -# -txsop -txcad 00001010 11110001 0011001111001100 -txeop +C Test 1: wreg,rreg to data # +sop +wreg 0 x"ffe4" x"aaaa" 00000000 -- data := aaaa +rreg 1 x"ffe4" x"aaaa" 00000000 -- data >? aaaa +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 2: rreg(data) -C data -> 0011001111001100 -C ==> shows that rlink can read back a register -C -C rreg: tx: sop - cmd(00001,000) addr(0001) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop -# -rxsop -rxcds 00001000 0011001111001100 00000000 -rxeop -# -txsop -txca 00001000 11110001 -txeop +C Test 2: Test comma escapes with fifo +C Assumes c_cdata_escape = "11000011" = x"C3" # +sop +wreg 0 x"ffe6" x"4321" 00000000 -- fifo := 4321 +wreg 0 x"ffe6" x"c321" 00000000 -- fifo := c321 +wreg 0 x"ffe6" x"43c3" 00000000 -- fifo := 43c3 +wreg 0 x"ffe6" x"c3c3" 00000000 -- fifo := c3c3 +wreg 0 x"ffe6" x"1234" 00000000 -- fifo := 1234 +eop .iowt 10 # -C ----------------------------------------------------------------------------- -C Test 3: Test comma escapes -C Assumes CPREF=1000, covers 11111111:10000111 and 10001101:10010000 -C -C data := 1000000011111111 ,... -C data -> 1000000011111111 -C data := 1000001010000001 , -C data -> 1000001010000001 -C data := 1000010010000011 , -C data -> 1000010010000011 -C data := 1000011010000101 6,5 -C data -> 1000011010000101 -C data := 1000100010000111 8,7 -C data -> 1000100010000111 -C data := 1000111010001101 14,13 -C data -> 1000111010001101 -C data := 1001000010001111 .., -C data -> 1001000010001111 -C -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0001) ccrc -C wreg: tx: - cmd(00011,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00100,000) addr(0001) ccrc -C wreg: tx: - cmd(00101,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00110,000) addr(0001) ccrc -C wreg: tx: - cmd(00111,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(01000,000) addr(0001) ccrc -C wreg: tx: - cmd(01001,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(01010,000) addr(0001) ccrc -C wreg: tx: - cmd(01011,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(01100,000) addr(0001) ccrc -C wreg: tx: - cmd(01101,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(01110,000) addr(0001) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 1000000011111111 00000000 -rxcs 00011010 00000000 -rxcds 00100000 1000001010000001 00000000 -rxcs 00101010 00000000 -rxcds 00110000 1000010010000011 00000000 -rxcs 00111010 00000000 -rxcds 01000000 1000011010000101 00000000 -rxcs 01001010 00000000 -rxcds 01010000 1000100010000111 00000000 -rxcs 01011010 00000000 -rxcds 01100000 1000111010001101 00000000 -rxcs 01101010 00000000 -rxcds 01110000 1001000010001111 00000000 -rxeop -# -txsop -txcad 00001010 11110001 1000000011111111 -txca 00010000 11110001 -txcad 00011010 11110001 1000001010000001 -txca 00100000 11110001 -txcad 00101010 11110001 1000010010000011 -txca 00110000 11110001 -txcad 00111010 11110001 1000011010000101 -txca 01000000 11110001 -txcad 01001010 11110001 1000100010000111 -txca 01010000 11110001 -txcad 01011010 11110001 1000111010001101 -txca 01100000 11110001 -txcad 01101010 11110001 1001000010001111 -txca 01110000 11110001 -txeop -# +sop +rreg 1 x"ffe6" x"4321" 00000000 -- fifo >? 4321 +rreg 1 x"ffe6" x"c321" 00000000 -- fifo >? c321 +rreg 1 x"ffe6" x"43c3" 00000000 -- fifo >? 43c3 +rreg 1 x"ffe6" x"c3c3" 00000000 -- fifo >? c3c3 +rreg 1 x"ffe6" x"1234" 00000000 -- fifo >? 1234 +eop .iowt 10 # #============================================================================== diff --git a/rtl/vlib/rlink/tb/tb_rlink_stim.dat b/rtl/vlib/rlink/tb/tb_rlink_stim.dat index 7bbfde2d..cbc288e7 100644 --- a/rtl/vlib/rlink/tb/tb_rlink_stim.dat +++ b/rtl/vlib/rlink/tb/tb_rlink_stim.dat @@ -1,3106 +1,641 @@ -# $Id: tb_rlink_stim.dat 442 2011-12-23 10:03:28Z mueller $ +# $Id: tb_rlink_stim.dat 596 2014-10-17 19:50:07Z mueller $ # # Revision History: # Date Rev Version Comment -# 2011-12-22 442 3.0.7 adapt for rlink_sp1c (some .iowt 10->20) -# 2010-12-29 351 3.0.6 use new rbd_tester addr 111100xx (from 111101xx) -# 2010-12-28 350 3.3.2 adapt for cdinit=0 in tbd/tbu(some .iowt 10->20) -# 2010-12-25 348 3.3.1 Test 3b moved to tb_rlink_serport_stim.dat -# 2010-12-22 346 3.3 Test 7: check dcrc sends nak and ends in s_error -# Test 20: check that '111' ends in s_error -# Test 21*: now covers eop aborts of all commands -# 2010-12-21 345 3.2 rename .[rt]x... -> [rt]x...; use .[rt]x(idle|attn) -# 2010-12-12 344 3.1 now almost complete test coverage -# 2010-12-05 343 3.0 re-write for usage with tbd_tester -# 2010-06-06 302 2.0 use sop/eop framing instead of soc+chaining -# 2007-11-24 98 1.2 adapt to new internal init handling -# 2007-11-04 95 1.1 add .iowt's in Test 15 to get serport timing right +# 2014-10-12 596 4.0 rewritten for rlink v4 +# ... all history v1->v3 droped # 2007-06-17 58 1.0 Initial version # #--------------------------------------- -# test coverage table -# rlink_core -# command function and attribute matrix -# cmd function rberr rbnak- rbnak- rbnak- busy cerr derr idle eop -# nak dnak time -# rreg 2,3a 4a 8a 12a 10 10 6a n/a 18a 21b -# wreg 1,3a 4b 8a 12a 10 10 6b n/a 18a 21a -# rblk 4a 4b,7 8b 12b 11 11 6c n/a 18b 21d -# wblk 4a 4b 8b 12b 11 11 6c 7 18b 21c -# stat 5,6*,7 n/a n/a n/a n/a n/a 6c n/a 18c 21e -# attn 13* n/a n/a n/a n/a n/a 16 n/a 18c 21f -# init 9,15a n/a n/a n/a n/a n/a 16 n/a 18c 21g -# -# cmd rreg -# cmd wreg -# cmd rblk -# cmd wblk -# cmd stat -# returns last command status -> 5 -# returns cerr error flag -> 6a,6b -# returns derr error flag -> 7 -# cmd attn -# cmd init -# generates external init -> 9 -# generates internal init -> 15a -# drop cmd after ccrc -> 6b -# attn poll -> 14 -# attn notification -> 15a,15b -# idle timeout -> 17 -# idle insertion at any state -> 18a,18b,18c -# sop-eop framing -> 19 -# unused command code 111 gives nak -> 20 -# eop aborts (all commands) -> 21* -# nak aborts (only wreg) -> 21 -# -# tbd_tester -# reg cntl -# nofifo: read/write, disable fifo-> 8a,8b -# nofifo: clear fifo on 1->0 -> 8a -# stat: write and RB_STAT connect -> 3 -# stat: read -> 3 -# nbusy: controls # of busy cycles-> 10 -# cleared by init (..001) -> 9 -# reg data -# write -> 1,3,5 -# read -> 2,3,5 -# cleared by init (..010) -> 9 -# reg fifo -# write/read normal -> 4a -# read: rberr on EMPTY -> 4a,4b,8a -# write: rberr on FULL -> 4b -# cleared by nofifo 1->0 -> 8a -# cleared by init (..100) -> 9 -# reg attn -# returns cycle length on read -> 10 -# write tickles RB_LAM -> 13b -# -#--------------------------------------- # rbus address mapping -# 11110000 rbd_tester cntl -# 11110001 rbd_tester data -# 11110010 rbd_tester fifo -# 11110011 rbd_tester attn +# ffe0 rbd_tester cntl +# ffe1 rbd_tester stat +# ffe2 rbd_tester attn +# ffe3 rbd_tester ncyc +# ffe4 rbd_tester data +# ffe5 rbd_tester dinc +# ffe6 rbd_tester fifo +# ffe7 rbd_tester lnak # .rlmon 0 -.rbmon 0 +.rlbmo 0 +.rbmon 1 # -.wait 5 -C some non frame data first -tx8 00000000 -.wait 5 -tx8 00000001 -.wait 5 -tx8 00000010 +C ============================================================================= +C Section A1: Basic framing +C ----------------------------------------------------------------------------- +C Test A1.1: empty frame +C tx: sop - eop +C rx: sop - eop +rxsop +rxeop +# +txsop +txeop # .iowt 10 # C ----------------------------------------------------------------------------- -C Test 1: wreg(data) -C data := 0011001111001100 -C ==> shows that rlink can write a register -C -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop +C Test A1.2: discard extra eop's +C tx: eop - eop - sop - eop +C rx: sop - eop +rxsop +rxeop # -rxsop -rxcs 00001010 00000000 -rxeop -# -txsop -txcad 00001010 11110001 0011001111001100 -txeop +txeop +txeop +txsop +txeop # .iowt 10 # C ----------------------------------------------------------------------------- -C Test 2: rreg(data) -C data -> 0011001111001100 -C ==> shows that rlink can read back a register -C -C rreg: tx: sop - cmd(00001,000) addr(0001) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop +C Test A1.3: discard extra data +C tx: <4 byte data> - sop - eop +C rx: sop - eop +rxsop +rxeop # -rxsop -rxcds 00001000 0011001111001100 00000000 -rxeop -# -txsop -txca 00001000 11110001 -txeop +tx8 00000000 +tx8 00000001 +tx8 00000010 +tx8 00000011 +txsop +txeop # .iowt 10 # C ----------------------------------------------------------------------------- -C Test 3: chained wreg(cntl) - wreg(data) - rreg(cntl) - rreg(data) -C cntl := 0111000000000000 (nf=0,stat=111,nbusy=0) -C data := 1100110000110011 --> stat=111 ! -C cntl -> 0111000000000000 --> stat=111 ! -C data -> 1100110000110011 --> stat=111 ! -C ==> shows that rlink can properly address two registers -C ==> shows that tbd_tester cntl can set RB_STAT -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00011,000) addr(0000) ccrc -C rreg: tx: - cmd(00100,000) addr(0001) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 00001010 00000000 -rxcs 00010010 11100000 -rxcds 00011000 0111000000000000 11100000 -rxcds 00100000 1100110000110011 11100000 -rxeop -# -txsop -txcad 00001010 11110000 0111000000000000 -txcad 00010010 11110001 1100110000110011 -txca 00011000 11110000 -txca 00100000 11110001 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 4a: wblk - rblk (normal) -C write 8 words to fifo with wblk -C read back 8 words from fifo with rblk -C read back 9'th word from fifo with rreg (fails with err) -C ==> shows that block write/read work -C ==> shows that RB_SRES.err works with rreg -C -C wblk: tx: sop - cmd(10110,011) addr(0010) cnt(8->111) ccrc dl dh .. dcrc -C tx: - eop -C rx: sop - cmd(011) stat crc -C rx: - eop -# -rxsop -rxcs 10110011 11100000 -rxeop -# -txsop -txcac 10110011 11110010 00000111 -tx16 0000000001000000 -tx16 0000000001000001 -tx16 0000000001000010 -tx16 0000000001000011 -tx16 0000000001000100 -tx16 0000000001000101 -tx16 0000000001000110 -tx16 0000000001000111 -txcrc -txeop -# -.iowt 10 -# -C rblk: tx: sop - cmd(10111,001) addr(0010) cnt(8->111) ccrc - eop -C rx: sop - cmd(001) cnt dl dh ... stat crc - eop -# -rxsop -rx8 10111001 -rx8 00000111 -rx16 0000000001000000 -rx16 0000000001000001 -rx16 0000000001000010 -rx16 0000000001000011 -rx16 0000000001000100 -rx16 0000000001000101 -rx16 0000000001000110 -rx16 0000000001000111 -rx8 11100000 -rxcrc -rxeop -# -txsop -txcac 10111001 11110010 00000111 -txeop -# -.iowt 10 -# -C rreg: tx: sop - cmd(11000,000) addr(0010) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop -C -C stat: stat(111),attn(0),cerr(0),derr(0),rbnak(0),rberr(1) -> 11100001 -C Note: returns 0101... empty pattern -# -rxsop -rxcds 11000000 0101010101010101 11100001 -rxeop -# -txsop -txca 11000000 11110010 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 4b: wblk - rblk (rberr response) -C write 17 words to fifo with wblk -C write 18'th word to fifo with wreg -C read back 17 words from fifo with rblk -C ==> shows that RB_SRES.err works with wblk,wreg,rblk -C -C wblk: tx: sop - cmd(00001,011) addr(0010) cnt(17->10000) ccrc dl dh .. dcrc -C wreg: tx: - cmd(00010,010) addr(0010) dl dh ccrc -C rblk: tx: - cmd(00011,001) addr(0010) cnt(18->10001) ccrc -C tx: - eop -C rx: sop - cmd(011) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(001) cnt dl dh ... stat crc -C rx: - eop -C -C stat: stat(111),attn(0),cerr(0),derr(0),rbnak(0),rberr(1) -> 11100001 -# -rxsop -rxcs 00001011 11100001 -rxcs 00010010 11100001 -rx8 00011001 -rx8 00010001 -rx16 0000001111000000 -rx16 0000001111000001 -rx16 0000001111000010 -rx16 0000001111000011 -rx16 0000001111000100 -rx16 0000001111000101 -rx16 0000001111000110 -rx16 0000001111000111 -rx16 0000001111001000 -rx16 0000001111001001 -rx16 0000001111001010 -rx16 0000001111001011 -rx16 0000001111001100 -rx16 0000001111001101 -rx16 0000001111001110 -rx16 0000001111001111 -rx16 0101010101010101 -rx16 0101010101010101 -rx8 11100001 -rxcrc -rxeop -# -txsop -txcac 00001011 11110010 00010000 -tx16 0000001111000000 -tx16 0000001111000001 -tx16 0000001111000010 -tx16 0000001111000011 -tx16 0000001111000100 -tx16 0000001111000101 -tx16 0000001111000110 -tx16 0000001111000111 -tx16 0000001111001000 -tx16 0000001111001001 -tx16 0000001111001010 -tx16 0000001111001011 -tx16 0000001111001100 -tx16 0000001111001101 -tx16 0000001111001110 -tx16 0000001111001111 -tx16 0000001111010000 -txcrc -txcad 00010010 11110010 0000001111010001 -txcac 00011001 11110010 00010001 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 5: stat (in non-error case) re-read last cmd twice, shouldn't change -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) --> stat=111 -C data := 1010101010101010 --> stat=000 -C cntl -> 0000000000000000 --> stat=000 -C data -> 1010101010101010 --> stat=000 -C use 'stat' twice, should give cmd and data of last 'read data' -C ==> shows that stat command works properly -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00011,000) addr(0000) ccrc -C rreg: tx: - cmd(00100,000) addr(0001) ccrc -C stat: tx: - cmd(00101,100) ccrc -C stat: tx: - cmd(00110,100) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(100) ccmd(000) dl dh stat crc -C rx: - cmd(100) ccmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 00001010 11100000 -rxcs 00010010 00000000 -rxcds 00011000 0000000000000000 00000000 -rxcds 00100000 1010101010101010 00000000 -rxccd 00101100 00100000 1010101010101010 00000000 -rxccd 00110100 00100000 1010101010101010 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000000 -txcad 00010010 11110001 1010101010101010 -txca 00011000 11110000 -txca 00100000 11110001 -txc 00101100 -txc 00110100 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 6a: ccrc error abort for rreg, last command in packet fails -C cntl := 0101000000000000 (nf=0,stat=101,nbusy=0) --> stat=000 -C data := 1100110011001100 --> stat=101 -C cntl -> 0101000000000000 --> stat=101 -C data -> 1100110011001100 *send with bad CCRC*, will fail -C ==> shows command ccrc check works properly -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00011,000) addr(0000) ccrc -C rreg: tx: - cmd(00100,000) addr(0001) *BAD CCRC* -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - nak *ABORT* -C rx: - eop -# -rxsop -rxcs 00001010 00000000 -rxcs 00010010 10100000 -rxcds 00011000 0101000000000000 10100000 -rxnak -rxeop -# -txsop -txcad 00001010 11110000 0101000000000000 -txcad 00010010 11110001 1100110011001100 -txca 00011000 11110000 -tx8 00100000 -tx8 11110001 -txbad -txeop -# -.iowt 10 -# -C -C now check that stat reflects last successfull rreg; re-read cerr=1 sticks ! -C ==> shows command stat allows to deterine last successful (non-stat) command -C -C stat: tx: sop - cmd(00101,100) ccrc -C stat: tx: - cmd(00110,100) ccrc -C tx: - eop -C rx: - cmd(100) ccmd(000) dl dh stat crc -C rx: - cmd(100) ccmd(000) dl dh stat crc -C rx: - eop -C -C stat: stat(101),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 10101000 -rxsop -rxccd 00101100 00011000 0101000000000000 10101000 -rxccd 00110100 00011000 0101000000000000 10101000 -rxeop -# -txsop -txc 00101100 -txc 00110100 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 6b: ccrc error abort for wreg, failure inside packet -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) -C cntl := 0111000000000000 (nf=0,stat=111,nbusy=0) *send with bad CCRC* -C data := 0011001100110011 *will be ignored* -C ==> shows commands after a ccrc fail are ignored -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0000) dl dh *BAD CCRC* -C wreg: tx: - cmd(00011,010) addr(0001) dl dh ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - nak *ABORT* -C rx: - eop -C -rxsop -rxcs 00001010 10100000 -rxnak -rxeop -# -txsop -txcad 00001010 11110000 0000000000000000 -tx8 00010010 -tx8 11110000 -tx8 00000000 -tx8 01110000 -txbad -txcad 00011010 11110001 0011001100110011 -txeop -# -.iowt 20 -# -C -C now check that stat reflects first successfull wreg; re-read cerr=1 sticks ! -C ==> shows command stat allows to deterine last successful (non-stat) command -C -C stat: tx: sop - cmd(00101,100) ccrc -C stat: tx: - cmd(00110,100) ccrc -C tx: - eop -C rx: - cmd(100) ccmd (000) dl dh stat crc -C rx: - cmd(100) ccmd (000) dl dh stat crc -C rx: - eop -C -C stat: stat(101),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 10101000 -rxsop -rxccd 00101100 00001010 0101000000000000 10101000 -rxccd 00110100 00001010 0101000000000000 10101000 -rxeop -# -txsop -txc 00101100 -txc 00110100 -txeop -# -.iowt 10 -# -C -C finally check that cntl register was really written by first wreg -C cntl -> 0000000000000000 -C -C rreg: tx: sop - cmd(01000,000) addr(0000) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop -# -rxsop -rxcds 01000000 0000000000000000 00000000 -rxeop -# -txsop -txca 01000000 11110000 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 6c: ccrc error abort for wblk,rblk and stat -C write 2 words to fifo with bad CCRC -> nak -C read 2 words from fifo with bad CCRC -> nak -C cmd stat with bad CCRC -> nak -C finally stat, will return last successfull read from Test 6b -C -C wblk: tx: sop - cmd(00001,011) addr(0010) cnt(2->001) *BAD CCRC* dl dh .. dcrc -C - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00001011 -tx8 11110010 -tx8 00000001 -txbad -tx16 1010101010101010 -tx16 0101010101010101 -txcrc -txeop -# -.iowt 20 -# -C -C rblk: tx: sop - cmd(00010,001) addr(0010) cnt(2->001) *BAD CCRC* - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010001 -tx8 11110010 -tx8 00000001 -txbad -txeop -# -.iowt 10 -# -C -C stat: tx: sop - cmd(00011,100) *BAD CCRC* - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00011100 -txbad -txeop -# -.iowt 10 -# -C -C stat: tx: sop - cmd(00100,100) ccrc - eop -C rx: sop - cmd(100) ccmd (000) dl dh stat crc - eop -C -C stat: stat(000),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 00001000 -C -rxsop -rxccd 00100100 01000000 0000000000000000 00001000 -rxeop -# -txsop -txc 00100100 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 7: dcrc error condition in wblk -C write 4 words to fifo with wblk and bad DCRC, will cause a dcrc fail -C ==> shows that data dcrc works in wblk, aborts with -C ==> shows that commands after a dcrc failed wblk are discarded -C -C wblk: tx: sop - cmd(00001,011) addr(0010) cnt(4->011) ccrc dl dh .. -C *BAD DCRC* -C cmd(00010,000) addr(0001) ccrc -C - eop -C rx: sop - cmd(011) stat crc -C rx: - nak eop -C -C stat: stat(000),attn(0),cerr(0),derr(1),rbnak(0),rberr(0) -> 00000100 -# -rxsop -rxcs 00001011 00000100 +C Test A1.4: frame error nak abort: sop in active frame +C tx: sop - sop - eop +C rx: sop - nak nakcode(010) - eop +rxsop rxnak -rxeop +rx8 10101010 -- 10 101 010 +rxeop # -txsop -txcac 00001011 11110010 00000011 -tx16 0001000001000000 -tx16 0001000001000001 -tx16 0001000001000010 -tx16 0001000001000011 -txbad -txca 00010000 11110001 -txeop -# -.iowt 20 -# -C -C now check that stat reflects bad dcrc: re-read derr=1 sticks ! -C stat: tx: sop - cmd(00011,100) ccrc -C stat: tx: - cmd(00100,100) ccrc -C tx: - eop -C rx: - cmd(100) ccmd (000) dl dh stat crc -C rx: - cmd(100) ccmd (000) dl dh stat crc -C rx: - eop -C -C stat: stat(000),attn(0),cerr(0),derr(1),rbnak(0),rberr(0) -> 00000100 -C Note: dl,dh still the last read of Test 6 !! -rxsop -rxccd 00011100 00001011 0000000000000000 00000100 -rxccd 00100100 00001011 0000000000000000 00000100 -rxeop -# -txsop -txc 00011100 -txc 00100100 -txeop -# -.iowt 10 -# -C -C now read 6 words from fifo: first 4 previous data, 2 empty reads and err=1 -C rblk: tx: sop - cmd(00101,001) addr(0010) cnt(6->101) ccrc - eop -C rx: sop - cmd(001) cnt dl dh ... stat crc - eop -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(0),rberr(1) -> 00000001 -# -rxsop -rx8 00101001 -rx8 00000101 -rx16 0001000001000000 -rx16 0001000001000001 -rx16 0001000001000010 -rx16 0001000001000011 -rx16 0101010101010101 -rx16 0101010101010101 -rx8 00000001 -rxcrc -rxeop -# -txsop -txcac 00101001 11110010 00000101 -txeop +txsop +txsop +txeop # .iowt 10 # +C ============================================================================= +C Section A2: Basic commands: attn, wreg, rreg C ----------------------------------------------------------------------------- -C Test 8a: rbnak(no ack) condition (rreg/wreg) -C fifo := 1111111100000000 -> rbnak=0 -C cntl := 1000000000000000 (nf=1,stat=000,nbusy=0) --> disable fifo -C fifo := 1111111100001111 -> rbnak=1 -C fifo -> 0101010101010101 -> rbnak=1 -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) --> enable and clear fifo -C fifo := 0000000001010101 -> rbnak=0 -C fifo -> 0000000001010101 -> rbnak=0 -C fifo -> 0101010101010101 -> rberr=1 (first fifo write data cleared...) -C ==> shows that missing ack is handled properly and rbnak flag set -C -C wreg: tx: sop - cmd(00001,010) addr(0010) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00011,010) addr(0010) dl dh ccrc -C rreg: tx: - cmd(00100,000) addr(0010) ccrc -C wreg: tx: - cmd(00101,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00110,010) addr(0010) dl dh ccrc -C rreg: tx: - cmd(00111,000) addr(0010) ccrc -C rreg: tx: - cmd(01000,000) addr(0010) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -C -C stat-3: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C stat-8: stat(000),attn(0),cerr(0),derr(0),rbnak(0),rberr(1) -> 00000001 -C Note: fifo will nak when nofifo flag set in cntl -C Note: tb returns 0000000000000000 for access to bad addresses -# -rxsop -rxcs 00001010 00000000 -rxcs 00010010 00000000 -rxcs 00011010 00000010 -rxcds 00100000 0000000000000000 00000010 -rxcs 00101010 00000000 -rxcs 00110010 00000000 -rxcds 00111000 0000000010101010 00000000 -rxcds 01000000 0101010101010101 00000001 -rxeop -# -txsop -txcad 00001010 11110010 1111111100000000 -txcad 00010010 11110000 1000000000000000 -txcad 00011010 11110010 1111111100001111 -txca 00100000 11110010 -txcad 00101010 11110000 0000000000000000 -txcad 00110010 11110010 0000000010101010 -txca 00111000 11110010 -txca 01000000 11110010 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 8b: rbnak(no ack) condition (rblk/wblk) -C cntl := 1000000000000000 (nf=1,stat=000,nbusy=0) --> disable fifo -C write 2 words to fifo -> rbnak=1 -C read 2 words from fifo -> rbnak=1 -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) --> enable and clear fifo -C ==> shows that missing ack is handled properly and rbnak flag set -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wblk: tx: - cmd(00010,011) addr(0010) cnt(2->001) ccrc dl dh .. dcrc -C rblk: tx: - cmd(00011,001) addr(0010) cnt(2->001) ccrc -C wreg: tx: - cmd(00100,010) addr(0000) dl dh ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(011) stat crc -C rx: - cmd(001) cnt dl dh ... stat crc - eop -C rx: - cmd(010) stat crc -C rx: - eop -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C Note: fifo will nak when nofifo flag set in cntl -C Note: tb returns 0000000000000000 for access to bad addresses -# -rxsop -rxcs 00001010 00000000 -rxcs 00010011 00000010 -rx8 00011001 -rx8 00000001 -rx16 0000000000000000 -rx16 0000000000000000 -rx8 00000010 -rxcrc -rxcs 00100010 00000000 -rxeop -# -txsop -txcad 00001010 11110000 1000000000000000 -txcac 00010011 11110010 00000001 -tx16 0011110000000000 -tx16 0011110000000001 -txcrc -txcac 00011001 11110010 00000001 -txcad 00100010 11110000 0000000000000000 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 9: init -C cntl := 0010000000000000 (nf=0,stat=010,nbusy=0) -C data := 1100110000000000 -C fifo := 1100110011000000 -C fifo := 1100110011000001 -C fifo := 1100110011000010 -C fifo := 1100110011000011 -C init (11110000:0000000000000000) noop -C cntl -> 0010000000000000 -C data -> 1100110000000000 -C fifo -> 1100110011000000 -C init (11110000:0000000000000001) clear cntl -C cntl -> 0000000000000000 -C data -> 1100110000000000 -C fifo -> 1100110011000001 -C init (11110000:0000000000000010) clear data -C data -> 0000000000000000 -C fifo -> 1100110011000010 -C init (11110000:0000000000000100) clear fifo -C fifo -> 0101010101010101 ierr=1 -C ==> shows that init is issued and properly decoded -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C wreg: tx: - cmd(00010,010) addr(0001) dl dh ccrc -C wreg: tx: - cmd(00011,010) addr(0010) dl dh ccrc -C wreg: tx: - cmd(00100,010) addr(0010) dl dh ccrc -C wreg: tx: - cmd(00101,010) addr(0010) dl dh ccrc -C wreg: tx: - cmd(00110,010) addr(0010) dl dh ccrc -C init: tx: - cmd(00111,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(01000,000) addr(0000) ccrc -C rreg: tx: - cmd(01001,000) addr(0001) ccrc -C rreg: tx: - cmd(01010,000) addr(0010) ccrc -C init: tx: - cmd(01011,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(01100,000) addr(0000) ccrc -C rreg: tx: - cmd(01101,000) addr(0001) ccrc -C rreg: tx: - cmd(01110,000) addr(0010) ccrc -C init: tx: - cmd(01111,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(10000,000) addr(0001) ccrc -C rreg: tx: - cmd(10001,000) addr(0010) ccrc -C init: tx: - cmd(10010,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(10011,000) addr(0010) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -C -# -rxsop -rxcs 00001010 00000000 -rxcs 00010010 01000000 -rxcs 00011010 01000000 -rxcs 00100010 01000000 -rxcs 00101010 01000000 -rxcs 00110010 01000000 -rxcs 00111110 01000000 -rxcds 01000000 0010000000000000 01000000 -rxcds 01001000 1100110000000000 01000000 -rxcds 01010000 1100110011000000 01000000 -rxcs 01011110 01000000 -rxcds 01100000 0000000000000000 00000000 -rxcds 01101000 1100110000000000 00000000 -rxcds 01110000 1100110011000001 00000000 -rxcs 01111110 00000000 -rxcds 10000000 0000000000000000 00000000 -rxcds 10001000 1100110011000010 00000000 -rxcs 10010110 00000000 -rxcds 10011000 0101010101010101 00000001 -rxeop -# -txsop -txcad 00001010 11110000 0010000000000000 -txcad 00010010 11110001 1100110000000000 -txcad 00011010 11110010 1100110011000000 -txcad 00100010 11110010 1100110011000001 -txcad 00101010 11110010 1100110011000010 -txcad 00110010 11110010 1100110011000011 -txcad 00111110 11110000 0000000000000000 -txca 01000000 11110000 -txca 01001000 11110001 -txca 01010000 11110010 -txcad 01011110 11110000 0000000000000001 -txca 01100000 11110000 -txca 01101000 11110001 -txca 01110000 11110010 -txcad 01111110 11110000 0000000000000010 -txca 10000000 11110001 -txca 10001000 11110010 -txcad 10010110 11110000 0000000000000100 -txca 10011000 11110010 -txeop -# -.iowt 10 -# -C -C cntl := 1111001111111111 (nf=1,stat=111,nbusy=1023) -C cntl -> 1111001111111111 -C init (11110000:0000000000000001) clear cntl -C cntl -> 0000000000000000 -C ==> shows that init completely clears cntl -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C init: tx: - cmd(00011,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00100,000) addr(0000) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 1111001111111111 11100000 -rxcs 00011110 11100000 -rxcds 00100000 0000000000000000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 1111001111111111 -txca 00010000 11110000 -txcad 00011110 11110000 0000000000000001 -txca 00100000 11110000 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 10: rbus busy handling (wreg/rreg via data) -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) -C cntl -> 0000000000000000 -C data := 0011001100000000 -> ncyc=1 -C attn -> 0000000000000001 -C data -> 0011001100000000 -> ncyc=1 -C attn -> 0000000000000001 -C ==> shows that reading register attn returns proper ncyc if no busy -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C wreg: tx: - cmd(00011,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00100,000) addr(0011) ccrc -C rreg: tx: - cmd(00101,000) addr(0001) ccrc -C rreg: tx: - cmd(00110,000) addr(0011) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000000000 00000000 -rxcs 00011010 00000000 -rxcds 00100000 0000000000000001 00000000 -rxcds 00101000 0011001100000000 00000000 -rxcds 00110000 0000000000000001 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000000 -txca 00010000 11110000 -txcad 00011010 11110001 0011001100000000 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 10 -# -C -C - now with nbusy=1 -C cntl := 0000000000000001 (nf=0,stat=000,nbusy=1) -C cntl -> 0000000000000001 -C data := 0011001100000001 -> ncyc=2 -C attn -> 0000000000000010 -C data -> 0011001100000001 -> ncyc=2 -C attn -> 0000000000000010 -C ==> shows that wreg/rreg strech cycle; attn returns proper ncyc -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000000001 00000000 -rxcs 00011010 00000000 -rxcds 00100000 0000000000000010 00000000 -rxcds 00101000 0011001100000001 00000000 -rxcds 00110000 0000000000000010 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000001 -txca 00010000 11110000 -txcad 00011010 11110001 0011001100000001 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 10 -# -C -C - now with nbusy=2 -C cntl := 0000000000000010 (nf=0,stat=000,nbusy=2) -C cntl -> 0000000000000010 -C data := 0011001100000010 -> ncyc=3 -C attn -> 0000000000000011 -C data -> 0011001100000010 -> ncyc=3 -C attn -> 0000000000000011 -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000000010 00000000 -rxcs 00011010 00000000 -rxcds 00100000 0000000000000011 00000000 -rxcds 00101000 0011001100000010 00000000 -rxcds 00110000 0000000000000011 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000010 -txca 00010000 11110000 -txcad 00011010 11110001 0011001100000010 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 10 -# -C -C - now with nbusy=31 (still succeeds) -C cntl := 0000000000011111 (nf=0,stat=000,nbusy=31) -C cntl -> 0000000000011111 -C data := 0011001100011111 -> ncyc=32 -C attn -> 0000000000100000 -C data -> 0011001100011111 -> ncyc=32 -C attn -> 0000000000100000 -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000011111 00000000 -rxcs 00011010 00000000 -rxcds 00100000 0000000000100000 00000000 -rxcds 00101000 0011001100011111 00000000 -rxcds 00110000 0000000000100000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000011111 -txca 00010000 11110000 -txcad 00011010 11110001 0011001100011111 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 20 -# -C -C - now with nbusy=32 (fails with rbnak=1) -C cntl := 0000000000100000 (nf=0,stat=000,nbusy=32) -C cntl -> 0000000000100000 -C data := 0011001100100000 -> ncyc=32, rbnak=1 -C attn -> 0000000000100000 -C data -> 0011001100100000 -> ncyc=32, rbnak=1 -C attn -> 0000000000100000 -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C ==> shows that timeout abort works -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000100000 00000000 -rxcs 00011010 00000010 -rxcds 00100000 0000000000100000 00000000 -rxcds 00101000 0101010101010101 00000010 -rxcds 00110000 0000000000100000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000100000 -txca 00010000 11110000 -txcad 00011010 11110001 0011001100100000 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 20 -# -C -C - now with nbusy=1023 -C cntl := 0000001111111111 (nf=0,stat=000,nbusy=1023) -C cntl -> 0000001111111111 -C data := 0011001111111111 -> ncyc=32,rbnak=1 -C attn -> 0000000000100000 -C data -> 0101010101010101 -> ncyc=32,rbnak=1 -C attn -> 0000000000100000 -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000001111111111 00000000 -rxcs 00011010 00000010 -rxcds 00100000 0000000000100000 00000000 -rxcds 00101000 0101010101010101 00000010 -rxcds 00110000 0000000000100000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000001111111111 -txca 00010000 11110000 -txcad 00011010 11110001 0011001111111111 -txca 00100000 11110011 -txca 00101000 11110001 -txca 00110000 11110011 -txeop -# -.iowt 20 -# -C ----------------------------------------------------------------------------- -C Test 11: rbus busy handling (wblk/rblk via fifo) -C cntl := 0000000000000000 (nf=0,stat=000,nbusy=0) -C cntl -> 0000000000000000 -C write 2 words to fifo -> ncyc=1 -C attn -> 0000000000000001 -C read 2 words from fifo -> ncyc=1 -C attn -> 0000000000000001 -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C wblk: tx: - cmd(00011,011) addr(0010) cnt(2->001) ccrc dl dh .. dcrc -C rreg: tx: - cmd(00100,000) addr(0011) ccrc -C rblk: tx: - cmd(00101,001) addr(0010) cnt(2->001) ccrc -C rreg: tx: - cmd(00110,000) addr(0011) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(011) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(001) cnt dl dh ... stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -C -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000000000 00000000 -rxcs 00011011 00000000 -rxcds 00100000 0000000000000001 00000000 -rx8 00101001 -rx8 00000001 -rx16 0011001100000000 -rx16 0011001100000001 -rx8 00000000 -rxcrc -rxcds 00110000 0000000000000001 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000000 -txca 00010000 11110000 -txcac 00011011 11110010 00000001 -tx16 0011001100000000 -tx16 0011001100000001 -txcrc -txca 00100000 11110011 -txcac 00101001 11110010 00000001 -txca 00110000 11110011 -txeop -# -.iowt 10 -# -C -C - now with nbusy=1 -C cntl := 0000000000000001 (nf=0,stat=000,nbusy=1) -C cntl -> 0000000000000001 -C write 2 words to fifo -> ncyc=2 -C attn -> 0000000000000010 -C read 2 words from fifo -> ncyc=2 -C attn -> 0000000000000010 -C -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000000001 00000000 -rxcs 00011011 00000000 -rxcds 00100000 0000000000000010 00000000 -rx8 00101001 -rx8 00000001 -rx16 0011001100000000 -rx16 0011001100000001 -rx8 00000000 -rxcrc -rxcds 00110000 0000000000000010 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000000001 -txca 00010000 11110000 -txcac 00011011 11110010 00000001 -tx16 0011001100000000 -tx16 0011001100000001 -txcrc -txca 00100000 11110011 -txcac 00101001 11110010 00000001 -txca 00110000 11110011 -txeop -# -.iowt 10 -# -C -C - now with nbusy=31 (still succeeds) -C cntl := 0000000000011111 (nf=0,stat=000,nbusy=31) -C cntl -> 0000000000011111 -C write 2 words to fifo -> ncyc=32 -C attn -> 0000000000100000 -C read 2 words from fifo -> ncyc=32 -C attn -> 0000000000100000 -C -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000011111 00000000 -rxcs 00011011 00000000 -rxcds 00100000 0000000000100000 00000000 -rx8 00101001 -rx8 00000001 -rx16 0011001100000000 -rx16 0011001100000001 -rx8 00000000 -rxcrc -rxcds 00110000 0000000000100000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000011111 -txca 00010000 11110000 -txcac 00011011 11110010 00000001 -tx16 0011001100000000 -tx16 0011001100000001 -txcrc -txca 00100000 11110011 -txcac 00101001 11110010 00000001 -txca 00110000 11110011 -txeop -# -.iowt 20 -# -C -C - now with nbusy=32 (fails with rbnak=1) -C cntl := 0000000000100000 (nf=0,stat=000,nbusy=32) -C cntl -> 0000000000100000 -C write 2 words to fifo -> ncyc=32,rbnak=1 -C attn -> 0000000000100000 -C read 2 words from fifo -> ncyc=32,rbnak=1 -C attn -> 0000000000100000 -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000100000 00000000 -rxcs 00011011 00000010 -rxcds 00100000 0000000000100000 00000000 -rx8 00101001 -rx8 00000001 -rx16 0101010101010101 -rx16 0101010101010101 -rx8 00000010 -rxcrc -rxcds 00110000 0000000000100000 00000000 -rxeop -# -txsop -txcad 00001010 11110000 0000000000100000 -txca 00010000 11110000 -txcac 00011011 11110010 00000001 -tx16 0011001100000000 -tx16 0011001100000001 -txcrc -txca 00100000 11110011 -txcac 00101001 11110010 00000001 -txca 00110000 11110011 -txeop -# -.iowt 20 -# -C ----------------------------------------------------------------------------- -C Test 12a: rbus delay non-ack handling (wreg/rreg via disabled fifo) -C cntl := 1000000000000011 (nf=1,stat=000,nbusy=3) -C cntl -> 1000000000000011 -C data := 1111000000000011 -> ncyc=4,rbnak=1 -C attn -> 0000000000000100 -C data -> 0000000000000000 -> ncyc=4,rbnak=1 -C attn -> 0000000000000100 -C init (11110000:0000000000000111) clear all -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(1),rberr(0) -> 00000010 -C ==> shows that cycle can be first stretched and than aborted -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C wreg: tx: - cmd(00011,010) addr(0010) dl dh ccrc -C rreg: tx: - cmd(00100,000) addr(0011) ccrc -C rreg: tx: - cmd(00101,000) addr(0010) ccrc -C rreg: tx: - cmd(00110,000) addr(0011) ccrc -C init: tx: - cmd(00111,110) addr(0000) dl dh ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - eop -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 1000000000000011 00000000 -rxcs 00011010 00000010 -rxcds 00100000 0000000000000100 00000000 -rxcds 00101000 0000000000000000 00000010 -rxcds 00110000 0000000000000100 00000000 -rxcs 00111110 00000000 -rxeop -# -txsop -txcad 00001010 11110000 1000000000000011 -txca 00010000 11110000 -txcad 00011010 11110010 1111000000000011 -txca 00100000 11110011 -txca 00101000 11110010 -txca 00110000 11110011 -txcad 00111110 11110000 0000000000000111 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 12b: rbus delay non-ack handling (wbk/rblk via disabled fifo) -C cntl := 1000000000000011 (nf=1,stat=000,nbusy=3) -C cntl -> 1000000000000011 -C write 2 words to fifo -> ncyc=3,rbnak=1 -C attn -> 0000000000000100 -C read 2 words from fifo -> ncyc=3,rbnak=1 -C attn -> 0000000000000100 -C init (11110000:0000000000000111) clear all -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C wblk: tx: - cmd(00011,011) addr(0010) cnt(2->001) ccrc dl dh .. dcrc -C rreg: tx: - cmd(00100,000) addr(0011) ccrc -C rblk: tx: - cmd(00101,001) addr(0010) cnt(2->001) ccrc -C rreg: tx: - cmd(00110,000) addr(0011) ccrc -C init: tx: - cmd(00111,110) addr(0000) dl dh ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(011) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(001) cnt dl dh ... stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - eop -C -rxsop -rxcs 00001010 00000000 -rxcds 00010000 1000000000000011 00000000 -rxcs 00011011 00000010 -rxcds 00100000 0000000000000100 00000000 -rx8 00101001 -rx8 00000001 -rx16 0000000000000000 -rx16 0000000000000000 -rx8 00000010 -rxcrc -rxcds 00110000 0000000000000100 00000000 -rxcs 00111110 00000000 -rxeop -# -txsop -txcad 00001010 11110000 1000000000000011 -txca 00010000 11110000 -txcac 00011011 11110010 00000001 -tx16 1111000000000000 -tx16 1111000000000001 -txcrc -txca 00100000 11110011 -txcac 00101001 11110010 00000001 -txca 00110000 11110011 -txcad 00111110 11110000 0000000000000111 -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 13a: attention logic (via asynchronous LAM from test bench) -C .attn 0000000000000000 -C cmd attn returns 0000000000000000, stat=00000000 -C .attn 1000000000000000 -C cmd attn returns 1000000000000000, stat=00000000 -C cmd attn returns 0000000000000000, stat=00000000 -C .attn 0100000000000000 -C .attn 0010000000000000 -C cmd attn returns 0110000000000000, stat=00000000 -C cmd attn returns 0000000000000000, stat=00000000 -C -C ==> shows that attn command works properly -C -C .attn 0000000000000000 -C attn: tx: sop - cmd(00001,101) ccrc - eop -C rx: sop - cmd(101) dl dh stat crc - eop -# -.attn 0000000000000000 -rxsop -rxcds 00001101 0000000000000000 00000000 -rxeop -txsop -txc 00001101 -txeop -.iowt 10 -C +C Test A2.1: test attn (simplest cmd, no rbus access) C .attn 1000000000000000 -C attn: tx: sop - cmd(00010,101) ccrc -C attn: tx: - cmd(00011,101) ccrc - eop -C rx: sop - cmd(101) dl dh stat crc -C rx: - cmd(101) dl dh stat crc - eop +C attn: tx: sop - cmd(attn,1) ccrc +C attn: tx: - cmd(attn,2) ccrc - eop +C rx: sop - cmd(attn,1) dl dh stat crc +C rx: - cmd(attn,2) dl dh stat crc - eop # .attn 1000000000000000 rxsop -rxcds 00010101 1000000000000000 00000000 -rxcds 00011101 0000000000000000 00000000 +rxcds attn,1 1000000000000000 00000000 +rxcds attn,2 0000000000000000 00000000 rxeop txsop -txc 00010101 -txc 00011101 +txc attn,1 +txc attn,2 txeop .iowt 10 -C -C .attn 0100000000000000 -C .attn 0110000000000000 -C attn: tx: sop - cmd(00100,101) ccrc -C attn: tx: - cmd(00101,101) ccrc - eop -C rx: sop - cmd(101) dl dh stat crc -C rx: - cmd(101) dl dh stat crc - eop -C -# -.attn 0100000000000000 -.attn 0010000000000000 -rxsop -rxcds 00100101 0110000000000000 00000000 -rxcds 00101101 0000000000000000 00000000 -rxeop -txsop -txc 00100101 -txc 00101101 -txeop -.iowt 10 # C ----------------------------------------------------------------------------- -C Test 13b: attention logic (via synchronous LAM from rbd_tester) -C attn := 0000000000000000 stat=00000000 -C cmd attn returns 0000000000000000, stat=00000000 -C attn := 0000000000000001 stat=00010000 -C cmd attn returns 0000000000000001, stat=00000000 -C cmd attn returns 0000000000000000, stat=00000000 -C attn := 0000000000000010 stat=00010000 -C attn := 0000000000000100 stat=00010000 -C cmd attn returns 0000000000000110, stat=00000000 -C cmd attn returns 0000000000000000, stat=00000000 -C -C stat: stat(000),attn(1),cerr(0),derr(0),rbnak(0),rberr(0) -> 00010000 -C ==> shows that attn command works properly -C ==> shows that attn register in tb_rlink triggers RB_LAM -C -C wreg: tx: sop - cmd(00001,010) addr(0011) dl dh ccrc -C attn: tx: - cmd(00010,101) ccrc -C wreg: tx: - cmd(00011,010) addr(0011) dl dh ccrc -C attn: tx: - cmd(00100,101) ccrc -C attn: tx: - cmd(00101,101) ccrc -C wreg: tx: - cmd(00110,010) addr(0011) dl dh ccrc -C wreg: tx: - cmd(00111,010) addr(0011) dl dh ccrc -C attn: tx: - cmd(01000,101) ccrc -C attn: tx: - cmd(01001,101) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(010) stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - eop -C +C Test A2.2: wreg(data) -> shows that rlink can write a register +C data := x"1111" +C wreg: tx: sop - cmd(wreg,3) addr(00f1) dl dh ccrc - eop +C rx: sop - cmd(wreg,3) stat crc - eop # rxsop -rxcs 00001010 00000000 -rxcds 00010101 0000000000000000 00000000 -rxcs 00011010 00010000 -rxcds 00100101 0000000000000001 00000000 -rxcds 00101101 0000000000000000 00000000 -rxcs 00110010 00010000 -rxcs 00111010 00010000 -rxcds 01000101 0000000000000110 00000000 -rxcds 01001101 0000000000000000 00000000 +rxcs wreg,3 00000000 rxeop # txsop -txcad 00001010 11110011 0000000000000000 -txc 00010101 -txcad 00011010 11110011 0000000000000001 -txc 00100101 -txc 00101101 -txcad 00110010 11110011 0000000000000010 -txcad 00111010 11110011 0000000000000100 -txc 01000101 -txc 01001101 +txcad wreg,3 x"ffe4" x"1111" txeop # .iowt 10 # C ----------------------------------------------------------------------------- -C Test 14: attn poll -C send 2 attn commas, get 2 idle chars -C attn := 0000000000001000 stat=00010000 -C send 2 attn commas, get 2 attn chars -C cmd attn returns 0000000000001000, stat=00010000 -C send 2 attn commas, get 2 idle chars -C -C send 2 , expect two back -C -C oof: tx: attn - attn -C rx: idle - idle -C -rxidle -rxidle -txattn -txattn -.iowt 10 -C -C write attn register, set attn bit and flag -C -C wreg: tx: sop - cmd(00001,010) addr(0011) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop -C +C Test A2.3: rreg(data) -> shows that rlink can read back a register +C data -> x"1111" +C rreg: tx: sop - cmd(rreg,4) addr(00f1) ccrc - eop +C rx: sop - cmd(rreg,4) dl dh stat crc - eop +# rxsop -rxcs 00001010 00010000 +rxcds rreg,4 x"1111" 00000000 rxeop +# txsop -txcad 00001010 11110011 0000000000001000 +txca rreg,4 x"ffe4" txeop +# .iowt 10 -C -C send 2 , expect two back -C -C oof: tx: attn - attn -C rx: attn - attn -C -rxattn -rxattn -txattn -txattn -.iowt 10 -C -C send attn cmd, read and clear attn bits and flag -C -C attn: tx: - cmd(00010,101) ccrc - eop -C rx: - cmd(101) dl dh stat crc - eop -C -rxsop -rxcds 00010101 0000000000001000 00000000 -rxeop -txsop -txc 00010101 -txeop -.iowt 10 -C -C send 2 , expect two back -C -C oof: tx: attn - attn -C rx: idle - idle -C -rxidle -rxidle -txattn -txattn +# +C ============================================================================= +C Section A3: Check-out rbd_tester basics with wreg,rreg +C from now use lists and high level commands +C ----------------------------------------------------------------------------- +C Test A3.1: wreg(data) + rreg(data) list +# +sop +wreg 0 x"ffe4" x"f0f0" 00000000 -- data := f0f0 +rreg 1 x"ffe4" x"f0f0" 00000000 -- data >? f0f0 +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 15a: enable and test asynchronous attn notification (when idle) -C init (11111111:1000000000000000) noop -C anena(1), itoena(0), ito(0) -> 11111111,1000000000000000 -C .attn 0001000000000000 -C --> will be send -C cmd attn returns 0001000000000000, stat=00000000 -C -C ==> shows that internal init works -C ==> shows asynchronous attn notification works -C -C init: tx: sob - cmd(00001,110) addr(11111111) dl dh ccrc - eop -C rx: sob - cmd(110) stat crc - eop -C -rxsop -rxcs 00001110 00000000 -rxeop -txsop -txcad 00001110 11111111 1000000000000000 -txeop -.iowt 10 -C -C now ping an attention line, expect out-of-frame attn symbol -C .attn 0001000000000000 -C rx: attn -C -.wait 20 -rxattn -.attn 0001000000000000 -.wait 20 -.iowt 10 -C -C attn: tx: - cmd(00010,101) ccrc - eop -C rx: - cmd(101) dl dh stat crc - eop -C -rxsop -rxcds 00010101 0001000000000000 00000000 -rxeop -txsop -txc 00010101 -txeop +C Test A3.2: check cntl write/read +# +sop +wreg 2 x"ffe0" x"ffff" 00000000 -- cntl := ffff +rreg 3 x"ffe0" x"83ff" 00000000 -- cntl >? (wchk=1,nbusy=3ff) +wreg 4 x"ffe0" x"0000" 00000000 -- cntl := ffff +rreg 5 x"ffe0" x"0000" 00000000 -- cntl >? (wchk=0,nbusy=0) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 15b: enable and test asynchronous attn notification (when in packet) -C attn := 0000000000010000 stat=00010000 -C --> will be send after eop -C cmd attn returns 0000000000010000, stat=00000000 -C -C ==> shows asynchronous attn notification comes after eop -C -C write attn register, set attn bit and flag, expect comma after -C -C wreg: tx: sop - cmd(00001,010) addr(0011) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop -C rx: attn -C -rxsop -rxcs 00001010 00010000 -rxeop -rxattn -txsop -txcad 00001010 11110011 0000000000010000 -txeop -.iowt 10 -C -C send attn cmd, read and clear attn bits and flag -C -C attn: tx: - cmd(00010,101) ccrc - eop -C rx: - cmd(101) dl dh stat crc - eop -C -rxsop -rxcds 00010101 0000000000010000 00000000 -rxeop -txsop -txc 00010101 -txeop -.iowt 10 +C Test A3.3: check stat write/read (and that RB_STAT is retured) # +sop +wreg 2 x"ffe1" x"ffff" 00000000 -- stat := ffff +rreg 3 x"ffe1" x"000f" 11110000 -- stat >? 000f {stat=1111} +wreg 4 x"ffe1" x"0000" 11110000 -- stat := 0000 {stat=1111} +rreg 5 x"ffe1" x"0000" 00000000 -- stat >? 0000 +eop +.iowt 10 C ----------------------------------------------------------------------------- -C Test 16: ccrc error abort for attn,init -C -C attn: tx: sop - cmd(00001,101) *BAD CRC - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00001101 -txbad -txeop -# -.iowt 10 -# -C -C init: tx: - cmd(00010,110) addr(0000) dl dh ccrc -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010110 -tx8 11110000 -tx8 00000000 -tx8 00000000 -txbad -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 17: enable and test idle timeout -C init (11111111:1100000000001001) -C anena(1), itoena(1), ito(9) -> 11111111,1100000000001001 -C ito=9 --> divider=10; ce_xsec div is 1:20 --> total every 200 cycles -C --> send every 200 cycles -C .attn 0000100000000000 -C --> send every 200 cycles -C cmd attn returns 0000100000000000, stat=00000000 -C --> send every 200 cycles -C init (11111111:0000000000000000) -C -C first init (11111111:1100000000001001) -> enable idle timeout -C -C init: tx: sob - cmd(00001,110) addr(00000011) dl dh ccrc - eop -C rx: sob - cmd(110) stat crc - eop -C rx: idle (every 200 cycles) -C .attn 0000100000000000 -C rx: attn (every 200 cycles) -C -rxsop -rxcs 00001110 00000000 -rxeop -rxidle -rxidle -txsop -txcad 00001110 11111111 1100000000001001 -txeop -.iowt 10 -.wait 500 -C -C set attn bits, now send (1 prompt, 2 more every 200 cycles) -C -rxattn -rxattn -rxattn -.attn 0000100000000000 -.wait 500 -C -C send attn cmd, read and clear attn bits and flag -C -C attn: tx: - cmd(00010,101) ccrc - eop -C rx: - cmd(101) dl dh stat crc - eop -C rx: idle (every 200 cycles) -C -rxsop -rxcds 00010101 0000100000000000 00000000 -rxeop -rxidle -rxidle -txsop -txc 00010101 -txeop -.iowt 10 -.wait 500 -C -C second init (11111111:0000000000000000) -> disable idle timeout -C -C init: tx: sob - cmd(00011,110) addr(00000011) dl dh ccrc - eop -C rx: sob - cmd(110) stat crc - eop -C -rxsop -rxcs 00001110 00000000 -rxeop -txsop -txcad 00001110 11111111 0000000000000000 -txeop -.iowt 10 -C -C wait to be sure there are no more or comming -C -.wait 300 -# -C ----------------------------------------------------------------------------- -C Test 18a: verify that commas are tolerated at any state: wreg/rreg -C do wreg+rreg, with between all command bytes send -C use as data 1000000 and 10000001 to force escaping here -C -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0001) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 1000000010000001 00000000 -rxeop -# -txidle -txsop -txidle -tx8 00001010 -txidle -tx8 11110001 -txidle -tx8 10000001 -txidle -txidle -tx8 10000000 -txidle -txcrc -txidle -tx8 00010000 -txidle -txidle -txidle -tx8 11110001 -txidle -txcrc -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 18b: verify that commas are tolerated at any state: wblk/rblk -C do wblk+rblk, with between all command bytes send -C use as data 1000000 to 10000011 to force escaping here -C -C wblk: tx: sop - cmd(00001,011) addr(0010) cnt(2->001) ccrc dl dh .. dcrc -C rblk: tx: - cmd(00010,001) addr(0010) cnt(2->001) ccrc -C tx: - eop -C rx: sop - cmd(011) stat crc -C rx: - cmd(001) cnt dl dh ... stat crc -C rx: - eop -# -rxsop -rxcs 00001011 00000000 -rx8 00010001 -rx8 00000001 -rx16 1000000010000001 -rx16 1000001010000011 -rx8 00000000 -rxcrc -rxeop -# -# wblk -txidle -txsop -txidle -tx8 00001011 -txidle -tx8 11110010 -txidle -tx8 00000001 -txidle -txcrc -txidle -tx8 10000001 -txidle -tx8 10000000 -txidle -tx8 10000011 -txidle -tx8 10000010 -txidle -txcrc -# rblk -txidle -tx8 00010001 -txidle -tx8 11110010 -txidle -tx8 00000001 -txidle -txcrc -txidle -txeop -txidle -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 18c: verify that commas are tolerated at any state: stat,attn,init -C cntl := 0000000000001111 -C cntl -> 0000000000001111 -C cmd stat -C cmd attn -C cmd init (11110000:0000000000000001) clear cntl -C cntl -> 0000000000000000 -C -C wreg: tx: sop - cmd(00001,010) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00010,000) addr(0000) ccrc -C stat: tx: - cmd(00011,100) ccrc -C attn: tx: - cmd(00100,101) ccrc -C init: tx: - cmd(00101,110) addr(0000) dl dh ccrc -C rreg: tx: - cmd(00110,000) addr(0000) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - cmd(100) ccmd(010) dl dh stat crc -C rx: - cmd(101) dl dh stat crc -C rx: - cmd(110) stat crc -C rx: - cmd(000) dl dh stat crc -C rx: - eop -C -# -rxsop -rxcs 00001010 00000000 -rxcds 00010000 0000000000001111 00000000 -rxccd 00011100 00010000 0000000000001111 00000000 -rxcds 00100101 0000000000000000 00000000 -rxcs 00101110 00000000 -rxcds 00110000 0000000000000000 00000000 -rxeop -# -txsop -# wreg -txidle -txcad 00001010 11110000 0000000000001111 -# rreg -txidle -txca 00010000 11110000 -txidle -# stat -tx8 00011100 -txidle -txcrc -# attn -txidle -tx8 00100101 -txidle -txcrc -# init -txidle -tx8 00101110 -txidle -tx8 11110000 -txidle -tx8 00000001 -txidle -tx8 00000000 -txidle -txcrc -# rreg -txidle -txca 00110000 11110000 -txidle -txeop -# -.iowt 10 -# -C ----------------------------------------------------------------------------- -C Test 19: sop - eop framing -C test all sequences of sop and eop and nak -C -C 1. sop-eop ==> sop-eop (empty packet) -C tx: sop - eop -C rx: sop - eop -C -rxsop -rxeop -# -txsop -txeop -.iowt 10 -C -C 2. eop ==> nak-eop (out-of-order eop, gives nak) -C tx: eop -C rx: nak - eop -C tx: sop - eop -C rx: sop - eop -C -rxnak -rxeop -txeop -# -.iowt 20 -rxsop -rxeop -txsop -txeop -.iowt 10 -C -C 3. sop - sop - eop ==> sop-nak-eop (out-of-order sop, gives nak) -C tx: sop - sop - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# (use txoof for 2nd sop to avoid the side effects of txsop ) -txsop -txoof 100000001 -txeop -.iowt 10 -C -C 4. sop - nak - eop ==> sop-nak-eop (nak is echoed) -C tx: sop - nak - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop +C Test A3.4: check attn write/read (also RB_LAM is driven; also rberr in rreg) # -txsop -txoof 100000011 -txeop +sop +wreg 6 x"ffe2" x"beaf" 00001000 -- attn := 5555 {attn=1} +rreg 7 x"ffe2" x"5555" 00001001 -- attn >? 5555 {attn=1,err=1} +attn 8 x"beaf" 00000000 -- >? beaf (attn pattern) +attn 8 x"0000" 00000000 -- >? 0000 (cleared on reread) +eop .iowt 10 -C -C 5. nak ==> {ignored} (out-of-order nak is ignored) -C tx: nak -C tx: sop - eop -C rx: sop - eop -C -rxsop -rxeop +# +C ----------------------------------------------------------------------------- +C Test A3.5: check ncyc write/read (also rberr in wreg) # -txoof 100000011 -txsop -txeop +sop +wreg 9 x"ffe4" x"beaf" 00000000 -- data := beaf +rreg 10 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (nbusy is 0!) +wreg 11 x"ffe3" x"dead" 00000001 -- ncyc := dead {err=1} +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 20: unused command code '111' gives a nak and transits to error state -C 1. do '111' command (will abort with nak) -C 2. do rreg command (will be ignored) -C -C 111: tx: sop - '111' -C rreg: tx: - cmd(00010,000) addr(0001) ccrc -C tx: - eop -C rx: sop - nak -C rx: - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00000111 -txca 00010000 11110001 -txeop -.iowt 20 -# -C ----------------------------------------------------------------------------- -C Test 21a: eop aborts of wreg -C -C 0. write all-1s to data register and read back to initialize context -C wreg: tx: sop - cmd(11110,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(11111,000) addr(0001) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: sop - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 11110010 00000000 -rxcds 11111000 1111111111111111 00000000 -rxeop -# -txsop -txcad 11110010 11110001 1111111111111111 -txca 11111000 11110001 -txeop -# -.iowt 10 -# -C -C 1a. abort after cmd -C wreg: tx: sop - cmd(00001,010) [[addr(0001) dl dh ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00100010 -txeop -.iowt 20 -C -C 1b. check stat -C stat: stat(000),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 00001000 -C stat: tx: sop - cmd(00110,100) ccrc - eop -C rx: sop - cmd(100) ccmd(000) dl dh stat crc - eop -C -# -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 2a. abort after addr -C wreg: tx: sop - cmd(00001,010) addr(0001) [[dl dh ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -txeop -.iowt 20 -C -C 2b. check stat (stat as for 1a.) -C -# -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 3a. abort after dl -C wreg: tx: sop - cmd(00001,010) addr(0001) dl [[dh ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -txeop -.iowt 20 -C -C 3b. check stat (stat as for 1a.) -C -# -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 4a. abort after dh -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh [[ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -tx8 11000000 -txeop -.iowt 20 -C -C 4b. check stat (stat as for 1a.) -C -# -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 5a. finally just normal wreg to data register -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop -C -# -rxsop -rxcs 00001010 00000000 -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -tx8 11000000 -txcrc -txeop -.iowt 10 -C -C 5b. check stat (now cerr=0 again) -C -# -rxsop -rxccd 00110100 00001010 1111111111111111 00000000 -rxeop -txsop -txc 00110100 -txeop +C Test A3.6: check dinc read +# +sop +wreg 12 x"ffe4" x"1100" 00000000 -- data := 1100 +rreg 13 x"ffe5" x"1100" 00000000 -- dinc >? 1100 +rreg 14 x"ffe5" x"1101" 00000000 -- dinc >? 1101 +rreg 15 x"ffe5" x"1102" 00000000 -- dinc >? 1102 +rreg 16 x"ffe4" x"1103" 00000000 -- data >? 1103 +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21b: eop aborts of rreg -C -C 1a. abort after cmd -C rreg: tx: sop - cmd(00001,000) [[addr(0001) ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001000 -txeop -.iowt 20 -C -C 1b. check stat (cerr=1, last successfull command in Test 21a/5a) -C -# -rxsop -rxccd 00110100 00001010 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop +C Test A3.7: check dinc write (and wchk) +# +sop +wreg 17 x"ffe4" x"1200" 00000000 -- data := 1200 +wreg 18 x"ffe5" x"1200" 00000000 -- dinc := 1200 +wreg 19 x"ffe5" x"1201" 00000000 -- dinc := 1201 +wreg 20 x"ffe5" x"1202" 00000000 -- dinc := 1202 +rreg 21 x"ffe4" x"1203" 00000000 -- data >? 1203 +rreg 22 x"ffe0" x"0000" 00000000 -- cntl >? (wchk=0) +eop .iowt 10 # -C -C 2a. abort after addr -C rreg: tx: sop - cmd(00001,000) addr(0001) [[ccrc]] - eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001000 -tx8 11110001 -txeop -.iowt 20 -C -C 2b. check stat (cerr=1) -C -# -rxsop -rxccd 00110100 00001010 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 3a. finally just normal rreg from data register -C rreg: tx: sop - cmd(00001,000) addr(0001) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop -C -# -rxsop -rxcds 00001000 1100000000000011 00000000 -rxeop -# -txsop -tx8 00001000 -tx8 11110001 -txcrc -txeop -.iowt 10 -C -C 3b. check stat (cerr=0 again) -C -# -rxsop -rxccd 00110100 00001000 1100000000000011 00000000 -rxeop -txsop -txc 00110100 -txeop +sop +wreg 23 x"ffe5" x"f203" 00000000 -- dinc := f203 (should be 1203!) +wreg 24 x"ffe5" x"1204" 00000000 -- dinc := 1204 (ok again) +rreg 25 x"ffe0" x"8000" 00000000 -- cntl >? (wchk=1) +rreg 26 x"ffe4" x"1205" 00000000 -- data >? 1205 +wreg 27 x"ffe4" x"1300" 00000000 -- data := 1300 (clears wchk) +rreg 28 x"ffe0" x"0000" 00000000 -- cntl >? (wchk=0) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21c: eop aborts of wblk (with cnt=2) -C -C 1a. abort after cmd -C wreg: tx: sop - cmd(00001,011) [[addr cnt(2->001) ccrc dl dh dl dh dcrc]] -eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001011 -txeop -.iowt 20 -C -C 1b. check stat (cerr=1) -C stat: stat(000),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 00001000 -C -# -rxsop -rxccd 00110100 00001000 1100000000000011 00001000 -rxeop -txsop -txc 00110100 -txeop -.iowt 10 -C -C 2a. abort after addr -C wreg: tx: sop - cmd(00001,011) addr [[cnt(2->001) ccrc dl dh dl dh dcrc]] -eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001011 -tx8 11110010 -txeop -.iowt 20 -C -C 2b. check stat (cerr=1) -C -# -rxsop -rxccd 11110100 00001000 1100000000000011 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 3a. abort after cnt -C wreg: tx: sop - cmd(00001,011) addr cnt(2->001) [[ccrc dl dh dl dh dcrc]] -eop -C rx: sop - nak - eop -C -# -rxsop -rxnak -rxeop -# -txsop -tx8 00001011 -tx8 11110010 -tx8 00000001 -txeop -.iowt 20 -C -C 3b. check stat (cerr=1) -C -# -rxsop -rxccd 11110100 00001000 1100000000000011 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 4a. abort after ccrc -C wreg: tx: sop - cmd(00001,011) addr cnt(2->001) ccrc [[dl dh dl dh dcrc]] -eop -C rx: sop - cmd(011) - nak - eop -C -# -rxsop -rx8 00001011 -rxnak -rxeop -# -txsop -tx8 00001011 -tx8 11110010 -tx8 00000001 -txcrc -txeop -.iowt 10 -C -C 4b. check stat (ccmd is wblk now; cerr=0,derr=1) -C stat: stat(000),attn(0),cerr(0),derr(1),rbnak(0),rberr(0) -> 00000100 -C -# -rxsop -rxccd 11110100 00001011 1100000000000011 00000100 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 5a. abort after 1st dl -C wreg: tx: sop - cmd(00010,011) addr cnt(2->001) ccrc dl [[dh dl dh dcrc]] -eop -C rx: sop - cmd(011) - nak - eop -C -# -rxsop -rx8 00010011 -rxnak -rxeop -# -txsop -tx8 00010011 -tx8 11110010 -tx8 00000001 -txcrc -tx8 00000001 -txeop -.iowt 20 -C -C 5b. check stat (ccmd is wblk now; cerr=0,derr=1) -C -# -rxsop -rxccd 11110100 00010011 1100000000000011 00000100 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 6a. abort after 1st dh -C wreg: tx: sop - cmd(00011,011) addr cnt(2->001) ccrc dl dh [[dl dh dcrc]] -eop -C rx: sop - cmd(011) - nak - eop -C -# -rxsop -rx8 00011011 -rxnak -rxeop -# -txsop -tx8 00011011 -tx8 11110010 -tx8 00000001 -txcrc -tx8 00000001 -tx8 00011011 -txeop -.iowt 20 -C -C 6b. check stat (ccmd is wblk now; cerr=0,derr=1) -C -# -rxsop -rxccd 11110100 00011011 1100000000000011 00000100 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 7a. abort after 2nd dl -C wreg: tx: sop - cmd(00100,011) addr cnt(2->001) ccrc dl dh dl [[dh dcrc]] -eop -C rx: sop - cmd(011) - nak - eop -C -# -rxsop -rx8 00100011 -rxnak -rxeop -# -txsop -tx8 00100011 -tx8 11110010 -tx8 00000001 -txcrc -tx8 00000001 -tx8 00100011 -tx8 00000010 -txeop -.iowt 20 -C -C 7b. check stat (ccmd is wblk now; cerr=0,derr=1) -C -# -rxsop -rxccd 11110100 00100011 1100000000000011 00000100 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 8a. abort after 2nd dh -C wreg: tx: sop - cmd(00101,011) addr cnt(2->001) ccrc dl dh dl dh [[dcrc]] -eop -C rx: sop - cmd(011) - nak - eop -C -# -rxsop -rx8 00101011 -rxnak -rxeop -# -txsop -tx8 00101011 -tx8 11110010 -tx8 00000001 -txcrc -tx8 00000001 -tx8 00101011 -tx8 00000010 -tx8 00101011 -txeop -.iowt 20 -C -C 8b. check stat (ccmd is wblk now; cerr=0,derr=1) -C -# -rxsop -rxccd 11110100 00101011 1100000000000011 00000100 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 9a. finally complete wblk without about, for a change -C wreg: tx: sop - cmd(00110,011) addr cnt(2->001) ccrc dl dh dl dh dcrc - eop -C rx: sop - cmd(011) stat crc - eop -C -# -rxsop -rx8 00101011 -rx8 00000000 -rxcrc -rxeop -# -txsop -tx8 00101011 -tx8 11110010 -tx8 00000001 -txcrc -tx8 00000001 -tx8 00110011 -tx8 00000010 -tx8 00110011 -txcrc -txeop -.iowt 10 -C -C 10. now read back fifo, it will contain data from partially done wblk's -C 6a: 00011011 00000001 -C 7a: 00100011 00000001 -C 8a: 00101011 00000001 -C 00101011 00000010 -C 9a: 00110011 00000001 -C 00110011 00000010 -C --> read back 7 words, gives the above 6 plus '0101...' and a rberr=1 -C -C rblk: tx: sop - cmd(00111,001) addr(0010) cnt(7->110) ccrc - eop -C rx: sop - cmd(001) cnt dl dh ... stat crc - eop -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(0),rberr(1) -> 00000001 -C -rxsop -rx8 00111001 -rx8 00000110 -rx16 0001101100000001 -rx16 0010001100000001 -rx16 0010101100000001 -rx16 0010101100000010 -rx16 0011001100000001 -rx16 0011001100000010 -rx16 0101010101010101 -rx8 00000001 -rxcrc -rxeop -# -txsop -txcac 00111001 11110010 00000110 -txeop -# +C Test A3.8: check fifo write/read (and rberr for rreg) +# +sop +rreg 0 x"ffe6" x"5555" 00000001 -- fifo >? 5555 {err=1} (fifo empty) +wreg 1 x"ffe6" x"1400" 00000000 -- fifo := 1400 +wreg 2 x"ffe6" x"1401" 00000000 -- fifo := 1401 +wreg 3 x"ffe6" x"1402" 00000000 -- fifo := 1402 +rreg 4 x"ffe6" x"1400" 00000000 -- fifo >? 1400 +rreg 5 x"ffe6" x"1401" 00000000 -- fifo >? 1400 +rreg 6 x"ffe6" x"1402" 00000000 -- fifo >? 1400 +rreg 7 x"ffe6" x"5555" 00000001 -- fifo >? 5555 {err=1} (fifo empty) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21d: eop aborts of rblk (with cnt=2) -C -C 1. to prepare write 2 words into fifo -C wreg: tx: sop - cmd(00001,011) addr cnt(2->001) ccrc dl dh dl dh dcrc - eop -C rx: sop - cmd(011) stat crc - eop -C -# -rxsop -rxcs 00001011 00000000 -rxeop -# -txsop -txcac 00001011 11110010 00000001 -tx16 1111111100000000 -tx16 1111111100000001 -txcrc -txeop -.iowt 10 -# -C -C 2a. abort after cmd -C rblk: tx: sop - cmd(00010,001) [[addr(0010) cnt(2->001) ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010001 -txeop -.iowt 20 -# -C -C 2b. check stat (cerr=1) -C -# -rxsop -rxccd 11110100 00001011 0101010101010101 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -# -C -C 3a. abort after addr -C rblk: tx: sop - cmd(00011,001) addr(0010) [[cnt(2->001) ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00011001 -tx8 11110010 -txeop -.iowt 20 -# -C -C 3b. check stat (cerr=1) -C -# -rxsop -rxccd 11110100 00001011 0101010101010101 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 4a. abort after cnt -C rblk: tx: sop - cmd(00100,001) addr(0010) cnt(2->001) [[ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00100001 -tx8 11110010 -tx8 00000001 -txeop -.iowt 20 -# -C -C 4b. check stat (cerr=1) -C -# -rxsop -rxccd 11110100 00001011 0101010101010101 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -# -C -C 5a. finally do successful rblk -C rblk: tx: sop - cmd(00101,001) addr(0010) cnt(2->001) ccrc - eop -C rx: sop - cmd(001) cnt dl dh ... stat crc - eop -C -rxsop -rx8 00101001 -rx8 00000001 -rx16 1111111100000000 -rx16 1111111100000001 -rx8 00000000 -rxcrc -rxeop -# -txsop -tx8 00101001 -tx8 11110010 -tx8 00000001 -txcrc -txeop -.iowt 10 -# -C -C 5b. check stat (cerr=0) -C -# -rxsop -rxccd 11110100 00101001 1111111100000001 00000000 -rxeop -txsop -txc 11110100 -txeop +C Test A3.9: check lnak write/read (and rbnak for rreg and wreg) +# +sop +wreg 0 x"ffe7" x"aaaa" 00000010 -- lnak >? aaaa {nak=1} +rreg 1 x"ffe7" x"5555" 00000010 -- lnak >? 5555 {nak=1} +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21e: eop aborts of stat -C -C 1. abort after cmd -C rblk: tx: sop - cmd(00001,100) [[ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop +C Test A3.10: check nbusy (use nbusy=4) +# +C with data +sop +wreg 0 x"ffe0" x"0004" 00000000 -- cntl := (nbusy=4) +wreg 1 x"ffe4" x"1234" 00000000 -- data := 1234 +rreg 2 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +rreg 3 x"ffe4" x"1234" 00000000 -- data >? 1234 +rreg 4 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +eop +.iowt 10 # -txsop -tx8 00001100 -txeop -.iowt 20 +C with dinc +sop +wreg 0 x"ffe5" x"1234" 00000000 -- dinc := 1234 +rreg 1 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +rreg 2 x"ffe5" x"1235" 00000000 -- dinc >? 1235 +rreg 3 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +eop +.iowt 10 # -C -C 2. normal stat, finally -C rblk: tx: sop - cmd(00010,100) [[ccrc]] - eop -C rx: sop - cmd(100) ccmd(001) dl dh stat crc -C -C stat: stat(000),attn(0),cerr(0),derr(0),rbnak(0),rberr(0) -> 00000000 -C --> Note: stat commands don't the status -C --> no cerr bit set here, despite the failed stat above !! -C -rxsop -rx8 00010100 -rx8 00101001 -rx16 1111111100000001 -rx8 00000000 -rxcrc -rxeop +C with fifo +sop +wreg 0 x"ffe6" x"3300" 00000000 -- fifo := 3300 +rreg 1 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +rreg 2 x"ffe6" x"3300" 00000000 -- fifo >? 3300 +rreg 3 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +eop +.iowt 10 # -txsop -tx8 00010100 -txcrc -txeop +C with lnak +sop +wreg 0 x"ffe7" x"aaaa" 00000010 -- lnak := aaaa {nak=1} +rreg 1 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +rreg 2 x"ffe7" x"5555" 00000010 -- lnak >? 5555 {nak=1} +rreg 3 x"ffe3" x"0005" 00000000 -- ncyc >? 0005 (ncyc=nbusy+1) +eop +.iowt 10 +# +C with stat (should not assert busy!) +sop +wreg 0 x"ffe1" x"0000" 00000000 -- stat := 0000 +rreg 1 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (after wreg stat) +rreg 2 x"ffe1" x"0000" 00000000 -- stat >? 0000 +rreg 3 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (after rreg stat) +eop +.iowt 10 +# +C with ncyc (should not assert busy!) +sop +rreg 0 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (after rreg ncyc) +eop +.iowt 10 +# +C with cntl (should not assert busy!) +sop +rreg 0 x"ffe0" x"0004" 00000000 -- cntl >? 0004 +rreg 1 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (after rreg cntl) +wreg 2 x"ffe0" x"0000" 00000000 -- cntl := 0000 +rreg 3 x"ffe3" x"0001" 00000000 -- ncyc >? 0001 (after wreg cntl) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21f: eop aborts of attn -C -C 0. prepare, set 1 attn flag -C -.attn 0000000100000000 -C -C 1a. abort after cmd -C rblk: tx: sop - cmd(00001,101) [[ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00001101 -txeop -.iowt 20 -C -C 1b. check stat -C stat: stat(000),attn(1),cerr(1),derr(0),rbnak(0),rberr(0) -> 00011000 -C -# -rxsop -rxccd 11110100 00101001 1111111100000001 00011000 -rxeop -txsop -txc 11110100 -txeop +C Test A3.11: check nbusy (use nbusy=3ff -> will cause time out) +# +C with data +sop +wreg 0 x"ffe0" x"03ff" 00000000 -- cntl := (nbusy=1023) +wreg 1 x"ffe4" x"1234" 00000010 -- data := 1234 +rreg 2 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +rreg 3 x"ffe4" x"5555" 00000010 -- data >? 5555 +rreg 4 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +eop .iowt 10 # -C -C 2. normal attn, finally -C rblk: tx: sop - cmd(00001,101) ccrc - eop -C rx: sop - cmd(101) dl dh stat crc - eop -C -rxsop -rx8 00001101 -rx16 0000000100000000 -rx8 00000000 -rxcrc -rxeop +C with dinc +sop +wreg 0 x"ffe5" x"1234" 00000010 -- dinc := 1234 +rreg 1 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +rreg 2 x"ffe5" x"5555" 00000010 -- dinc >? 5555 +rreg 3 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +eop +.iowt 10 # -txsop -tx8 00001101 -txcrc -txeop +C with fifo +sop +wreg 0 x"ffe6" x"3300" 00000010 -- fifo := 3300 +rreg 1 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +rreg 2 x"ffe6" x"5555" 00000010 -- fifo >? 5555 +rreg 3 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +eop +.iowt 10 +# +C with lnak +sop +wreg 0 x"ffe7" x"aaaa" 00000010 -- lnak := aaaa {nak=1} +rreg 1 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +rreg 2 x"ffe7" x"5555" 00000010 -- lnak >? 5555 {nak=1} +rreg 3 x"ffe3" x"0020" 00000000 -- ncyc >? 0020 (ncyc=TO(32)) +eop +.iowt 10 +# +C reset to nbusy=0 +sop +wreg 0 x"ffe0" x"0000" 00000000 -- cntl := (nbusy=0) +eop +.iowt 10 +# +C ============================================================================= +C Section A4: Basic commands: wblk, rblk +C ----------------------------------------------------------------------------- +C Test A4.1: wblk, rblk (with fifo, no errors) +# +sop +wblks 0 x"ffe6" 8 x"0100" 00000000 -- fifo := seq(8,0100) +rblks 1 x"ffe6" 8 x"0100" 00000000 -- fifo >? seq(8,0100) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 21g: eop aborts of init -C -C 0. prepare, set data register -C data := 0000000000000001 -C -rxsop -rxcs 00001010 00000000 -rxeop -txsop -txcad 00001010 11110001 0000000000000001 -txeop -.iowt 10 -# -C -C 1a. abort after cmd -C rblk: tx: sop - cmd(00010,110) [[addr(0000) dl dh ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010110 -txeop -.iowt 20 -C -C 1b. check stat -C stat: stat(000),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 00001000 -C -# -rxsop -rxccd 11110100 00001010 0000000100000000 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 2a. abort after addr -C rblk: tx: sop - cmd(00010,110) addr(0000) [[dl dh ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010110 -tx8 11110000 -txeop -.iowt 20 -C -C 2b. check stat -C -# -rxsop -rxccd 11110100 00001010 0000000100000000 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 3a. abort after dl -C rblk: tx: sop - cmd(00010,110) addr(0000) dl [[dh ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010110 -tx8 11110000 -tx8 00000010 -txeop -.iowt 20 -C -C 3b. check stat -C -# -rxsop -rxccd 11110100 00001010 0000000100000000 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -C -C 4a. abort after dh -C rblk: tx: sop - cmd(00010,110) addr(0000) dl dh [[ccrc]] - eop -C rx: sop - nak - eop -C -rxsop -rxnak -rxeop -# -txsop -tx8 00010110 -tx8 11110000 -tx8 00000010 -tx8 00000000 -txeop -.iowt 20 -C -C 4b. check stat -C -# -rxsop -rxccd 11110100 00001010 0000000100000000 00001000 -rxeop -txsop -txc 11110100 -txeop -.iowt 10 -# -C -C 5a. normal init, finally -C rblk: tx: sop - cmd(00010,110) addr(0000) dl dh ccrc - eop -C rx: sop - cmd(110) stat crc - eop -C -rxsop -rx8 00010110 -rx8 00000000 -rxcrc -rxeop -# -txsop -tx8 00010110 -tx8 11110000 -tx8 00000010 -tx8 00000000 -txcrc -txeop -.iowt 10 -C -C 5b. check that data register cleared -C data -> 0000000000000000 -C -C rreg: tx: sop - cmd(00001,000) addr(0001) ccrc - eop -C rx: sop - cmd(000) dl dh stat crc - eop -# -rxsop -rxcds 00001000 0000000000000000 00000000 -rxeop -# -txsop -txca 00001000 11110001 -txeop +C Test A4.2: wblk, rblk (with dinc, no errors) # +sop +wreg 0 x"ffe4" x"2200" 00000000 -- data := 2200 +rblks 1 x"ffe5" 8 x"2200" 00000000 -- dinc >? seq(8,2200) +wblks 2 x"ffe5" 8 x"2208" 00000000 -- dinc := seq(8,2208) +rreg 3 x"ffe4" x"2210" 00000000 -- data >? 2210 +rreg 4 x"ffe0" x"0000" 00000000 -- cntl >? (wchk=0) +eop .iowt 10 # C ----------------------------------------------------------------------------- -C Test 22: nak aborts of wreg -C Note: nak aborts only tested for wreg ! -C sufficient because implementation is internally common for eop and -C nak aborts and all eop aborts are tested above in Test 21*. -C -C 0. write all-1s to data register and read back to initialize context -C wreg: tx: sop - cmd(11110,010) addr(0001) dl dh ccrc -C rreg: tx: - cmd(11111,000) addr(0001) ccrc -C tx: - eop -C rx: sop - cmd(010) stat crc -C rx: sop - cmd(000) dl dh stat crc -C rx: - eop -# -rxsop -rxcs 11110010 00000000 -rxcds 11111000 1111111111111111 00000000 -rxeop -# -txsop -txcad 11110010 11110001 1111111111111111 -txca 11111000 11110001 -txeop +C Test A4.3: wblk, rblk (with lnak, -> rbnak response) # +sop +.dclr +.dseq 4 x"3300" -- seq( 4,3300) +wblkd 0 x"ffe7" 0 00000010 -- lnak := .... {nak=1,dc=0} +.dclr +.dwrd x"0055" -- 1st lsb from rbus +.dwrd x"0000" -- rest will be 0 from abort states +.dwrd x"0000" +.dwrd x"0000" +rblkd 1 x"ffe7" 0 00000010 -- lnak >? .... {nak=1,dc=0) +eop .iowt 10 # -C -C 1a. abort after cmd -C wreg: tx: sop - cmd(00001,010) nak - eop -C rx: sop - nak - eop -C +C ----------------------------------------------------------------------------- +C Test A4.4: wblk, rblk (with fifo, -> rberr response when fifo full) # -rxsop -rxnak -rxeop -# -txsop -tx8 00100010 -txnak -txeop +sop +.dclr +.dseq 18 x"4400" -- seq(18,4400) +wblkd 0 x"ffe6" 16 00000001 -- fifo := .... {err=1,dc=16} +.dclr +.dseq 16 x"4400" -- seq(16,4400) +.dwrd x"0055" -- 1st lsb from rbus +.dwrd x"0000" -- rest will be 0 from abort states +rblkd 1 x"ffe6" 16 00000001 -- lnak >? .... {err=1,dc=16) +eop .iowt 10 -C -C 1b. check stat -C stat: stat(000),attn(0),cerr(1),derr(0),rbnak(0),rberr(0) -> 00001000 -C stat: tx: sop - cmd(00110,100) ccrc - eop -C rx: sop - cmd(100) ccmd(000) dl dh stat crc - eop -C # -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop +C ----------------------------------------------------------------------------- +C Test A4.5: wblk, rblk (with dinc, zero length request) +# +sop +wreg 0 x"ffe4" x"5500" 00000000 -- data := 5500 +rblks 1 x"ffe5" 0 x"5500" 00000000 -- dinc >? seq(0,5500) +wblks 2 x"ffe5" 0 x"5500" 00000000 -- dinc := seq(0,5500) +rreg 3 x"ffe4" x"5500" 00000000 -- data >? 5500 +rreg 4 x"ffe0" x"0000" 00000000 -- cntl >? (wchk=0) +eop .iowt 10 -C -C 2a. abort after addr -C wreg: tx: sop - cmd(00001,010) addr(0001) nak - eop -C rx: sop - nak - eop -C # -rxsop -rxnak -rxeop +C ============================================================================= +C Section A5: Basic commands: init +C ----------------------------------------------------------------------------- +C Test A5.1: init (test with tester data reg) # -txsop -tx8 00001010 -tx8 11110001 -txnak -txeop +C setup cntl, data, fifo +sop +wreg 0 x"ffe0" x"0002" 00000000 -- cntl := 0002 +wreg 1 x"ffe4" x"3210" 00000000 -- data := 3210 +wreg 2 x"ffe6" x"6600" 00000000 -- fifo := 6600 +wreg 3 x"ffe6" x"6601" 00000000 -- fifo := 6601 +wreg 4 x"ffe6" x"6602" 00000000 -- fifo := 6602 +wreg 5 x"ffe6" x"6603" 00000000 -- fifo := 6603 +eop .iowt 10 -C -C 2b. check stat (stat as for 1a.) -C # -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop +C init(0000) -> noop +sop +init 0 x"ffe0" x"0000" 00000000 +rreg 1 x"ffe0" x"0002" 00000000 -- cntl >? 0002 +rreg 2 x"ffe4" x"3210" 00000000 -- data >? 3210 +rreg 3 x"ffe6" x"6600" 00000000 -- fifo >? 6600 +eop .iowt 10 -C -C 3a. abort after dl -C wreg: tx: sop - cmd(00001,010) addr(0001) dl nak - eop -C rx: sop - nak - eop -C # -rxsop -rxnak -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -txnak -txeop +C init(0001) -> clear cntl +sop +init 0 x"ffe0" x"0001" 00000000 +rreg 1 x"ffe0" x"0000" 00000000 -- cntl >? 0000 +rreg 2 x"ffe4" x"3210" 00000000 -- data >? 3210 +rreg 3 x"ffe6" x"6601" 00000000 -- fifo >? 6601 +eop .iowt 10 -C -C 3b. check stat (stat as for 1a.) -C # -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop +C init(0002) -> clear data +sop +init 0 x"ffe0" x"0002" 00000000 +rreg 1 x"ffe0" x"0000" 00000000 -- cntl >? 0000 +rreg 2 x"ffe4" x"0000" 00000000 -- data >? 0000 +rreg 3 x"ffe6" x"6602" 00000000 -- fifo >? 6602 +eop .iowt 10 -C -C 4a. abort after dh -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh nak - eop -C rx: sop - nak - eop -C # -rxsop -rxnak -rxeop -# -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -tx8 11000000 -txnak -txeop +C init(0004) -> clear fifo +sop +init 0 x"ffe0" x"0004" 00000000 +rreg 1 x"ffe0" x"0000" 00000000 -- cntl >? 0000 +rreg 2 x"ffe4" x"0000" 00000000 -- data >? 0000 +rreg 3 x"ffe6" x"5555" 00000001 -- fifo >? 5555 {err=1} +eop .iowt 10 -C -C 4b. check stat (stat as for 1a.) -C # -rxsop -rxccd 00110100 11111000 1111111111111111 00001000 -rxeop -txsop -txc 00110100 -txeop +C ============================================================================= +C Section A6: rlink core rbus registers (needed for labo and attn tests) +C ----------------------------------------------------------------------------- +C Test A6.1: read all regs +# for stat expect: lcmd = 00001 000 (seq=1,cmd=000) from previous rreg,1 +# babo = 0 (last wblk/rblk was ok) +# size = 001 (size=RTAWIDTH-10, and tb has RTAWIDTH=11) +# --> stat= 00001 000 0 0000 001 -> 0801 +# +sop +rreg 1 x"ffff" x"0000" 00000000 -- cntl >? 0000 +rreg 2 x"fffe" x"0801" 00000000 -- stat >? 0801 (see above) +rreg 3 x"fffd" x"7654" 00000000 -- sysh >? 7654 +rreg 4 x"fffc" x"3210" 00000000 -- sysl >? 3210 +eop .iowt 10 -C -C 5a. finally just normal wreg to data register -C wreg: tx: sop - cmd(00001,010) addr(0001) dl dh ccrc - eop -C rx: sop - cmd(010) stat crc - eop -C # -rxsop -rxcs 00001010 00000000 -rxeop +C ============================================================================= +C Section A7: Basic commands: labo +C ----------------------------------------------------------------------------- +C Test A7.1: labo after successful rblk,wblk (essentially a noop) # -txsop -tx8 00001010 -tx8 11110001 -tx8 00000011 -tx8 11000000 -txcrc -txeop +sop +init 0 x"ffe0" x"0007" 00000000 -- clear all +wblks 1 x"ffe6" 4 x"0200" 00000000 -- fifo := seq(4,0200) +labo 2 x"00" 00000000 +rblks 3 x"ffe6" 4 x"0200" 00000000 -- fifo >? seq(4,0200) +labo 4 x"00" 00000000 +eop .iowt 10 -C -C 5b. check stat (now cerr=0 again) -C # -rxsop -rxccd 00110100 00001010 1111111111111111 00000000 -rxeop -txsop -txc 00110100 -txeop +C ----------------------------------------------------------------------------- +C Test A7.2: labo after aborted wblk,rblk +# +# for stat expect: lcmd = 00001 011 (seq=1,cmd=011) from previous wblk,1 +# lcmd = 00001 001 (seq=1,cmd=001) from previous rblk,1 +# babo = 1 (last wblk/rblk was aborted) +# size = 001 (size=RTAWIDTH-10, and tb has RTAWIDTH=11) +# --> stat= 00001 011 1 0000 001 -> 0b81 +# --> stat= 00001 001 1 0000 001 -> 0981 +# +C aborted wblk, labo, wreg(data),rreg(dinc) +sop +.dclr +.dseq 18 x"4400" -- seq(18,4400) +init 0 x"ffe0" x"0007" 00000000 -- clear all +wblkd 1 x"ffe6" 16 00000001 -- fifo := .... {err=1,dc=16} +rreg 2 x"fffe" x"0b81" 00000000 -- stat >? 0b81 (see above) +labo 3 x"01" 00000000 +wreg 4 x"ffe4" x"0101" 00000000 -- data := 0101 +rreg 5 x"ffe5" x"0102" 00000000 -- dinc := 0102 +eop +.iowt 20 -- 20 needed for sp1c +# +C check that wreg(data) and rreg(dinc) wasn't done +sop +rreg 0 x"ffe4" x"0000" 00000000 -- data >? 0000 +eop +.iowt 10 +# +C aborted rblk, labo, wreg(data),rreg(dinc) +sop +.dclr +.dseq 16 x"4400" -- seq(16,4400) +.dwrd x"0055" -- 1st lsb from rbus +.dwrd x"0000" -- rest will be 0 from abort states +rblkd 1 x"ffe6" 16 00000001 -- lnak >? .... {err=1,dc=16) +rreg 2 x"fffe" x"0981" 00000000 -- stat >? 0981 (see above) +labo 3 x"01" 00000000 +wreg 4 x"ffe4" x"0101" 00000000 -- data := 0101 +rreg 5 x"ffe5" x"0102" 00000000 -- dinc := 0102 +eop +.iowt 10 +# +C check that wreg(data) and rreg(dinc) wasn't done +sop +rreg 0 x"ffe4" x"0000" 00000000 -- data >? 0000 +eop +.iowt 10 + + +C ============================================================================= +C Section A8: attn notification +C ----------------------------------------------------------------------------- +C Test A8.1: test response on attn polls +# +C send attn, expect attn notify message (with all 0) +anmsg 0000000000000000 +txattn +.iowt 20 +# +C trigger LAM, send attn, expect attn notify message +.attn 0000000000000001 +.iowt 10 +anmsg 0000000000000001 +txattn +.iowt 20 +# +C harvest attn, send attn, expect attn notify message (all 0 again) +sop +attn 1 x"0001" 00000000 -- attn >? 0001 +attn 2 x"0000" 00000000 -- attn >? 0000 +eop +.iowt 10 +anmsg 0000000000000000 +txattn +.iowt 20 +# +C ----------------------------------------------------------------------------- +C Test A8.2: test attn notification +# +C enable attn notification +sop +wreg 1 x"ffff" x"8000" 00000000 -- cntl := (anena=1) +rreg 2 x"ffff" x"8000" 00000000 -- cntl >? (anena=1) +eop +.iowt 10 +# +C trigger LAM, expect attn notify message +anmsg 0000000000000010 +.attn 0000000000000010 +.iowt 10 +# +C send attn, expect attn notify message +anmsg 0000000000000010 +txattn +.iowt 20 +# +C harvest attn pattern +sop +rreg 1 x"ffff" x"8000" 00001000 -- cntl >? (anena=1) {attn=1} +attn 2 x"0002" 00000000 -- attn >? 0002 +rreg 3 x"ffff" x"8000" 00000000 -- cntl >? (anena=1) +attn 4 x"0000" 00000000 -- attn >? 0000 (nothing !) +eop +.iowt 10 +# +C send attn, expect attn notify message (all 0) +anmsg 0000000000000000 +txattn +.iowt 20 +# +C disable attn notification +sop +wreg 1 x"ffff" x"0000" 00000000 -- cntl := (anena=1) +rreg 2 x"ffff" x"0000" 00000000 -- cntl >? (anena=1) +eop +.iowt 10 +C trigger LAM, no attn comma now +.attn 0000000000000100 +.iowt 10 +# +C send attn, expect attn notify message +anmsg 0000000000000100 +txattn +.iowt 20 +# +C harvest attn pattern +sop +rreg 1 x"ffff" x"0000" 00001000 -- cntl >? (anena=1) {attn=1} +attn 2 x"0004" 00000000 -- attn >? 0004 +eop .iowt 10 # #============================================================================== diff --git a/rtl/vlib/rlink/tb/tbd_rlink_direct.vhd b/rtl/vlib/rlink/tb/tbd_rlink_direct.vhd index 50f36f30..11e21ca4 100644 --- a/rtl/vlib/rlink/tb/tbd_rlink_direct.vhd +++ b/rtl/vlib/rlink/tb/tbd_rlink_direct.vhd @@ -1,6 +1,6 @@ --- $Id: tbd_rlink_direct.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: tbd_rlink_direct.vhd 594 2014-09-21 12:29:33Z mueller $ -- --- Copyright 2007-2010 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,6 +18,8 @@ -- (no records, no generic port). -- -- Dependencies: rlink_core +-- rbus/rb_mon +-- rlink/rlink_mon -- -- To test: rlink_core -- @@ -31,10 +33,12 @@ -- 2007-10-27 92 8.2.03 I34 xc3s1000-4 153 302 0 162 s 7.65 -- 2007-10-27 92 8.1.03 I27 xc3s1000-4 138 306 0 - s 7.64 -- --- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.1-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-09-19 594 4.0 now rlink v4.0 iface, 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2010-12-25 348 3.0.2 drop RL_FLUSH, add RL_MONI for rlink_core -- 2010-12-24 347 3.0.1 rename: CP_*->RL->* -- 2010-12-05 343 3.0 rri->rlink renames; port to rbus V3 protocol; @@ -50,6 +54,7 @@ library ieee; use ieee.std_logic_1164.all; +use ieee.numeric_std.all; use work.slvtypes.all; use work.rblib.all; @@ -73,14 +78,14 @@ entity tbd_rlink_direct is -- rlink_core only tb design RB_MREQ_re : out slbit; -- rbus: request - re RB_MREQ_we : out slbit; -- rbus: request - we RB_MREQ_initt : out slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : out slv8; -- rbus: request - addr + RB_MREQ_addr : out slv16; -- rbus: request - addr RB_MREQ_din : out slv16; -- rbus: request - din RB_SRES_ack : in slbit; -- rbus: response - ack RB_SRES_busy : in slbit; -- rbus: response - busy RB_SRES_err : in slbit; -- rbus: response - err RB_SRES_dout : in slv16; -- rbus: response - dout RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags TXRXACT : out slbit -- txrx active flag ); end entity tbd_rlink_direct; @@ -105,11 +110,14 @@ begin RB_SRES.busy <= RB_SRES_busy; RB_SRES.err <= RB_SRES_err; RB_SRES.dout <= RB_SRES_dout; - + UUT : rlink_core generic map ( - ATOWIDTH => 5, - ITOWIDTH => 6) + BTOWIDTH => 5, + RTAWIDTH => 11, + SYSID => x"76543210", + ENAPIN_RLMON => sbcntl_sbf_rlmon, + ENAPIN_RBMON => sbcntl_sbf_rbmon) port map ( CLK => CLK, CE_INT => CE_INT, @@ -128,5 +136,5 @@ begin ); TXRXACT <= '0'; - + end syn; diff --git a/rtl/vlib/rlink/tb/tbd_rlink_sp1c.vhd b/rtl/vlib/rlink/tb/tbd_rlink_sp1c.vhd index 762b06b4..abf5f83a 100644 --- a/rtl/vlib/rlink/tb/tbd_rlink_sp1c.vhd +++ b/rtl/vlib/rlink/tb/tbd_rlink_sp1c.vhd @@ -1,6 +1,6 @@ --- $Id: tbd_rlink_sp1c.vhd 476 2013-01-26 22:23:53Z mueller $ +-- $Id: tbd_rlink_sp1c.vhd 596 2014-10-17 19:50:07Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -28,10 +28,11 @@ -- To test: rlink_sp1c -- -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 4.0 use new rlink v4 iface and 4 bit STAT -- 2011-12-23 444 3.2 use simclkcnt instead of simbus global -- 2011-12-22 442 3.1 renamed and retargeted to tbu_rlink_sp1c -- 2011-11-19 427 3.0.5 now numeric_std clean @@ -84,14 +85,14 @@ entity tbd_rlink_sp1c is -- rlink_sp1c tb design RB_MREQ_re : out slbit; -- rbus: request - re RB_MREQ_we : out slbit; -- rbus: request - we RB_MREQ_initt : out slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : out slv8; -- rbus: request - addr + RB_MREQ_addr : out slv16; -- rbus: request - addr RB_MREQ_din : out slv16; -- rbus: request - din RB_SRES_ack : in slbit; -- rbus: response - ack RB_SRES_busy : in slbit; -- rbus: response - busy RB_SRES_err : in slbit; -- rbus: response - err RB_SRES_dout : in slv16; -- rbus: response - dout RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3; -- rbus: status flags + RB_STAT : in slv4; -- rbus: status flags TXRXACT : out slbit -- txrx active flag ); end entity tbd_rlink_sp1c; @@ -129,20 +130,20 @@ component tbu_rlink_sp1c is -- rlink core+serport combo RB_MREQ_re : out slbit; -- rbus: request - re RB_MREQ_we : out slbit; -- rbus: request - we RB_MREQ_initt : out slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : out slv8; -- rbus: request - addr + RB_MREQ_addr : out slv16; -- rbus: request - addr RB_MREQ_din : out slv16; -- rbus: request - din RB_SRES_ack : in slbit; -- rbus: response - ack RB_SRES_busy : in slbit; -- rbus: response - busy RB_SRES_err : in slbit; -- rbus: response - err RB_SRES_dout : in slv16; -- rbus: response - dout RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end component; begin - UUT : tbu_rlink_sp1c + TBU : tbu_rlink_sp1c port map ( CLK => CLK, CE_INT => CE_INT, @@ -197,14 +198,12 @@ begin TXRXACT <= RXACT or TXBUSY; B2CD : byte2cdata -- byte stream -> 9bit comma,data - generic map ( - CPREF => c_rlink_cpref, - NCOMM => c_rlink_ncomm) port map ( CLK => CLK, RESET => RESET, DI => RXDATA, ENA => RXVAL, + ERR => '0', BUSY => open, DO => RL_DO, VAL => RL_VAL, @@ -212,18 +211,17 @@ begin ); CD2B : cdata2byte -- 9bit comma,data -> byte stream - generic map ( - CPREF => c_rlink_cpref, - NCOMM => c_rlink_ncomm) port map ( - CLK => CLK, - RESET => RESET, - DI => RL_DI, - ENA => RL_ENA, - BUSY => RL_BUSY, - DO => TXDATA, - VAL => TXENA, - HOLD => TXBUSY + CLK => CLK, + RESET => RESET, + ESCXON => '0', + ESCFILL => '0', + DI => RL_DI, + ENA => RL_ENA, + BUSY => RL_BUSY, + DO => TXDATA, + VAL => TXENA, + HOLD => TXBUSY ); CLKCNT : simclkcnt port map (CLK => CLK, CLK_CYCLE => CLK_CYCLE); diff --git a/rtl/vlib/rlink/tb/tbu_rlink_sp1c.vhd b/rtl/vlib/rlink/tb/tbu_rlink_sp1c.vhd index df5032f3..8f2534cc 100644 --- a/rtl/vlib/rlink/tb/tbu_rlink_sp1c.vhd +++ b/rtl/vlib/rlink/tb/tbu_rlink_sp1c.vhd @@ -1,6 +1,6 @@ --- $Id: tbu_rlink_sp1c.vhd 442 2011-12-23 10:03:28Z mueller $ +-- $Id: tbu_rlink_sp1c.vhd 593 2014-09-14 22:21:33Z mueller $ -- --- Copyright 2007-2011 by Walter F.J. Mueller +-- Copyright 2007-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -32,10 +32,12 @@ -- 2007-10-27 92 8.2.03 I34 xc3s1000-4 283 594 18 323 s 10.3 -- 2007-10-27 92 8.1.03 I27 xc3s1000-4 285 596 18 - s 9.32 -- --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-31 590 4.0 now full rlink v4 iface, 4 bit STAT +-- 2014-08-15 583 3.5 rb_mreq addr now 16 bit -- 2011-12-22 442 3.2 renamed and retargeted to test rlink_sp1c -- 2011-11-19 427 3.1.2 now numeric_std clean -- 2010-12-28 350 3.1.1 use CLKDIV/CDINIT=0; @@ -76,14 +78,14 @@ entity tbu_rlink_sp1c is -- rlink core+serport combo RB_MREQ_re : out slbit; -- rbus: request - re RB_MREQ_we : out slbit; -- rbus: request - we RB_MREQ_initt: out slbit; -- rbus: request - init; avoid name coll - RB_MREQ_addr : out slv8; -- rbus: request - addr + RB_MREQ_addr : out slv16; -- rbus: request - addr RB_MREQ_din : out slv16; -- rbus: request - din RB_SRES_ack : in slbit; -- rbus: response - ack RB_SRES_busy : in slbit; -- rbus: response - busy RB_SRES_err : in slbit; -- rbus: response - err RB_SRES_dout : in slv16; -- rbus: response - dout RB_LAM : in slv16; -- rbus: look at me - RB_STAT : in slv3 -- rbus: status flags + RB_STAT : in slv4 -- rbus: status flags ); end entity tbu_rlink_sp1c; @@ -119,13 +121,14 @@ begin RLINK : rlink_sp1c generic map ( - ATOWIDTH => 5, - ITOWIDTH => 6, - CPREF => c_rlink_cpref, + BTOWIDTH => 5, + RTAWIDTH => 11, + SYSID => x"76543210", IFAWIDTH => 5, OFAWIDTH => 5, - ENAPIN_RLMON => -1, -- no monitors (both are instantiated in - ENAPIN_RBMON => -1, -- tbd_rlink_sp1c for ssim avail.) + ENAPIN_RLMON => sbcntl_sbf_rlmon, + ENAPIN_RLBMON=> sbcntl_sbf_rlbmon, + ENAPIN_RBMON => sbcntl_sbf_rbmon, CDWIDTH => 15, CDINIT => c_cdinit) port map ( diff --git a/rtl/vlib/simlib/simlib.vhd b/rtl/vlib/simlib/simlib.vhd index 8b7cc3d5..fde5cee3 100644 --- a/rtl/vlib/simlib/simlib.vhd +++ b/rtl/vlib/simlib/simlib.vhd @@ -1,6 +1,6 @@ --- $Id: simlib.vhd 444 2011-12-25 10:04:58Z mueller $ +-- $Id: simlib.vhd 599 2014-10-25 13:43:56Z mueller $ -- --- Copyright 2006-2011 by Walter F.J. Mueller +-- Copyright 2006-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,10 +18,13 @@ -- Dependencies: - -- Test bench: - -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- -- Revision History: -- Date Rev Version Comment +-- 2014-10-25 599 2.1.1 add wait_* procedures; writeoptint: no dat clear +-- 2014-10-18 597 2.1 add simfifo_*, writetrace procedures +-- 2014-09-06 591 2.0.1 add readint_ea() with range check -- 2011-12-23 444 2.0 drop CLK_CYCLE from simclk,simclkv; use integer for -- simclkcnt(CLK_CYCLE),writetimestamp(clkcyc); -- 2011-11-18 427 1.3.8 now numeric_std clean @@ -112,6 +115,12 @@ procedure read_ea( L: inout line; value: out time); +procedure readint_ea( + L: inout line; + value: out integer; + imin : in integer := integer'low; + imax : in integer := integer'high); + procedure read_ea( L: inout line; value: out std_logic); @@ -197,10 +206,83 @@ procedure writegen( -- write slv in generic base (arb. lth) field: in width:=0; -- field width base: in integer:= 2); -- default base -procedure writetimestamp( - L: inout line; - clkcyc: in integer; - str : in string := null_string); +procedure writetimestamp( -- write time stamp + L: inout line; -- line + str : in string := null_string); -- 1st string field + +procedure writetimestamp( -- write time stamp w/ clk cycle + L: inout line; -- line + clkcyc: in integer; -- cycle number + str : in string := null_string); -- 1st string field + +procedure writeoptint( -- write int if > 0 + L: inout line; -- line + str : in string; -- string + dat : in integer; -- int value + field: in width:=0); -- field width + +procedure writetrace( -- debug trace - plain + str : in string); -- string +procedure writetrace( -- debug trace - int + str : in string; -- string + dat : in integer); -- value +procedure writetrace( -- debug trace - slbit + str : in string; -- string + dat : in slbit); -- value +procedure writetrace( -- debug trace - slv + str : in string; -- string + dat : in slv); -- value + +type clock_dsc is record -- clock descriptor + period : time; -- clock period + hold : time; -- hold time = clock yo stim time + setup : time; -- setup time = moni to clock time +end record; + +procedure wait_nextstim( -- wait for next stim time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + constant cnt : in positive := 1); -- number of cycles to wait + +procedure wait_nextmoni( -- wait for next moni time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + constant cnt : in positive := 1); -- number of cycles to wait + +procedure wait_stim2moni( -- wait from stim to moni time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc); -- clock descriptor + +procedure wait_untilsignal( -- wait until signal + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + signal sig : in slbit; -- signal + constant val : in slbit; -- value + variable cnt : out natural); -- cycle count + +type simfifo_type is array (natural range <>, natural range<>) of std_logic; + +procedure simfifo_put( -- add item to simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + din : in std_logic_vector; -- element to add + val : in slbit := '1'); -- valid flag + +procedure simfifo_get( -- get item from simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + dout: out std_logic_vector); -- element retrieved + +procedure simfifo_writetest( -- test value against simfifo and write + L: inout line; -- line + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + dat : in std_logic_vector); -- data to test + +procedure simfifo_dump( -- dump simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + str : in string := null_string); -- header text -- ---------------------------------------------------------------------------- @@ -635,6 +717,27 @@ end procedure read_ea; -- ------------------------------------- +procedure readint_ea( + L: inout line; + value: out integer; + imin : in integer := integer'low; + imax : in integer := integer'high) is + + variable dat : integer := 0; + +begin + + read_ea(L, dat); + assert dat>=imin and dat<=imax + report "readint_ea range check: " & + integer'image(dat) & " not in " & + integer'image(imin) & ":" & integer'image(imax) + severity failure; + value := dat; +end procedure readint_ea; + +-- ------------------------------------- + procedure read_ea( L: inout line; value: out std_logic) is @@ -1062,8 +1165,7 @@ end procedure writegen; procedure writetimestamp( L: inout line; - clkcyc: in integer; - str: in string := null_string) is + str : in string := null_string) is variable t_nsec : integer := 0; variable t_psec : integer := 0; @@ -1075,12 +1177,28 @@ begin t_psec := (now - t_nsec * 1 ns) / 1 ps; t_dnsec := t_psec/100; - -- write(L, now, right, 12); write(L, t_nsec, right, 8); write(L,'.'); write(L, t_dnsec, right, 1); write(L, string'(" ns")); + if str /= null_string then + write(L, str); + end if; + +end procedure writetimestamp; + +-- ------------------------------------- + +procedure writetimestamp( + L: inout line; + clkcyc: in integer; + str: in string := null_string) is + + +begin + + writetimestamp(L); write(L, clkcyc, right, 7); if str /= null_string then write(L, str); @@ -1088,5 +1206,287 @@ begin end procedure writetimestamp; +-- ------------------------------------- + +procedure writeoptint( -- write int if > 0 + L: inout line; -- line + str : in string; -- string + dat : in integer; -- int value + field: in width:=0) is -- field width + +begin + + if dat > 0 then + write(L, str); + write(L, dat, right, field); + end if; + +end procedure writeoptint; + +-- ------------------------------------- + +procedure writetrace( -- debug trace - plain + str: in string) is -- string + + variable oline : line; + +begin + + writetimestamp(oline, " ++ "); + write(oline, str); + writeline(output, oline); + +end procedure writetrace; + +-- ------------------------------------- + +procedure writetrace( -- debug trace - int + str: in string; -- string + dat : in integer) is -- value + + variable oline : line; + +begin + + writetimestamp(oline, " ++ "); + write(oline, str); + write(oline, dat); + writeline(output, oline); + +end procedure writetrace; + +-- ------------------------------------- + +procedure writetrace( -- debug trace - slbit + str: in string; -- string + dat : in slbit) is -- value + + variable oline : line; + +begin + + writetimestamp(oline, " ++ "); + write(oline, str); + write(oline, dat); + writeline(output, oline); + +end procedure writetrace; + +-- ------------------------------------- + +procedure writetrace( -- debug trace - slv + str: in string; -- string + dat : in slv) is -- value + + variable oline : line; + +begin + + writetimestamp(oline, " ++ "); + write(oline, str); + write(oline, dat); + writeline(output, oline); + +end procedure writetrace; + +-- ------------------------------------- + +procedure wait_nextstim( -- wait for next stim time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + constant cnt : in positive := 1) is -- number of cycles to wait + +begin + + for i in 1 to cnt loop + wait until rising_edge(clk); + wait for clk_dsc.hold; + end loop; -- i + +end procedure wait_nextstim; + +-- ------------------------------------- + +procedure wait_nextmoni( -- wait for next moni time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + constant cnt : in positive := 1) is -- number of cycles to wait + +begin + + for i in 1 to cnt loop + wait until rising_edge(clk); + wait for clk_dsc.period - clk_dsc.setup; + end loop; -- i + +end procedure wait_nextmoni; + +-- ------------------------------------- + +procedure wait_stim2moni( -- wait from stim to moni time + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc) is -- clock descriptor + +begin + + wait for clk_dsc.period - clk_dsc.hold - clk_dsc.setup; + +end procedure wait_stim2moni; + +-- ------------------------------------- + +procedure wait_untilsignal( -- wait until signal + signal clk : in slbit; -- clock + constant clk_dsc : in clock_dsc; -- clock descriptor + signal sig : in slbit; -- signal + constant val : in slbit; -- value + variable cnt : out natural) is -- cycle count + + variable cnt_l : natural := 0; +begin + + cnt_l := 0; + while val /= sig loop + wait_nextmoni(clk, clk_dsc); + cnt_l := cnt_l + 1; + end loop; + cnt := cnt_l; + +end procedure wait_untilsignal; + +-- ------------------------------------- + +procedure simfifo_put( -- add item to simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + din : in std_logic_vector; -- element to add + val : in slbit := '1') is -- valid flag + + variable din_imax : integer := din'length-1; +begin + + if val = '0' then + return; + end if; + + assert cnt < arr'high(1) + report "simfifo_put: fifo full" + severity failure; + assert arr'length(2) = din'length and + arr'ascending(2) = din'ascending + report "simfifo_put: arr,din range mismatch" + severity failure; + + for i in 0 to din_imax loop + arr(cnt, arr'low(2)+i) := din(din'low+i); + end loop; -- i + cnt := cnt + 1; + +end procedure simfifo_put; + +-- ------------------------------------- + +procedure simfifo_get( -- get item from simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + dout : out std_logic_vector) is -- element retrieved + + variable dout_imax : integer := dout'length-1; +begin + + assert cnt > 0 + report "simfifo_put: fifo empty" + severity failure; + assert arr'length(2) = dout'length and + arr'ascending(2) = dout'ascending + report "simfifo_put: arr,din range mismatch" + severity failure; + + for i in 0 to dout_imax loop + dout(dout'low+i) := arr(0, arr'low(2)+i); + end loop; -- i + cnt := cnt - 1; + if cnt > 0 then + for i in 1 to cnt loop + for j in 0 to dout_imax loop + arr(i-1, arr'low(2)+j) := arr(i, arr'low(2)+j); + end loop; -- j + end loop; -- i + end if; + +end procedure simfifo_get; + +-- ------------------------------------- + +procedure simfifo_writetest( -- test value against simfifo and write + L: inout line; -- line + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + dat : in std_logic_vector) is -- data to test + + variable refdata : slv(dat'range); + +begin + + if cnt = 0 then + write(L, string'(" FAIL: UNEXPECTED")); + else + simfifo_get(cnt, arr, refdata); + write(L, string'(" CHECK: ")); + if dat = refdata then + write(L, string'("OK")); + else + write(L, string'("FAIL, EXP= ")); + write(L, refdata); + end if; + end if; + +end procedure simfifo_writetest; + +-- ------------------------------------- + +procedure simfifo_dump( -- dump simfifo + cnt : inout natural; -- fifo element count + arr : inout simfifo_type; -- fifo data array + str: in string := null_string) is -- header text + + variable oline : line; + variable data : slv(arr'range(2)); + +begin + + writetimestamp(oline, " ++ "); + if str /= null_string then + write(oline, str); + end if; + write(oline, string'(" cnt= ")); + write(oline, cnt); + write(oline, string'(" of ")); + write(oline, arr'high(1)); + write(oline, string'("; drange=")); + write(oline, arr'left(2)); + if arr'ascending(2) then + write(oline, string'(" to ")); + else + write(oline, string'(" downto ")); + end if; + write(oline, arr'right(2)); + writeline(output, oline); + + if cnt > 0 then + for i in 0 to cnt-1 loop + for j in data'range loop + data(j) := arr(i,j); + end loop; -- j + write(oline, string'(" - ")); + write(oline, i, right, 2); + write(oline, string'(" ")); + write(oline, data); + writeline(output, oline); + end loop; -- i + end if; + +end procedure simfifo_dump; + end package body simlib; diff --git a/rtl/vlib/xlib/s6_cmt_sfs_unisim.vhd b/rtl/vlib/xlib/s6_cmt_sfs_unisim.vhd index d3bb4da2..90f662a3 100644 --- a/rtl/vlib/xlib/s6_cmt_sfs_unisim.vhd +++ b/rtl/vlib/xlib/s6_cmt_sfs_unisim.vhd @@ -1,4 +1,4 @@ --- $Id: $ +-- $Id: s6_cmt_sfs_unisim.vhd 601 2014-11-07 22:44:43Z mueller $ -- -- Copyright 2013- by Walter F.J. Mueller -- diff --git a/rtl/w11a/pdp11.vhd b/rtl/w11a/pdp11.vhd index ef1efbec..3e9e371e 100644 --- a/rtl/w11a/pdp11.vhd +++ b/rtl/w11a/pdp11.vhd @@ -1,4 +1,4 @@ --- $Id: pdp11.vhd 569 2014-07-13 14:36:32Z mueller $ +-- $Id: pdp11.vhd 589 2014-08-30 12:43:16Z mueller $ -- -- Copyright 2006-2014 by Walter F.J. Mueller -- @@ -20,6 +20,9 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-28 588 1.5.1 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.5 rb_mreq addr now 16 bit +-- 2014-08-10: 581 1.4.10 add c_cc_f_* field defs for condition code array -- 2014-07-12 569 1.4.9 dpath_stat_type: merge div_zero+div_ovfl to div_quit -- dpath_cntl_type: add munit_s_div_sr -- 2011-11-18 427 1.4.8 now numeric_std clean @@ -102,6 +105,11 @@ package pdp11 is cc : slv4; -- condition codes (NZVC). end record psw_type; + constant c_cc_f_n: integer := 3; -- condition code: n + constant c_cc_f_z: integer := 2; -- condition code: z + constant c_cc_f_v: integer := 1; -- condition code: v + constant c_cc_f_c: integer := 0; -- condition code: c + constant psw_init : psw_type := ( "00","00", -- cmode, pmode (=kernel) '0',"111",'0', -- rset, pri (=7), tflag @@ -1074,14 +1082,14 @@ end component; component pdp11_core_rbus is -- core to rbus interface generic ( - RB_ADDR_CORE : slv8 := slv(to_unsigned(2#00000000#,8)); - RB_ADDR_IBUS : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR_CORE : slv16 := slv(to_unsigned(2#0000000000000000#,16)); + RB_ADDR_IBUS : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response - RB_STAT : out slv3; -- rbus: status flags + RB_STAT : out slv4; -- rbus: status flags RB_LAM : out slbit; -- remote attention CPU_RESET : out slbit; -- cpu master reset CP_CNTL : out cp_cntl_type; -- console control port diff --git a/rtl/w11a/pdp11_aunit.vhd b/rtl/w11a/pdp11_aunit.vhd index 864e3ba1..03c17878 100644 --- a/rtl/w11a/pdp11_aunit.vhd +++ b/rtl/w11a/pdp11_aunit.vhd @@ -1,6 +1,6 @@ --- $Id: pdp11_aunit.vhd 330 2010-09-19 17:43:53Z mueller $ +-- $Id: pdp11_aunit.vhd 581 2014-08-10 21:48:46Z mueller $ -- --- Copyright 2006-2007 by Walter F.J. Mueller +-- Copyright 2006-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,9 +18,10 @@ -- Dependencies: - -- Test bench: tb/tb_pdp11_core (implicit) -- Target Devices: generic --- Tool versions: xst 8.1, 8.2, 9.1, 9.2, 12.1; ghdl 0.18-0.26 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- Revision History: -- Date Rev Version Comment +-- 2014-08-10 581 1.1.1 use c_cc_f_* -- 2010-09-18 300 1.1 renamed from abox -- 2007-06-14 56 1.0.1 Use slvtypes.all -- 2007-05-12 26 1.0 Initial version @@ -89,10 +90,10 @@ begin variable dst_msb : slbit := '0'; -- msb from dst (bit 15 or 7) variable sum_msb : slbit := '0'; -- msb from sum (bit 15 or 7) - alias NO : slbit is CCOUT(3); - alias ZO : slbit is CCOUT(2); - alias VO : slbit is CCOUT(1); - alias CO : slbit is CCOUT(0); + alias NO : slbit is CCOUT(c_cc_f_n); + alias ZO : slbit is CCOUT(c_cc_f_z); + alias VO : slbit is CCOUT(c_cc_f_v); + alias CO : slbit is CCOUT(c_cc_f_c); -- procedure do_add8_ci_co: 8 bit adder with carry in and carry out -- implemented following the recommended pattern for XST ISE V8.1 diff --git a/rtl/w11a/pdp11_core_rbus.vhd b/rtl/w11a/pdp11_core_rbus.vhd index cadf2fce..40dc37da 100644 --- a/rtl/w11a/pdp11_core_rbus.vhd +++ b/rtl/w11a/pdp11_core_rbus.vhd @@ -1,4 +1,4 @@ --- $Id: pdp11_core_rbus.vhd 553 2014-03-17 06:40:08Z mueller $ +-- $Id: pdp11_core_rbus.vhd 591 2014-09-06 17:45:38Z mueller $ -- -- Copyright 2007-2014 by Walter F.J. Mueller -- @@ -19,9 +19,11 @@ -- Test bench: tb/tb_rlink_tba_pdp11core -- -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- Revision History: - -- Date Rev Version Comment +-- 2014-09-05 591 1.3 use new rlink v4 iface and 4 bit STAT +-- 2014-08-15 583 1.2 rb_mreq addr now 16 bit -- 2011-11-18 427 1.1.1 now numeric_std clean -- 2010-12-29 351 1.1 renamed from pdp11_core_rri; ported to rbv3 -- 2010-10-23 335 1.2.3 rename RRI_LAM->RB_LAM; @@ -92,14 +94,14 @@ use work.pdp11.all; entity pdp11_core_rbus is -- core to rbus interface generic ( - RB_ADDR_CORE : slv8 := slv(to_unsigned(2#00000000#,8)); - RB_ADDR_IBUS : slv8 := slv(to_unsigned(2#10000000#,8))); + RB_ADDR_CORE : slv16 := slv(to_unsigned(2#0000000000000000#,16)); + RB_ADDR_IBUS : slv16 := slv(to_unsigned(2#0000000010000000#,16))); port ( CLK : in slbit; -- clock RESET : in slbit; -- reset RB_MREQ : in rb_mreq_type; -- rbus: request RB_SRES : out rb_sres_type; -- rbus: response - RB_STAT : out slv3; -- rbus: status flags + RB_STAT : out slv4; -- rbus: status flags RB_LAM : out slbit; -- remote attention CPU_RESET : out slbit; -- cpu master reset CP_CNTL : out cp_cntl_type; -- console control port @@ -199,7 +201,7 @@ architecture syn of pdp11_core_rbus is icpureset := '0'; -- look for init's against the rbus base address, generate subsystem resets - if RB_MREQ.init='1' and RB_MREQ.we='1' and RB_MREQ.addr=RB_ADDR_CORE then + if RB_MREQ.init='1' and RB_MREQ.addr=RB_ADDR_CORE then icpureset := RB_MREQ.din(0); end if; @@ -207,10 +209,10 @@ architecture syn of pdp11_core_rbus is n.rbseli := '0'; n.rbselc := '0'; if RB_MREQ.aval='1' then - if RB_MREQ.addr(7 downto 5)=RB_ADDR_CORE(7 downto 5) then + if RB_MREQ.addr(15 downto 5)=RB_ADDR_CORE(15 downto 5) then n.rbselc := '1'; end if; - if RB_MREQ.addr(7 downto 5)=RB_ADDR_IBUS(7 downto 5) then + if RB_MREQ.addr(15 downto 5)=RB_ADDR_IBUS(15 downto 5) then n.rbseli := '1'; end if; end if; @@ -401,9 +403,10 @@ architecture syn of pdp11_core_rbus is RB_SRES.busy <= irb_busy; RB_SRES.dout <= irb_dout; - RB_STAT(0) <= CP_STAT.cpugo; - RB_STAT(1) <= CP_STAT.cpuhalt or CP_STAT.cpurust(CP_STAT.cpurust'left); + RB_STAT(3) <= '0'; RB_STAT(2) <= CP_STAT.cmderr or CP_STAT.cmdmerr; + RB_STAT(1) <= CP_STAT.cpuhalt or CP_STAT.cpurust(CP_STAT.cpurust'left); + RB_STAT(0) <= CP_STAT.cpugo; RB_LAM <= irb_lam; diff --git a/rtl/w11a/pdp11_dpath.vhd b/rtl/w11a/pdp11_dpath.vhd index 4f02cec6..b2c06207 100644 --- a/rtl/w11a/pdp11_dpath.vhd +++ b/rtl/w11a/pdp11_dpath.vhd @@ -1,4 +1,4 @@ --- $Id: pdp11_dpath.vhd 569 2014-07-13 14:36:32Z mueller $ +-- $Id: pdp11_dpath.vhd 581 2014-08-10 21:48:46Z mueller $ -- -- Copyright 2006-2014 by Walter F.J. Mueller -- @@ -28,6 +28,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-10 581 1.2.4 use c_cc_f_* -- 2014-07-12 569 1.2.3 use DIV_QUIT and S_DIV_SR for pdp11_munit -- 2011-11-18 427 1.2.2 now numeric_std clean -- 2010-09-18 300 1.2.1 rename (adlm)box->(oalm)unit @@ -161,7 +162,7 @@ begin AUNIT : pdp11_aunit port map ( DSRC => R_DSRC, DDST => R_DDST, - CI => CCIN(0), + CI => CCIN(c_cc_f_c), SRCMOD => CNTL.aunit_srcmod, DSTMOD => CNTL.aunit_dstmod, CIMOD => CNTL.aunit_cimod, @@ -208,7 +209,7 @@ begin CCIN <= PSW.cc; - OUNIT_CCOUT <= OUNIT_NZOUT & "0" & CCIN(0); -- clear v, keep c + OUNIT_CCOUT <= OUNIT_NZOUT & "0" & CCIN(c_cc_f_c); -- clear v, keep c proc_dres_sel: process (OUNIT_DOUT, AUNIT_DOUT, LUNIT_DOUT, MUNIT_DOUT, VM_DOUT, R_IREG, CP_DIN, CNTL) @@ -320,7 +321,7 @@ begin end case; end process proc_vmaddr_sel; - STAT.ccout_z <= CCOUT(2); -- current Z cc flag + STAT.ccout_z <= CCOUT(c_cc_f_z); -- current Z cc flag PSWOUT <= PSW; PCOUT <= GPR_PC; diff --git a/rtl/w11a/pdp11_lunit.vhd b/rtl/w11a/pdp11_lunit.vhd index 93bc614d..cef2acfc 100644 --- a/rtl/w11a/pdp11_lunit.vhd +++ b/rtl/w11a/pdp11_lunit.vhd @@ -1,6 +1,6 @@ --- $Id: pdp11_lunit.vhd 427 2011-11-19 21:04:11Z mueller $ +-- $Id: pdp11_lunit.vhd 581 2014-08-10 21:48:46Z mueller $ -- --- Copyright 2006-2011 by Walter F.J. Mueller +-- Copyright 2006-2014 by Walter F.J. Mueller -- -- This program is free software; you may redistribute and/or modify it under -- the terms of the GNU General Public License as published by the Free @@ -18,9 +18,10 @@ -- Dependencies: - -- Test bench: tb/tb_pdp11_core (implicit) -- Target Devices: generic --- Tool versions: xst 8.2, 9.1, 9.2, 12.1, 13.1; ghdl 0.18-0.29 +-- Tool versions: xst 8.2-14.7; ghdl 0.18-0.31 -- Revision History: -- Date Rev Version Comment +-- 2014-08-10 581 1.1.2 use c_cc_f_* -- 2011-11-18 427 1.1.1 now numeric_std clean -- 2010-09-18 300 1.1 renamed from lbox -- 2008-03-30 131 1.0.2 BUGFIX: SXT clears V condition code @@ -67,10 +68,10 @@ begin alias DSRC_H : slv8 is DSRC(15 downto 8); alias DDST_L : slv8 is DDST(7 downto 0); alias DDST_H : slv8 is DDST(15 downto 8); - alias NI : slbit is CCIN(3); - alias ZI : slbit is CCIN(2); - alias VI : slbit is CCIN(1); - alias CI : slbit is CCIN(0); + alias NI : slbit is CCIN(c_cc_f_n); + alias ZI : slbit is CCIN(c_cc_f_z); + alias VI : slbit is CCIN(c_cc_f_v); + alias CI : slbit is CCIN(c_cc_f_c); alias iout_l : slv8 is iout(7 downto 0); alias iout_h : slv8 is iout(15 downto 8); diff --git a/rtl/w11a/pdp11_munit.vhd b/rtl/w11a/pdp11_munit.vhd index f2d6dd6d..6d3ff08b 100644 --- a/rtl/w11a/pdp11_munit.vhd +++ b/rtl/w11a/pdp11_munit.vhd @@ -1,4 +1,4 @@ --- $Id: pdp11_munit.vhd 577 2014-08-03 20:49:42Z mueller $ +-- $Id: pdp11_munit.vhd 581 2014-08-10 21:48:46Z mueller $ -- -- Copyright 2006-2014 by Walter F.J. Mueller -- @@ -27,6 +27,7 @@ -- -- Revision History: -- Date Rev Version Comment +-- 2014-08-10 581 1.2.4 rename NEXT_ to N_; use c_cc_f_* -- 2014-08-05 578 1.2.3 fix proc_div sensitivity list -- 2014-08-03 577 1.2.2 use DTMP_POS rather signed(Q)>0 (xst bug for S-3) -- 2014-07-26 575 1.2.1 fix proc_omux sensitivity list @@ -86,16 +87,16 @@ architecture syn of pdp11_munit is signal R_ASH_V : slbit := '0'; -- V flag for ash/c signal R_ASH_C : slbit := '0'; -- C flag for ash/c - signal NEXT_DD_L : slv16 := (others=>'0'); - signal NEXT_DDO_LT : slbit := '0'; - signal NEXT_MAXFIX : slbit := '0'; - signal NEXT_QO_LT : slbit := '0'; - signal NEXT_DIV_V : slbit := '0'; - signal NEXT_SHC : slv6 := (others=>'0'); - signal NEXT_C1 : slbit := '0'; - signal NEXT_MSBO : slbit := '0'; - signal NEXT_ASH_V : slbit := '0'; - signal NEXT_ASH_C : slbit := '0'; + signal N_DD_L : slv16 := (others=>'0'); + signal N_DDO_LT : slbit := '0'; + signal N_MAXFIX : slbit := '0'; + signal N_QO_LT : slbit := '0'; + signal N_DIV_V : slbit := '0'; + signal N_SHC : slv6 := (others=>'0'); + signal N_C1 : slbit := '0'; + signal N_MSBO : slbit := '0'; + signal N_ASH_V : slbit := '0'; + signal N_ASH_C : slbit := '0'; signal SHC_TC_L : slbit := '0'; @@ -118,16 +119,16 @@ begin proc_regs: process (CLK) begin if rising_edge(CLK) then - R_DD_L <= NEXT_DD_L; - R_DDO_LT <= NEXT_DDO_LT; - R_MAXFIX <= NEXT_MAXFIX; - R_QO_LT <= NEXT_QO_LT; - R_DIV_V <= NEXT_DIV_V; - R_SHC <= NEXT_SHC; - R_C1 <= NEXT_C1; - R_MSBO <= NEXT_MSBO; - R_ASH_V <= NEXT_ASH_V; - R_ASH_C <= NEXT_ASH_C; + R_DD_L <= N_DD_L; + R_DDO_LT <= N_DDO_LT; + R_MAXFIX <= N_MAXFIX; + R_QO_LT <= N_QO_LT; + R_DIV_V <= N_DIV_V; + R_SHC <= N_SHC; + R_C1 <= N_C1; + R_MSBO <= N_MSBO; + R_ASH_V <= N_ASH_V; + R_ASH_C <= N_ASH_C; end if; end process proc_regs; @@ -166,25 +167,25 @@ begin S_DIV, S_DIV_CN, S_ASH, S_ASH_CN, S_ASHC, S_ASHC_CN) begin - NEXT_SHC <= R_SHC; - NEXT_C1 <= R_C1; + N_SHC <= R_SHC; + N_C1 <= R_C1; if S_ASH='1' or S_ASHC='1' then - NEXT_SHC <= DDST(5 downto 0); - NEXT_C1 <= '1'; + N_SHC <= DDST(5 downto 0); + N_C1 <= '1'; end if; if S_DIV = '1' then - NEXT_SHC <= "001111"; - NEXT_C1 <= '1'; + N_SHC <= "001111"; + N_C1 <= '1'; end if; if S_DIV_CN='1' or S_ASH_CN='1' or S_ASHC_CN='1' then if R_SHC(5) = '0' then - NEXT_SHC <= slv(unsigned(R_SHC) - 1); + N_SHC <= slv(unsigned(R_SHC) - 1); else - NEXT_SHC <= slv(unsigned(R_SHC) + 1); + N_SHC <= slv(unsigned(R_SHC) + 1); end if; - NEXT_C1 <= '0'; + N_C1 <= '0'; end if; SHC_TC_L <= '0'; @@ -217,11 +218,11 @@ begin begin - NEXT_DD_L <= R_DD_L; - NEXT_DDO_LT <= R_DDO_LT; - NEXT_MAXFIX <= R_MAXFIX; - NEXT_QO_LT <= R_QO_LT; - NEXT_DIV_V <= R_DIV_V; + N_DD_L <= R_DD_L; + N_DDO_LT <= R_DDO_LT; + N_MAXFIX <= R_MAXFIX; + N_QO_LT <= R_QO_LT; + N_DIV_V <= R_DIV_V; div_zero := '0'; div_ovfl := '0'; @@ -276,13 +277,13 @@ begin end if; if S_DIV = '1' then - NEXT_DDO_LT <= DD_H(15); - NEXT_DD_L <= GPR_DSRC; - NEXT_MAXFIX <= '0'; + N_DDO_LT <= DD_H(15); + N_DD_L <= GPR_DSRC; + N_MAXFIX <= '0'; if DDST_NMAX = '1' and GPR_DSRC = "0000000000000000" then - NEXT_MAXFIX <= '1'; -- b_dr_nmax && (ddi_l == 0) + N_MAXFIX <= '1'; -- b_dr_nmax && (ddi_l == 0) end if; - NEXT_QO_LT <= DD_H(15) xor DR(15); -- b_di_lt ^ b_dr_lt + N_QO_LT <= DD_H(15) xor DR(15); -- b_di_lt ^ b_dr_lt end if; if R_C1 = '1' then @@ -314,17 +315,17 @@ begin end if; end if; end if; - NEXT_DIV_V <= div_ovfl; + N_DIV_V <= div_ovfl; elsif S_DIV_SR = '1' then if R_QO_LT='1' and DTMP_POS='1' then div_ovfl := '1'; end if; - NEXT_DIV_V <= div_ovfl; + N_DIV_V <= div_ovfl; end if; if S_DIV_CN = '1' then - NEXT_DD_L <= R_DD_L(14 downto 0) & '0'; + N_DD_L <= R_DD_L(14 downto 0) & '0'; end if; if S_DIV_CN = '1' then @@ -349,27 +350,27 @@ begin S_ASH, S_ASH_CN, S_ASHC, S_ASHC_CN, SHC_TC_L) begin - NEXT_MSBO <= R_MSBO; - NEXT_ASH_V <= R_ASH_V; - NEXT_ASH_C <= R_ASH_C; + N_MSBO <= R_MSBO; + N_ASH_V <= R_ASH_V; + N_ASH_C <= R_ASH_C; if S_ASH='1' or S_ASHC='1' then - NEXT_MSBO <= DSRC(15); - NEXT_ASH_V <= '0'; - NEXT_ASH_C <= '0'; + N_MSBO <= DSRC(15); + N_ASH_V <= '0'; + N_ASH_C <= '0'; end if; if (S_ASH_CN='1' or S_ASHC_CN='1') and SHC_TC_L='0' then if R_SHC(5) = '0' then -- left shift if (R_MSBO xor DSRC(14))='1' then - NEXT_ASH_V <= '1'; + N_ASH_V <= '1'; end if; - NEXT_ASH_C <= DSRC(15); + N_ASH_C <= DSRC(15); else -- right shift if FUNC = c_munit_func_ash then - NEXT_ASH_C <= DSRC(0); + N_ASH_C <= DSRC(0); else - NEXT_ASH_C <= DTMP(0); + N_ASH_C <= DTMP(0); end if; end if; end if; @@ -440,36 +441,36 @@ begin case FUNC is when c_munit_func_mul => - CCOUT(3) <= DSRC(15); -- N - CCOUT(2) <= DSRC_ZERO and DTMP_ZERO;-- Z - CCOUT(1) <= '0'; -- V=0 - CCOUT(0) <= mul_c; -- C + CCOUT(c_cc_f_n) <= DSRC(15); -- N + CCOUT(c_cc_f_z) <= DSRC_ZERO and DTMP_ZERO; -- Z + CCOUT(c_cc_f_v) <= '0'; -- V=0 + CCOUT(c_cc_f_c) <= mul_c; -- C when c_munit_func_div => if DDST_ZERO = '1' then - CCOUT(3) <= '0'; -- N=0 if div/0 - CCOUT(2) <= '1'; -- Z=1 if div/0 + CCOUT(c_cc_f_n) <= '0'; -- N=0 if div/0 + CCOUT(c_cc_f_z) <= '1'; -- Z=1 if div/0 elsif R_DIV_V = '1' then - CCOUT(3) <= R_QO_LT; -- N (send expected sign) - CCOUT(2) <= '0'; -- Z (from unchanged reg) ??? veri + CCOUT(c_cc_f_n) <= R_QO_LT; -- N (send expected sign) + CCOUT(c_cc_f_z) <= '0'; -- Z (from unchanged reg) ??? veri else - CCOUT(3) <= DTMP(15); -- N (from Q (DTMP)) - CCOUT(2) <= DTMP_ZERO; -- Z (from Q (DTMP)) ??? verify + CCOUT(c_cc_f_n) <= DTMP(15); -- N (from Q (DTMP)) + CCOUT(c_cc_f_z) <= DTMP_ZERO; -- Z (from Q (DTMP)) ??? verify end if; - CCOUT(1) <= R_DIV_V or DDST_ZERO; -- V - CCOUT(0) <= DDST_ZERO; -- C (dst=0) + CCOUT(c_cc_f_v) <= R_DIV_V or DDST_ZERO; -- V + CCOUT(c_cc_f_c) <= DDST_ZERO; -- C (dst=0) when c_munit_func_ash => - CCOUT(3) <= DSRC(15); -- N - CCOUT(2) <= DSRC_ZERO; -- Z - CCOUT(1) <= R_ASH_V; -- V - CCOUT(0) <= R_ASH_C; -- C + CCOUT(c_cc_f_n) <= DSRC(15); -- N + CCOUT(c_cc_f_z) <= DSRC_ZERO; -- Z + CCOUT(c_cc_f_v) <= R_ASH_V; -- V + CCOUT(c_cc_f_c) <= R_ASH_C; -- C when c_munit_func_ashc => - CCOUT(3) <= DSRC(15); -- N - CCOUT(2) <= DSRC_ZERO and DTMP_ZERO;-- Z - CCOUT(1) <= R_ASH_V; -- V - CCOUT(0) <= R_ASH_C; -- C + CCOUT(c_cc_f_n) <= DSRC(15); -- N + CCOUT(c_cc_f_z) <= DSRC_ZERO and DTMP_ZERO;-- Z + CCOUT(c_cc_f_v) <= R_ASH_V; -- V + CCOUT(c_cc_f_c) <= R_ASH_C; -- C when others => null; end case; diff --git a/rtl/w11a/tb/tb_pdp11core_stim.dat b/rtl/w11a/tb/tb_pdp11core_stim.dat index 278e3df1..438656f5 100644 --- a/rtl/w11a/tb/tb_pdp11core_stim.dat +++ b/rtl/w11a/tb/tb_pdp11core_stim.dat @@ -1,7 +1,8 @@ -# $Id: tb_pdp11core_stim.dat 569 2014-07-13 14:36:32Z mueller $ +# $Id: tb_pdp11core_stim.dat 614 2014-12-20 15:00:45Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-12-20 614 2.4 adopted to rlink v4 # 2014-07-13 569 2.3 after ECO-026: correct test 31.1 wrong V=1 cases # correct test 37.2: 2 V=1 cases have regs now updated # 2010-06-20 308 2.2.1 add wibrb, ribr, wibr based tests @@ -221,7 +222,7 @@ C with wm/rm wal 140000 wah 000177 .merr 1 -.sdef s=10000001 +.sdef s=01000001 wm 000000 rm d=- .merr 0 @@ -232,7 +233,7 @@ C with bwm/brm wal 140000 wah 000177 .merr 1 -.sdef s=10000001 +.sdef s=01000001 bwm 2 000000 000000 @@ -242,7 +243,7 @@ bwm 2 wal 140000 wah 000177 .merr 1 -.sdef s=10000001 +.sdef s=01000001 brm 2 d=- d=- @@ -253,7 +254,7 @@ C test access error handling to IB space (use 00160000) C with wm/rm wal 160000 .merr 1 -.sdef s=10000001 +.sdef s=01000001 wm 000000 rm d=- .merr 0 @@ -262,7 +263,7 @@ C with bwm/brm # wal 160000 .merr 1 -.sdef s=10000001 +.sdef s=01000001 bwm 2 000000 000000 @@ -271,7 +272,7 @@ bwm 2 # wal 160000 .merr 1 -.sdef s=10000001 +.sdef s=01000001 brm 2 d=- d=- @@ -841,7 +842,9 @@ stapc 003500 -- start @ 3500 rpc d=003502 -- ! should hang here ... .wait 20 -- let it go rpc d=003502 -- ! should hang here ... +.sdef s=00001000 sto +.sdef s=00000000,01110000 wtlam d=000001 -- harvest attn due to go 1->0 transition of sto command rpc d=003502 -- ! should stay there ... # @@ -910,7 +913,9 @@ brm 8 d=073574 d=073576 # +.sdef s=00001000 sto +.sdef s=00000000,01110000 wtlam d=000001 -- harvest attn due to go 1->0 transition of sto command rpc d=003542 -- ! #[[on]] diff --git a/tools/bin/.cvsignore b/tools/bin/.cvsignore index 2ecbac9d..989aff55 100644 --- a/tools/bin/.cvsignore +++ b/tools/bin/.cvsignore @@ -1 +1,2 @@ cycfx2prog +tclshcpp diff --git a/tools/bin/telnet_starter b/tools/bin/console_starter similarity index 91% rename from tools/bin/telnet_starter rename to tools/bin/console_starter index 27658036..475e9b65 100755 --- a/tools/bin/telnet_starter +++ b/tools/bin/console_starter @@ -1,7 +1,7 @@ #!/usr/bin/perl -w -# $Id: telnet_starter 547 2013-12-29 13:10:07Z mueller $ +# $Id: console_starter 581 2014-08-10 21:48:46Z mueller $ # -# Copyright 2009-2010 by Walter F.J. Mueller +# Copyright 2009-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -14,6 +14,7 @@ # # Revision History: # Date Rev Vers Comment +# 2014-08-10 581 1.1 rename to console_starter # 2010-07-04 312 1.0.3 correct telnet_wrapper path # 2010-04-26 284 1.0.2 add error check for GetOptions # 2009-11-08 248 1.0.1 proper -h handling & text; add -t support; @@ -30,7 +31,7 @@ GetOptions(\%opts, "h", "t:s", "d:s", "s", "w", "l") or die "bad options"; if (exists $opts{h}) { - print "usage: telnet_starter [-h] [-t type] [-d type] [-s] [-w] [-l]\n"; + print "usage: console_starter [-h] [-t type] [-d type] [-s] [-w] [-l]\n"; print " -h help, print this text and quit\n"; print " -t term set terminal type, vt100 or vt52 (def: vt100)\n"; print " -d dev set device type, DLx or DZx for x'the line (def: DL0)\n"; diff --git a/tools/bin/fx2load_wrapper b/tools/bin/fx2load_wrapper index 34dfc3f8..a07ddeed 100755 --- a/tools/bin/fx2load_wrapper +++ b/tools/bin/fx2load_wrapper @@ -1,7 +1,7 @@ #!/usr/bin/perl -w -# $Id: fx2load_wrapper 547 2013-12-29 13:10:07Z mueller $ +# $Id: fx2load_wrapper 604 2014-11-16 22:33:09Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -14,6 +14,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-08-10 581 1.1 use _ic instead of _as as default firmware # 2012-02-11 457 1.0.1 use RETRO_FX2_VID/PID; check iProduct string # 2011-12-29 446 1.0 Initial version # @@ -38,9 +39,9 @@ if (not defined $opts{board}) { $opts{board} = "nexys2"; } if (not defined $opts{file}) { - $opts{file} = "nexys2_jtag_2fifo_as.ihx" if $opts{board} eq "nexys2"; - $opts{file} = "nexys3_jtag_2fifo_as.ihx" if $opts{board} eq "nexys3"; - $opts{file} = "nexys3_jtag_2fifo_as.ihx" if $opts{board} eq "atlys"; + $opts{file} = "nexys2_jtag_2fifo_ic.ihx" if $opts{board} eq "nexys2"; + $opts{file} = "nexys3_jtag_2fifo_ic.ihx" if $opts{board} eq "nexys3"; + $opts{file} = "nexys3_jtag_2fifo_ic.ihx" if $opts{board} eq "atlys"; } if (not defined $opts{ihx_path}) { unless (exists $ENV{RETROBASE}) { @@ -213,7 +214,6 @@ sub print_help { print " --ihx_path=p path to ihx files\n"; } - #------------------------------------------------------------------------------- sub get_usb_id { diff --git a/tools/bin/svn_set_ignore b/tools/bin/svn_set_ignore index 177db06f..c3a56631 100755 --- a/tools/bin/svn_set_ignore +++ b/tools/bin/svn_set_ignore @@ -1,7 +1,7 @@ #!/usr/bin/perl -w -# $Id: svn_set_ignore 547 2013-12-29 13:10:07Z mueller $ +# $Id: svn_set_ignore 601 2014-11-07 22:44:43Z mueller $ # -# Copyright 2007-2010 by Walter F.J. Mueller +# Copyright 2007-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -14,6 +14,7 @@ # # Revision History: # Date Rev Vers Comment +# 2014-11-04 601 1.1 use 'svn info' rather /.svn check for svn >= 1.7 # 2010-04-26 284 1.0.1 add error check for GetOptions # 2007-06-16 56 1.0 Initial version # @@ -56,7 +57,12 @@ sub do_dir { my @new_ipat; my %ipat; - return unless -d "$dirname/.svn"; + # skip ise directories (they have sometimes strange chars in dir names + return if $dirname =~ m|/ise/|; + # check for svn working directory + my $svn_info = `svn info $dirname 2>&1`; + return if $?; + print "$dirname\n"; open (SVN, "svn pg svn:ignore $dirname|") or die "failed to open svn pg pipe"; @cur_ipat = grep /.+/, ; # prop get and drop empty lines diff --git a/tools/bin/ti_rri b/tools/bin/ti_rri index 05fe9510..a42788af 100755 --- a/tools/bin/ti_rri +++ b/tools/bin/ti_rri @@ -1,8 +1,8 @@ -#! /usr/bin/env tclsh +#! /usr/bin/env tclshcpp # -*- tcl -*- -# $Id: ti_rri 522 2013-05-24 17:50:29Z mueller $ +# $Id: ti_rri 601 2014-11-07 22:44:43Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -15,6 +15,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-07 601 1.2 use tclshcpp (C++ based) rather tclsh # 2013-05-19 521 1.1.6 setup proper interactive handling; add --run reap # 2013-04-26 510 1.1.5 reorganize readline startup # 2013-04-12 504 1.1.4 add --pack; trailing '-' argv implies --int diff --git a/tools/bin/ticonv_pdpcp b/tools/bin/ticonv_pdpcp index 04f8659d..1247967d 100755 --- a/tools/bin/ticonv_pdpcp +++ b/tools/bin/ticonv_pdpcp @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $Id: ticonv_pdpcp 576 2014-08-02 12:24:28Z mueller $ +# $Id: ticonv_pdpcp 609 2014-12-07 19:35:25Z mueller $ # # Copyright 2013-2014 by Walter F.J. Mueller # @@ -14,7 +14,8 @@ # # Revision History: # Date Rev Version Comment -# 2014-07-31 576 1.1 add -cmax option (default = 3); support .sdef +# 2014-12-07 609 1.2 use rlink::anena (for rlink v4) +# 2014-07-31 576 1.1 add --cmax option (default = 3); support .sdef # 2014-07-26 575 1.0.4 add --tout option (sets wtcpu timeout) # 2013-05-19 521 1.0.3 use -be subopt of -wibrb # 2013-04-12 504 1.0.2 renamed from pi2ti_pdpcp; fix [rm]wi handling @@ -105,11 +106,10 @@ while () { cmdlist_do(); print "rlc oob -sbcntl $1 $2\n"; - # .anena (0|1) -> rlc exec -init ----------------------------------- + # .anena (0|1) -> rlink::anena n ----------------------------------- } elsif ($cmd =~ /^\.anena\s+(\d)$/) { cmdlist_do(); - my $dat = $1 ? '[regbld rlink::INIT anena]' : '0'; - print "rlc exec -init 0xff $dat\n"; + print "rlink::anena $1\n"; print "rlc exec -attn\n"; # .reset ----------------------------------------------------------- diff --git a/tools/dox/w11_cpp.Doxyfile b/tools/dox/w11_cpp.Doxyfile index 51327e2f..43f161d6 100644 --- a/tools/dox/w11_cpp.Doxyfile +++ b/tools/dox/w11_cpp.Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "w11 - cpp" -PROJECT_NUMBER = 0.61 +PROJECT_NUMBER = 0.62 PROJECT_BRIEF = "Backend server for Rlink and w11" PROJECT_LOGO = OUTPUT_DIRECTORY = $(RETRODOXY)/w11/cpp diff --git a/tools/dox/w11_tcl.Doxyfile b/tools/dox/w11_tcl.Doxyfile index f42fe010..c500bb7d 100644 --- a/tools/dox/w11_tcl.Doxyfile +++ b/tools/dox/w11_tcl.Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "w11 - tcl" -PROJECT_NUMBER = 0.61 +PROJECT_NUMBER = 0.62 PROJECT_BRIEF = "Backend server for Rlink and w11" PROJECT_LOGO = OUTPUT_DIRECTORY = $(RETRODOXY)/w11/tcl diff --git a/tools/dox/w11_vhd_all.Doxyfile b/tools/dox/w11_vhd_all.Doxyfile index 9c17da5c..55b6c59a 100644 --- a/tools/dox/w11_vhd_all.Doxyfile +++ b/tools/dox/w11_vhd_all.Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "w11 - vhd" -PROJECT_NUMBER = 0.61 +PROJECT_NUMBER = 0.62 PROJECT_BRIEF = "W11 CPU core and support modules" PROJECT_LOGO = OUTPUT_DIRECTORY = $(RETRODOXY)/w11/vhd diff --git a/tools/fx2/bin/nexys2_jtag.ihx b/tools/fx2/bin/nexys2_jtag.ihx index 0e58ba2c..5c9b9937 100644 --- a/tools/fx2/bin/nexys2_jtag.ihx +++ b/tools/fx2/bin/nexys2_jtag.ihx @@ -1,4 +1,4 @@ -:06000000020DB102006BCD +:06000000020E2302006B5A :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,426 +12,130 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DB700020DBF6B -:030DD200020DBA55 -:050DBA001203F180FEB0 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120637D001D000D005D0F4 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C0051206741201AAD005D00462 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C00512060BB9 -:06034C00D005D004801072 -:0E0352008A82C004C0051206291201AAD00535 -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E600300203120914AD -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206C312BA -:0603FF000455120CE4128B -:08040500087ED2AF12078D0240 -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E188E0F58212040FD0029034 -:0D04F100E188E02AFAF582C00212040F90A3 -:0B04FE00E1A6E0F58212040FD002908E -:0A050900E1A6E02AF58212040F902B -:0A051300E1BEE0F58212040F7A0049 -:0E051D0090E188E0FBC3EA64808BF063F0801D -:0B052B0095F05017EA2488F582E434B4 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1A6E0FBC3EA64808BF063F080D4 -:0B05560095F05017EA24A6F582E4346B -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1BEE0FBC3EA64808BF063F08091 -:0B05810095F05017EA24BEF582E43428 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022000010100CF -:0EE1230080FA0904000002FFFFFF02070581D9 -:0BE131000200020007050202000200CD -:0EE13C001201000200000040C016EF030400B4 -:04E14A0001020301CA -:0AE14E000A060002FFFFFF40010077 -:0EE158000902200001010080FA090400000203 -:0EE16600FFFFFF0207058102400000070502CF -:04E174000240000065 -:01E1780004A2 -:02E1790082E141 -:02E17B0088E139 -:02E17D00A6E119 -:02E17F00BEE1FF -:06E1820006030000090481 -:0EE188001E037700770077002E0072006500FE -:0EE19600740072006F00310031002E00640032 -:02E1A400650014 -:0EE1A60018036E0065007800790073003200E7 -:0AE1B4005F006A007400610067005C -:0EE1BE0012033000300030003000300030001E -:04E1CC0030003000EF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:0B060000D2B775B5809001F4020DA088 -:0E060B00AA82ABB574FE5BF5F0741C45F0F5E9 -:0E061900B5EA1392B4EAA2E192B3EAA2E49227 -:02062700B222FD -:0E06290012060BA2B0E433FA74024AF58222E4 -:0E063700E5821392B2D2B413C2B492B2D2B41E -:0E06450013C2B492B2D2B413C2B492B2D2B401 -:0E06530013C2B492B2D2B413C2B492B2D2B4F3 -:0E06610013C2B492B2D2B413C2B492B2D2B4E5 -:05066F0000C2B42222CC -:0E067400E582A2B01392B2D2B4C2B4A2B01307 -:0E06820092B2D2B4C2B4A2B01392B2D2B4C239 -:0E069000B4A2B01392B2D2B4C2B4A2B013920C -:0E069E00B2D2B4C2B4A2B01392B2D2B4C2B4FB -:0E06AC00A2B01392B2D2B4C2B4A2B01392B2F2 -:0906BA00D2B400C2B4F582222280 -:0D06C30090E6007412F090E60174ABF09028 -:0E06D000E6707480F00090E60274E0F0009096 -:0E06DE00E60374F9F00090E6047480F00090DA -:0D06EC00E60B7403F00090E610E4F00090BF -:0D06F900E61174A0F00090E618E4F0009007 -:0E070600E6047402F00090E61274A2F0009077 -:0E071400E6137402F00090E6147402F00090F8 -:0E072200E6157402F00090E6047404F00090F6 -:0E073000E6047406F00090E6047408F00090F1 -:0E073E00E604E4F00090E619E4F00090E61AFC -:0E074C00E4F00090E61BE4F00090E60BE4F011 -:0E075A00000090E6917480F00090E6917480AB -:03076800F000227C -:08076B0090E6A0E04401F02239 -:0E077300AA8274805AC423541FFB740F5A903C -:0C078100E6834BF090E683E04420F02279 -:0E078D0090E680E0440AF09000FA120DA09071 -:0E079B00E65D74FFF090E65F74FFF05391EF9F -:0807A90090E680E054F7F02215 -:060DCC00E478FFF6D8FDFB -:060DB1007512007513002D -:0A07B10090E680E0FA30E7197514B5 -:0307BB00007515B1 -:0307BE00E17516CC -:0307C10012751797 -:0307C400E17518C4 -:0307C7001C751985 -:0307CA00E1751ABC -:0307CD0058751B41 -:0207D000E12224 -:0407D20075143C75E9 -:0307D60015E175B5 -:0307D900164E7544 -:0307DC0017E175AD -:0307DF0018587532 -:0307E20019E175A5 -:0307E5001A1C7566 -:0307E8001BE122F0 -:0907EB005391EF75A100D2023216 -:0C07F400C021C0E0C0F0C082C083C00281 -:0E080000C003C004C005C006C007C000C00190 -:0E080E00C0D075D0005391EF75A1001207B154 -:0E081C00D0D0D001D000D007D006D005D00437 -:0D082A00D003D002D083D082D0F0D0E0D037 -:0208370021326C -:0C083900C021C0E0C0F0C082C083C0023B -:0E084500C003C004C005C006C007C000C0014B -:0E085300C0D075D0005391EF75A1001207B10F -:0E086100D0D0D001D000D007D006D005D004F2 -:0D086F00D003D002D083D082D0F0D0E0D0F2 -:02087C00213227 -:05087E001207B1751C1A -:03088300EB751DF5 -:0808860007758200120C3D759C -:03088E001CF475E2 -:060891001D077582101224 -:040897000C3D751C83 -:03089B0039751D8F -:0C089E0008758214120C3D90E65C743169 -:0208AA00F0223A -:0D08AC00E582547FFA24F750047582002283 -:0708B900BA0104758201225F -:0808C000530201E4BA00010437 -:0308C800F5822294 -:0E08CB00AA82BA010C90E6A1E0FB7C008B82B1 -:0308D9008C8322EB -:0E08DC00BA810C90E6A2E0FB7C008B828C833C -:0108EA0022EB -:0E08EB0053027FEA700C90E6A0E0FB7C008BCD -:0408F900828C832248 -:0E08FD0090E6A3E0FB7C00EAC313FA7D00EA5C -:09090B002BFBED3C8B82F58322ED -:0C091400C20290E6B8E0FA530260BA009C -:030920000280282A -:05092300BA2002800D66 -:05092800BA4002800E40 -:05092D00BA6002800326 -:03093200020BD2E3 -:0609350012076B020BD259 -:0A093B00120372E5826003020BD282 -:0609450012076B020BD249 -:0D094B0090E6B8E0FA530280BA8002800303 -:03095800020AD3BD -:0B095B0090E6B9E0FABA0003020A4C73 -:05096600BA0602803515 -:05096B00BA080280083B -:05097000BA0A02801725 -:03097500020ACDA6 -:0C09780090E740E512F090E68AE4F09071 -:08098400E68B7401F0020BD2B6 -:0C098C0090E740E513F090E68AE4F0905C -:08099800E68B7401F0020BD2A2 -:0A09A00090E6BBE0FABA01028017EE -:0509AA00BA02028038D2 -:0509AF00BA03028059AB -:0509B400BA0602801BE1 -:0509B900BA0702803CBA -:0309BE00020A46E4 -:0A09C100AA14AB1590E6B3EBF07B2F -:0909CB000090E6B4EAF0020BD240 -:0A09D400AA16AB1790E6B3EBF07B18 -:0909DE000090E6B4EAF0020BD22D -:0A09E700AA18AB1990E6B3EBF07B01 -:0909F1000090E6B4EAF0020BD21A -:0A09FA00AA1AAB1B90E6B3EBF07BEA -:090A04000090E6B4EAF0020BD206 -:0E0A0D0090E6BAE0FA90E178E0FBC3EA9B4085 -:070A1B000612076B020BD26B -:0C0A220090E6BAE075F002A42479F58299 -:0B0A2E0074E135F0F583E0FAA3E090DE -:0D0A3900E6B3F07B0090E6B4EAF0020BD2C9 -:060A460012076B020BD247 -:0D0A4C0090E6B8E0FA53021FBA0002800ADB -:050A5900BA0102801B40 -:050A5E00BA0266802CC5 -:0E0A630090E740E4F090E741F090E68AF090D2 -:080A7100E68B7402F0020BD2C7 -:0E0A790090E740E4F090E741F090E68AF090BC -:080A8700E68B7402F0020BD2B1 -:0E0A8F0090E6BCE0F5821208ACE5826025908E -:0E0A9D00E6BCE0F5821208CBE0FA53020190AD -:0E0AAB00E740EAF090E741E4F090E68AF09030 -:080AB900E68B7402F0020BD27F -:060AC10012076B020BD2CC -:060AC70012076B020BD2C6 -:060ACD0012076B020BD2C0 -:0C0AD30090E6B9E0FA24F45003020BCFC7 -:070ADF00EA2A2A900AE673DF -:070AE600020BCF020B1C0202 -:060AED000B97020B7802DA -:060AF3000BCF020BCF0245 -:060AF9000BCF020BCF023F -:060AFF000BCF020B0A02FE -:050B05000BCF020B13F1 -:090B0A0090E6BAE0F512020BD2EC -:090B130090E6BAE0F513020BD2E2 -:0D0B1C0090E6B8E0FA53021FBA000280050F -:050B2900BA0247800A3A -:0A0B2E0090E6BAE012076B020BD24A -:0D0B380090E6BAE0703090E6BCE0F5821265 -:0D0B450008ACE582602390E6BCE0F582126A -:0E0B520008CBAA82AB83E0FC5304FE8A828BA0 -:0E0B600083ECF090E6BCE0F58212077380642F -:050B6E0012076B805F1F -:050B730012076B805A1F -:0E0B780090E6B8E0FA53021FBA004F90E6BABA -:070B8600E0FABA010280054C -:050B8D00BA02028040E5 -:050B920012076B803B1F -:0E0B970090E6BAE0FA702C90E6BCE0F582120F -:0D0BA50008ACE582601A90E6BCE0F5821213 -:0E0BB20008CBAA82AB83E0FC4304018A828B4D -:050BC00083ECF0800D44 -:050BC50012076B80081F -:050BCA0012076B80031F -:030BCF0012076B9F -:080BD20090E6A0E04480F0224F -:050BDA00AA82BA03002D -:070BDF004005EA249C5001CF -:010BE60022EC -:090BE700740F5AFBBB03028007E6 -:070BF000740F5AFBBB0B451B -:0A0BF700A2AF9203C2AFEA2400F59A -:0C0C010082E43400F5837402F07B007480 -:0C0C0D00012AFCE43BFDEC2400F582ED24 -:0A0C19003400F583E51DFCF07402C1 -:0C0C23002AFAE43BFBEA2400F582EB34E3 -:0A0C2F0000F583AA1C7B00EAF0A286 -:030C39000392AF74 -:010C3C002295 -:080C3D00E582FA248350012234 -:060C4500EA5403600122E5 -:0A0C4B00A2AF9204C2AFEA2400F544 -:0C0C550082E43401F5837402F07B00742B -:0C0C6100012AFCE43BFDEC2400F582EDD0 -:0A0C6D003401F583E51DF074022A3E -:0B0C7700FAE43BFBEA2400F582EB34BA -:080C820001F583AA1CEAF0A2AF -:040C8A000492AF22FF -:050C8E00AA82BA8000FB -:070C93004005EA244B50016B -:010C9A002237 -:060C9B00EA54036001228F -:0A0CA100A2AF9205C2AFEA2480F56D -:0C0CAB0082E43400F5837402F07B0074D6 -:0C0CB700012AFCE43BFDEC2480F582EDFA -:0A0CC3003400F583E51DF074022AE9 -:0B0CCD00FAE43BFBEA2480F582EB34E4 -:080CD80000F583AA1CEAF0A25A -:040CE0000592AF22A8 -:080CE400C2E8C2EA751C0075AC -:060CEC001D017582431298 -:040CF2000BDA751C88 -:030CF60080751DE9 -:0C0CF90000758253120BDA0090E650E404 -:0E0D0500F00090E652E4F00090E654E4F000B6 -:0E0D130090E656E4F00090E65174FFF0009078 -:0E0D2100E65374FFF00090E65574FFF000906A -:0E0D2F00E65774FFF00090E658E4F090E659A5 -:0E0D3D0074FFF090E65AE4F090E65B74FFF06D -:0E0D4B0090E65CE4F090E65D74FFF090E65EEA -:0E0D5900E4F090E65F74FFF00090E660E4F0D6 -:0D0D67000090E66174FFF090E662E4F09009 -:0E0D7400E66374FFF090E665E4F090E66874C4 -:0A0D82000BF05391AFD2E8D2EA2241 -:010D8C002244 -:020D8D00AA8238 -:060D8F00120D8CDAFB22BC -:030D950090FB5080 -:080D9800A3E582458370F922F6 -:040DA000AA82AB83F5 -:080DA400120D951ABAFF011BA4 -:050DAC00EA4B70F42287 -:030DBF007581211A -:0A0DC2001205DAE5826003020DBAA3 +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E2900020E2F87 +:030E4200020E2C71 +:030E2C000203F4CA +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120635D000D001D004D00580D88A068B078E0D +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C0041206721201AA8D +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120607D004D00580108F82C005C0041206271201AAD0E3 +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209641201BF80F5C2AF90E609E4F0120180120697 +:12040000C1120459120D351208CBD2AF1207BB0203E93E +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E186E0F582120412D00790E186E09A +:2004F2002FFFF582C00712041290E1A4E0F582120412D00790E1A4E02FF58212041290E1B7 +:20051200BCE0F5821204127F0090E186E0FEC3EF64808EF063F08095F05017EF2486F58257 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1A4E0FEC3EF64808EF063CC +:20055200F08095F05017EF24A4F582E434E1F583E0F582C007120412D0070F80D77F0090FC +:20057200E1BCE0FEC3EF64808EF063F08095F05017EF24BCF582E434E1F583E0F582C00746 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF400100090220005C +:20E1200001010080FA0904000002FFFFFF020705810200020007050202000200120100029D +:20E1400000000040C016EF030400010203010A060002FFFFFF4001000902200001010080AF +:20E16000FA0904000002FFFFFF0207058102400000070502024000000482E186E1A4E1BC69 +:01E18000E1BD +:20E18200040309041E037700770077002E0072006500740072006F00310031002E00640095 +:20E1A200650018036E00650078007900730032005F006A00740061006700120330003000FA +:0CE1C20030003000300030003000300031 +:2005F80022222222D2B775B5809001F4020E12AF82AEB574FE5E441CF5B5EF13920392B436 +:20061800EFA2E1920392B3EFA2E4920392B222120607A2B0E433FF74024FF58222E58213A7 +:2006380092B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B48C +:2006580013C2B492B2D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B0139271 +:20067800B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4C5 +:20069800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2AA +:0906B800D2B400C2B4F582222282 +:2006C10090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6AB +:2006E1000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000F9 +:200701000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A26D +:20072100F000000090E6137402F000000090E6147402F000000090E6157402F00000009068 +:20074100E6047404F000000090E6047406F000000090E6047408F000000090E604E4F0002E +:20076100000090E619E4F000000090E61AE4F000000090E61BE4F000000090E60BE4F000F7 +:18078100000000000090E6917480F000000090E6917480F00000002268 +:2007990090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E04420C1 +:2007B900F02290E680E0440AF09000FA120E1290E65D74FFF090E65F74FFF0AF9174EF5FCE +:0A07D900F59190E680E054F7F0225D +:060E3C00E478FFF6D8FD8A +:060E2300751200751300BA +:2007E30090E680E0FF30E7197514007515E17516127517E175181C7519E1751A58751BE183 +:200803002275143C7515E175164E7517E17518587519E1751A1C751BE122C0E0C007C0D0B4 +:2008230075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C083ED +:20084300C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012F4 +:2008630007E3D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C057 +:2008830021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF912E +:2008A30074EF5FF59175A1001207E3D0D0D000D001D002D003D004D005D006D007D083D07C +:2008C30082D0F0D0E0D021321207E3751C1D751D08758200120C8E751C39751D08758210AE +:2008E300120C8E751C82751D08758214120C8E90E65C7431F022AF828F06747F5EFF24F72B +:20090300500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A1D9 +:20092300E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700CB5 +:2009430090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F5834F +:2009630022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF6002802A +:2009830003020C23120799020C23120375E5826003020C23120799020C2390E6B8E0FF5375 +:2009A3000780BF80028003020B2790E6B9E0FFBF0003020A9EBF06028035BF08028008BFAF +:2009C3000A028017020B2190E740E512F090E68AE4F090E68B7401F0020C2390E740E5138B +:2009E300F090E68AE4F090E68B7401F0020C2390E6BBE0FFBF01028017BF02028038BF03F3 +:200A0300028059BF0602801BBF0702803C020A98AE14AF1590E6B3EFF07F0090E6B4EEF059 +:200A2300020C23AE16AF1790E6B3EFF07F0090E6B4EEF0020C23AE18AF1990E6B3EFF07F23 +:200A43000090E6B4EEF0020C23AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C2390E6BAE0F8 +:200A6300FF90E178E0FEC3EF9E4006120799020C2390E6BAE075F002A42479F58274E1357B +:200A8300F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C23120799020C2390E6B8E0FFC9 +:200AA30053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A79 +:200AC300F090E68B7402F0020C2390E740E4F090E741F090E68AF090E68B7402F0020C23D0 +:200AE30090E6BCE0F5821208F9E582602590E6BCE0F58212091BE0FF53070190E740EFF0DC +:200B030090E741E4F090E68AF090E68B7402F0020C23120799020C23120799020C231207DF +:200B230099020C2390E6B9E0FF24F45003020C20EF240A83F582EF241083F583E473206B2A +:200B4300E8C920202020205920620C0B0B0B0C0C0C0C0C0B0C0B90E6BAE0F512020C239003 +:200B6300E6BAE0F513020C2390E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0B7 +:200B8300120799020C2390E6BAE0703090E6BCE0F5821208F9E582602390E6BCE0F582129E +:200BA300091BAE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821207A180641207998021 +:200BC3005F120799805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040BA +:200BE300120799803B90E6BAE0FF702C90E6BCE0F5821208F9E582601A90E6BCE0F58212C2 +:200C0300091BAE82AF83E0FD4305018E828F83EDF0800D1207998008120799800312079978 +:080C230090E6A0E04480F022FD +:200C2B00AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9254 +:200C4B0005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED34AE +:200C6B0000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A2054C +:200C8B0092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F5AB +:200CAB00837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43E2A +:200CCB00FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B5001CF +:200CEB0022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC85 +:200D0B00E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F532 +:200D2B0083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C2B751C80751D00D1 +:200D4B00758253120C2B00000090E650E4F000000090E652E4F000000090E654E4F0000021 +:200D6B000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FF34 +:200D8B00F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65BDF +:200DAB0074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E44F +:200DCB00F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0FA +:130DEB00AF9174EF5FF591AF9174BF5FF591D2E8D2EA227D +:200DFE0022AF82120DFEDFFB2290FB50A3E582458370F922AE82AF83120E071EBEFF011FAD +:050E1E00EE4F70F4220C +:0D0E2F007581211205D6E5826003020E2CAC :00000001FF diff --git a/tools/fx2/bin/nexys2_jtag_2fifo_as.ihx b/tools/fx2/bin/nexys2_jtag_2fifo_as.ihx index 1e9a39b7..efea57a4 100644 --- a/tools/fx2/bin/nexys2_jtag_2fifo_as.ihx +++ b/tools/fx2/bin/nexys2_jtag_2fifo_as.ihx @@ -1,4 +1,4 @@ -:06000000020DF002006B8E +:06000000020E7402006B09 :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,432 +12,133 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DF600020DFEED -:030E1100020DF9D6 -:050DF9001203F180FE71 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120637D001D000D005D0F4 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C0051206741201AAD005D00462 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C00512060BB9 -:06034C00D005D004801072 -:0E0352008A82C004C0051206291201AAD00535 -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E6003002031209536E -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206C312BA -:0603FF000455120D23124B -:0804050008BDD2AF1207CC02C2 -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E196E0F58212040FD0029026 -:0D04F100E196E02AFAF582C00212040F9095 -:0B04FE00E1B4E0F58212040FD0029080 -:0A050900E1B4E02AF58212040F901D -:0A051300E1DEE0F58212040F7A0029 -:0E051D0090E196E0FBC3EA64808BF063F0800F -:0B052B0095F05017EA2496F582E434A6 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1B4E0FBC3EA64808BF063F080C6 -:0B05560095F05017EA24B4F582E4345D -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1DEE0FBC3EA64808BF063F08071 -:0B05810095F05017EA24DEF582E43408 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022E00010100C1 -:0EE1230080FA0904000004FFFFFF02070581D7 -:0EE131000200020007050202000200070504BA -:0BE13F0002000200070586020002003B -:0EE14A001201000200000040C016EF030400A6 -:04E1580001020301BC -:0AE15C000A060002FFFFFF40010069 -:0EE166000902200001010080FA0904000002F5 -:0EE17400FFFFFF0207058102400000070502C1 -:04E182000240000057 -:01E186000494 -:02E1870090E125 -:02E1890096E11D -:02E18B00B4E1FD -:02E18D00DEE1D1 -:06E1900006030000090473 -:0EE196001E037700770077002E0072006500F0 -:0EE1A400740072006F00310031002E00640024 -:02E1B200650006 -:0EE1B4002A036E0065007800790073003200C7 -:0EE1C2005F006A007400610067005F003200B9 -:0EE1D0006600690066006F005F00610073006A -:0EE1DE001203300030003000300030003000FE -:04E1EC0030003000CF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:0B060000D2B775B5809001F4020DDF49 -:0E060B00AA82ABB574FE5BF5F0741C45F0F5E9 -:0E061900B5EA1392B4EAA2E192B3EAA2E49227 -:02062700B222FD -:0E06290012060BA2B0E433FA74024AF58222E4 -:0E063700E5821392B2D2B413C2B492B2D2B41E -:0E06450013C2B492B2D2B413C2B492B2D2B401 -:0E06530013C2B492B2D2B413C2B492B2D2B4F3 -:0E06610013C2B492B2D2B413C2B492B2D2B4E5 -:05066F0000C2B42222CC -:0E067400E582A2B01392B2D2B4C2B4A2B01307 -:0E06820092B2D2B4C2B4A2B01392B2D2B4C239 -:0E069000B4A2B01392B2D2B4C2B4A2B013920C -:0E069E00B2D2B4C2B4A2B01392B2D2B4C2B4FB -:0E06AC00A2B01392B2D2B4C2B4A2B01392B2F2 -:0906BA00D2B400C2B4F582222280 -:0D06C30090E6007412F090E60174ABF09028 -:0E06D000E6707480F00090E60274E0F0009096 -:0E06DE00E60374F9F00090E6047480F00090DA -:0D06EC00E60B7403F00090E610E4F00090BF -:0D06F900E61174A0F00090E618E4F0009007 -:0E070600E6047402F00090E61274A2F0009077 -:0E071400E61374A2F00090E61474E0F000907A -:0E072200E6157402F00090E6047404F00090F6 -:0E073000E6047406F00090E6047408F00090F1 -:0E073E00E604E4F00090E60BE4F00090E649DB -:0E074C007484F00090E6497484F00090E61981 -:0E075A00E4F00090E6197410F00090E632749E -:0E07680080F00090E6337404F00090E61A74FE -:0E0776000CF00090E6247402F00090E625E4FA -:0E078400F00090E6347419F00090E63574FC35 -:0E079200F00090E61BE4F0000090E691748009 -:0A07A000F00090E6917480F0002252 -:0807AA0090E6A0E04401F022FA -:0E07B200AA8274805AC423541FFB740F5A90FD -:0C07C000E6834BF090E683E04420F0223A -:0E07CC0090E680E0440AF09000FA120DDF90F3 -:0E07DA00E65D74FFF090E65F74FFF05391EF60 -:0807E80090E680E054F7F022D6 -:060E0B00E478FFF6D8FDBB -:060DF000751200751300EE -:0A07F00090E680E0FA30E719751476 -:0307FA0000751572 -:0307FD00E175168D -:0308000012751757 -:03080300E1751884 -:030806001C751945 -:03080900E1751A7C -:03080C0066751BF3 -:02080F00E122E4 -:0408110075144A759B -:0308150015E17575 -:03081800165C75F6 -:03081B0017E1756D -:03081E00186675E4 -:0308210019E17565 -:030824001A1C7526 -:030827001BE122B0 -:09082A005391EF75A100D20232D6 -:0C083300C021C0E0C0F0C082C083C00241 -:0E083F00C003C004C005C006C007C000C00151 -:0E084D00C0D075D0005391EF75A1001207F0D6 -:0E085B00D0D0D001D000D007D006D005D004F8 -:0D086900D003D002D083D082D0F0D0E0D0F8 -:0208760021322D -:0C087800C021C0E0C0F0C082C083C002FC -:0E088400C003C004C005C006C007C000C0010C -:0E089200C0D075D0005391EF75A1001207F091 -:0E08A000D0D0D001D000D007D006D005D004B3 -:0D08AE00D003D002D083D082D0F0D0E0D0B3 -:0208BB002132E8 -:0508BD001207F0751C9C -:0308C2002A751D77 -:0808C50008758200120C7C751D -:0308CD001C337564 -:0608D0001D0875821012E4 -:0408D6000C7C751C05 -:0308DA0078751D11 -:0C08DD0008758214120C7C90E65C7431EB -:0208E900F022FB -:0D08EB00E582547FFA24F750047582002244 -:0708F800BA01047582012220 -:0808FF00530201E4BA000104F8 -:03090700F5822254 -:0E090A00AA82BA010C90E6A1E0FB7C008B8271 -:030918008C8322AB -:0E091B00BA810C90E6A2E0FB7C008B828C83FC -:0109290022AB -:0E092A0053027FEA700C90E6A0E0FB7C008B8D -:04093800828C832208 -:0E093C0090E6A3E0FB7C00EAC313FA7D00EA1C -:09094A002BFBED3C8B82F58322AE -:0C095300C20290E6B8E0FA530260BA005D -:03095F00028028EB -:05096200BA2002800D27 -:05096700BA4002800E01 -:05096C00BA60028003E7 -:03097100020C1164 -:060974001207AA020C119B -:0A097A00120372E5826003020C1103 -:060984001207AA020C118B -:0D098A0090E6B8E0FA530280BA80028003C4 -:03099700020B123E -:0B099A0090E6B9E0FABA0003020A8BF5 -:0509A500BA06028035D6 -:0509AA00BA08028008FC -:0509AF00BA0A028017E6 -:0309B400020B0C27 -:0C09B70090E740E512F090E68AE4F09032 -:0809C300E68B7401F0020C1137 -:0C09CB0090E740E513F090E68AE4F0901D -:0809D700E68B7401F0020C1123 -:0A09DF0090E6BBE0FABA01028017AF -:0509E900BA0202803893 -:0509EE00BA030280596C -:0509F300BA0602801BA2 -:0509F800BA0702803C7B -:0309FD00020A8566 -:0A0A0000AA14AB1590E6B3EBF07BEF -:090A0A000090E6B4EAF0020C11C0 -:0A0A1300AA16AB1790E6B3EBF07BD8 -:090A1D000090E6B4EAF0020C11AD -:0A0A2600AA18AB1990E6B3EBF07BC1 -:090A30000090E6B4EAF0020C119A -:0A0A3900AA1AAB1B90E6B3EBF07BAA -:090A43000090E6B4EAF0020C1187 -:0E0A4C0090E6BAE0FA90E186E0FBC3EA9B4038 -:070A5A00061207AA020C11AD -:0C0A610090E6BAE075F002A42487F5824C -:0B0A6D0074E135F0F583E0FAA3E0909F -:0D0A7800E6B3F07B0090E6B4EAF0020C114A -:060A85001207AA020C1189 -:0D0A8B0090E6B8E0FA53021FBA0002800A9C -:050A9800BA0102801B01 -:050A9D00BA0266802C86 -:0E0AA20090E740E4F090E741F090E68AF09093 -:080AB000E68B7402F0020C1148 -:0E0AB80090E740E4F090E741F090E68AF0907D -:080AC600E68B7402F0020C1132 -:0E0ACE0090E6BCE0F5821208EBE58260259010 -:0E0ADC00E6BCE0F58212090AE0FA530201902E -:0E0AEA00E740EAF090E741E4F090E68AF090F1 -:080AF800E68B7402F0020C1100 -:060B00001207AA020C110D -:060B06001207AA020C1107 -:060B0C001207AA020C1101 -:0C0B120090E6B9E0FA24F45003020C0E47 -:070B1E00EA2A2A900B25735F -:070B2500020C0E020B5B0243 -:060B2C000BD6020BB7021C -:060B32000C0E020C0E0285 -:060B38000C0E020C0E027F -:060B3E000C0E020B49023F -:050B44000C0E020B5233 -:090B490090E6BAE0F512020C116D -:090B520090E6BAE0F513020C1163 -:0D0B5B0090E6B8E0FA53021FBA00028005D0 -:050B6800BA0247800AFB -:0A0B6D0090E6BAE01207AA020C118C -:0D0B770090E6BAE0703090E6BCE0F5821226 -:0D0B840008EBE582602390E6BCE0F58212EC -:0E0B9100090AAA82AB83E0FC5304FE8A828B21 -:0E0B9F0083ECF090E6BCE0F5821207B28064B1 -:050BAD001207AA805FA1 -:050BB2001207AA805AA1 -:0E0BB70090E6B8E0FA53021FBA004F90E6BA7B -:070BC500E0FABA010280050D -:050BCC00BA02028040A6 -:050BD1001207AA803BA1 -:0E0BD60090E6BAE0FA702C90E6BCE0F58212D0 -:0D0BE40008EBE582601A90E6BCE0F5821295 -:0E0BF100090AAA82AB83E0FC4304018A828BCE -:050BFF0083ECF0800D05 -:050C04001207AA8008A0 -:050C09001207AA8003A0 -:030C0E001207AA20 -:080C110090E6A0E04480F0220F -:050C1900AA82BA0300ED -:070C1E004005EA249C50018F -:010C250022AC -:090C2600740F5AFBBB03028007A6 -:070C2F00740F5AFBBB0B45DB -:0A0C3600A2AF9203C2AFEA2400F55A -:0C0C400082E43400F5837402F07B007441 -:0C0C4C00012AFCE43BFDEC2400F582EDE5 -:0A0C58003400F583E51DFCF0740282 -:0C0C62002AFAE43BFBEA2400F582EB34A4 -:0A0C6E0000F583AA1C7B00EAF0A247 -:030C78000392AF35 -:010C7B002256 -:080C7C00E582FA2483500122F5 -:060C8400EA5403600122A6 -:0A0C8A00A2AF9204C2AFEA2400F505 -:0C0C940082E43401F5837402F07B0074EC -:0C0CA000012AFCE43BFDEC2400F582ED91 -:0A0CAC003401F583E51DF074022AFF -:0B0CB600FAE43BFBEA2400F582EB347B -:080CC10001F583AA1CEAF0A270 -:040CC9000492AF22C0 -:050CCD00AA82BA8000BC -:070CD2004005EA244B50012C -:010CD90022F8 -:060CDA00EA540360012250 -:0A0CE000A2AF9205C2AFEA2480F52E -:0C0CEA0082E43400F5837402F07B007497 -:0C0CF600012AFCE43BFDEC2480F582EDBB -:0A0D02003400F583E51DF074022AA9 -:0B0D0C00FAE43BFBEA2480F582EB34A4 -:080D170000F583AA1CEAF0A21A -:040D1F000592AF2268 -:080D2300C2E8C2EA751C00756C -:060D2B001D017582431258 -:040D31000C19751C08 -:030D350080751DA9 -:0C0D380000758253120C190090E650E484 -:0E0D4400F00090E652E4F00090E654E4F00077 -:0E0D520090E656E4F00090E65174FFF0009039 -:0E0D6000E65374FFF00090E65574FFF000902B -:0E0D6E00E65774FFF00090E658E4F090E65966 -:0E0D7C0074FFF090E65AE4F090E65B74FFF02E -:0E0D8A0090E65CE4F090E65D74FFF090E65EAB -:0E0D9800E4F090E65F74FFF00090E660E4F097 -:0D0DA6000090E66174FFF090E662E4F090CA -:0E0DB300E66374FFF090E665E4F090E6687485 -:0A0DC1000BF05391AFD2E8D2EA2202 -:010DCB002205 -:020DCC00AA82F9 -:060DCE00120DCBDAFB223E -:030DD40090FB5041 -:080DD700A3E582458370F922B7 -:040DDF00AA82AB83B6 -:080DE300120DD41ABAFF011B26 -:050DEB00EA4B70F42248 -:030DFE00758121DB -:0A0E01001205DAE5826003020DF924 +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E7A00020E80E5 +:030E9300020E7DCF +:030E7D000203F479 +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120635D000D001D004D00580D88A068B078E0D +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C0041206721201AA8D +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120607D004D00580108F82C005C0041206271201AAD0E3 +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209B51201BF80F5C2AF90E609E4F0120180120646 +:12040000C1120459120D8612091CD2AF12080C0203E949 +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E194E0F582120412D00790E194E07E +:2004F2002FFFF582C00712041290E1B2E0F582120412D00790E1B2E02FF58212041290E19B +:20051200DCE0F5821204127F0090E194E0FEC3EF64808EF063F08095F05017EF2494F5821B +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1B2E0FEC3EF64808EF063BE +:20055200F08095F05017EF24B2F582E434E1F583E0F582C007120412D0070F80D77F0090EE +:20057200E1DCE0FEC3EF64808EF063F08095F05017EF24DCF582E434E1F583E0F582C00706 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF40010009022E004E +:20E1200001010080FA0904000004FFFFFF020705810200020007050202000200070504029E +:20E14000000200070586020002001201000200000040C016EF030400010203010A060002ED +:20E16000FFFFFF4001000902200001010080FA0904000002FFFFFF020705810240000007D6 +:0FE180000502024000000490E194E1B2E1DCE10D +:20E19000040309041E037700770077002E0072006500740072006F00310031002E00640087 +:20E1B00065002A036E00650078007900730032005F006A007400610067005F003200660058 +:1EE1D000690066006F005F00610073001203300030003000300030003000300030002B +:2005F80022222222D2B775B5809001F4020E63AF82AEB574FE5E441CF5B5EF13920392B4E5 +:20061800EFA2E1920392B3EFA2E4920392B222120607A2B0E433FF74024FF58222E58213A7 +:2006380092B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B48C +:2006580013C2B492B2D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B0139271 +:20067800B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4C5 +:20069800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2AA +:0906B800D2B400C2B4F582222282 +:2006C10090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6AB +:2006E1000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000F9 +:200701000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A26D +:20072100F000000090E61374A2F000000090E61474E0F000000090E6157402F000000090EA +:20074100E6047404F000000090E6047406F000000090E6047408F000000090E604E4F0002E +:20076100000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E462 +:20078100F000000090E6197410F000000090E6327480F000000090E6337404F00000009038 +:2007A100E61A740CF000000090E6247402F000000090E625E4F000000090E6347419F00032 +:2007C100000090E63574FCF000000090E61BE4F000000000000090E6917480F0000000902D +:0907E100E6917480F00000002292 +:2007EA0090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442070 +:20080A00F02290E680E0440AF09000FA120E6390E65D74FFF090E65F74FFF0AF9174EF5F2B +:0A082A00F59190E680E054F7F0220B +:060E8D00E478FFF6D8FD39 +:060E740075120075130069 +:2008340090E680E0FF30E7197514007515E17516127517E175181C7519E1751A66751BE123 +:200854002275144A7515E175165C7517E17518667519E1751A1C751BE122C0E0C007C0D039 +:2008740075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C0839C +:20089400C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012A3 +:2008B4000834D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C0B4 +:2008D40021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91DD +:2008F40074EF5FF59175A100120834D0D0D000D001D002D003D004D005D006D007D083D0D9 +:2009140082D0F0D0E0D02132120834751C6E751D08758200120CDF751C8A751D0875821017 +:20093400120CDF751CD3751D08758214120CDF90E65C7431F022AF828F06747F5EFF24F7E6 +:20095400500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A188 +:20097400E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C64 +:2009940090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583FE +:2009B40022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280D9 +:2009D40003020C741207EA020C74120375E5826003020C741207EA020C7490E6B8E0FF533E +:2009F4000780BF80028003020B7890E6B9E0FFBF0003020AEFBF06028035BF08028008BFBC +:200A14000A028017020B7290E740E512F090E68AE4F090E68B7401F0020C7490E740E51397 +:200A3400F090E68AE4F090E68B7401F0020C7490E6BBE0FFBF01028017BF02028038BF0350 +:200A5400028059BF0602801BBF0702803C020AE9AE14AF1590E6B3EFF07F0090E6B4EEF0B7 +:200A7400020C74AE16AF1790E6B3EFF07F0090E6B4EEF0020C74AE18AF1990E6B3EFF07F30 +:200A94000090E6B4EEF0020C74AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C7490E6BAE005 +:200AB400FF90E186E0FEC3EF9E40061207EA020C7490E6BAE075F002A42487F58274E1356C +:200AD400F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C741207EA020C7490E6B8E0FF85 +:200AF40053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A28 +:200B1400F090E68B7402F0020C7490E740E4F090E741F090E68AF090E68B7402F0020C74DC +:200B340090E6BCE0F58212094AE582602590E6BCE0F58212096CE0FF53070190E740EFF0E7 +:200B540090E741E4F090E68AF090E68B7402F0020C741207EA020C741207EA020C741207F9 +:200B7400EA020C7490E6B9E0FF24F45003020C71EF240A83F582EF241083F583E47371BC44 +:200B9400391A7171717171AA71B30C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C749035 +:200BB400E6BAE0F513020C7490E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE015 +:200BD4001207EA020C7490E6BAE0703090E6BCE0F58212094AE582602390E6BCE0F5821259 +:200BF400096CAE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821207F280641207EA80DD +:200C14005F1207EA805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF0202804017 +:200C34001207EA803B90E6BAE0FF702C90E6BCE0F58212094AE582601A90E6BCE0F58212CD +:200C5400096CAE82AF83E0FD4305018E828F83EDF0800D1207EA80081207EA80031207EAE3 +:080C740090E6A0E04480F022AC +:200C7C00AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9203 +:200C9C0005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED345D +:200CBC0000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205FB +:200CDC0092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F55A +:200CFC00837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43ED9 +:200D1C00FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B50017D +:200D3C0022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC33 +:200D5C00E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5E1 +:200D7C0083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C7C751C80751D002F +:200D9C00758253120C7C00000090E650E4F000000090E652E4F000000090E654E4F000007F +:200DBC000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFE3 +:200DDC00F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B8E +:200DFC0074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4FE +:200E1C00F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0A8 +:130E3C00AF9174EF5FF591AF9174BF5FF591D2E8D2EA222B +:200E4F0022AF82120E4FDFFB2290FB50A3E582458370F922AE82AF83120E581EBEFF011FB8 +:050E6F00EE4F70F422BB +:0D0E80007581211205D6E5826003020E7D0A :00000001FF diff --git a/tools/fx2/bin/nexys2_jtag_2fifo_ic.ihx b/tools/fx2/bin/nexys2_jtag_2fifo_ic.ihx index 85a57d35..425c34e2 100644 --- a/tools/fx2/bin/nexys2_jtag_2fifo_ic.ihx +++ b/tools/fx2/bin/nexys2_jtag_2fifo_ic.ihx @@ -1,4 +1,4 @@ -:06000000020DF002006B8E +:06000000020E7402006B09 :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,432 +12,133 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DF600020DFEED -:030E1100020DF9D6 -:050DF9001203F180FE71 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120637D001D000D005D0F4 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C0051206741201AAD005D00462 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C00512060BB9 -:06034C00D005D004801072 -:0E0352008A82C004C0051206291201AAD00535 -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E6003002031209536E -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206C312BA -:0603FF000455120D23124B -:0804050008BDD2AF1207CC02C2 -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E196E0F58212040FD0029026 -:0D04F100E196E02AFAF582C00212040F9095 -:0B04FE00E1B4E0F58212040FD0029080 -:0A050900E1B4E02AF58212040F901D -:0A051300E1DEE0F58212040F7A0029 -:0E051D0090E196E0FBC3EA64808BF063F0800F -:0B052B0095F05017EA2496F582E434A6 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1B4E0FBC3EA64808BF063F080C6 -:0B05560095F05017EA24B4F582E4345D -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1DEE0FBC3EA64808BF063F08071 -:0B05810095F05017EA24DEF582E43408 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022E00010100C1 -:0EE1230080FA0904000004FFFFFF02070581D7 -:0EE131000200020007050202000200070504BA -:0BE13F0002000200070586020002003B -:0EE14A001201000200000040C016EF030400A6 -:04E1580001020301BC -:0AE15C000A060002FFFFFF40010069 -:0EE166000902200001010080FA0904000002F5 -:0EE17400FFFFFF0207058102400000070502C1 -:04E182000240000057 -:01E186000494 -:02E1870090E125 -:02E1890096E11D -:02E18B00B4E1FD -:02E18D00DEE1D1 -:06E1900006030000090473 -:0EE196001E037700770077002E0072006500F0 -:0EE1A400740072006F00310031002E00640024 -:02E1B200650006 -:0EE1B4002A036E0065007800790073003200C7 -:0EE1C2005F006A007400610067005F003200B9 -:0EE1D0006600690066006F005F006900630072 -:0EE1DE001203300030003000300030003000FE -:04E1EC0030003000CF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:0B060000D2B775B5809001F4020DDF49 -:0E060B00AA82ABB574FE5BF5F0741C45F0F5E9 -:0E061900B5EA1392B4EAA2E192B3EAA2E49227 -:02062700B222FD -:0E06290012060BA2B0E433FA74024AF58222E4 -:0E063700E5821392B2D2B413C2B492B2D2B41E -:0E06450013C2B492B2D2B413C2B492B2D2B401 -:0E06530013C2B492B2D2B413C2B492B2D2B4F3 -:0E06610013C2B492B2D2B413C2B492B2D2B4E5 -:05066F0000C2B42222CC -:0E067400E582A2B01392B2D2B4C2B4A2B01307 -:0E06820092B2D2B4C2B4A2B01392B2D2B4C239 -:0E069000B4A2B01392B2D2B4C2B4A2B013920C -:0E069E00B2D2B4C2B4A2B01392B2D2B4C2B4FB -:0E06AC00A2B01392B2D2B4C2B4A2B01392B2F2 -:0906BA00D2B400C2B4F582222280 -:0D06C30090E6007412F090E60174A3F09030 -:0E06D000E6707480F00090E60274E0F0009096 -:0E06DE00E60374F9F00090E6047480F00090DA -:0D06EC00E60B7403F00090E610E4F00090BF -:0D06F900E61174A0F00090E618E4F0009007 -:0E070600E6047402F00090E61274A2F0009077 -:0E071400E61374A2F00090E61474E0F000907A -:0E072200E6157402F00090E6047404F00090F6 -:0E073000E6047406F00090E6047408F00090F1 -:0E073E00E604E4F00090E60BE4F00090E649DB -:0E074C007484F00090E6497484F00090E61981 -:0E075A00E4F00090E6197410F00090E632749E -:0E07680080F00090E6337404F00090E61A74FE -:0E0776000CF00090E6247402F00090E625E4FA -:0E078400F00090E6347419F00090E63574FC35 -:0E079200F00090E61BE4F0000090E691748009 -:0A07A000F00090E6917480F0002252 -:0807AA0090E6A0E04401F022FA -:0E07B200AA8274805AC423541FFB740F5A90FD -:0C07C000E6834BF090E683E04420F0223A -:0E07CC0090E680E0440AF09000FA120DDF90F3 -:0E07DA00E65D74FFF090E65F74FFF05391EF60 -:0807E80090E680E054F7F022D6 -:060E0B00E478FFF6D8FDBB -:060DF000751200751300EE -:0A07F00090E680E0FA30E719751476 -:0307FA0000751572 -:0307FD00E175168D -:0308000012751757 -:03080300E1751884 -:030806001C751945 -:03080900E1751A7C -:03080C0066751BF3 -:02080F00E122E4 -:0408110075144A759B -:0308150015E17575 -:03081800165C75F6 -:03081B0017E1756D -:03081E00186675E4 -:0308210019E17565 -:030824001A1C7526 -:030827001BE122B0 -:09082A005391EF75A100D20232D6 -:0C083300C021C0E0C0F0C082C083C00241 -:0E083F00C003C004C005C006C007C000C00151 -:0E084D00C0D075D0005391EF75A1001207F0D6 -:0E085B00D0D0D001D000D007D006D005D004F8 -:0D086900D003D002D083D082D0F0D0E0D0F8 -:0208760021322D -:0C087800C021C0E0C0F0C082C083C002FC -:0E088400C003C004C005C006C007C000C0010C -:0E089200C0D075D0005391EF75A1001207F091 -:0E08A000D0D0D001D000D007D006D005D004B3 -:0D08AE00D003D002D083D082D0F0D0E0D0B3 -:0208BB002132E8 -:0508BD001207F0751C9C -:0308C2002A751D77 -:0808C50008758200120C7C751D -:0308CD001C337564 -:0608D0001D0875821012E4 -:0408D6000C7C751C05 -:0308DA0078751D11 -:0C08DD0008758214120C7C90E65C7431EB -:0208E900F022FB -:0D08EB00E582547FFA24F750047582002244 -:0708F800BA01047582012220 -:0808FF00530201E4BA000104F8 -:03090700F5822254 -:0E090A00AA82BA010C90E6A1E0FB7C008B8271 -:030918008C8322AB -:0E091B00BA810C90E6A2E0FB7C008B828C83FC -:0109290022AB -:0E092A0053027FEA700C90E6A0E0FB7C008B8D -:04093800828C832208 -:0E093C0090E6A3E0FB7C00EAC313FA7D00EA1C -:09094A002BFBED3C8B82F58322AE -:0C095300C20290E6B8E0FA530260BA005D -:03095F00028028EB -:05096200BA2002800D27 -:05096700BA4002800E01 -:05096C00BA60028003E7 -:03097100020C1164 -:060974001207AA020C119B -:0A097A00120372E5826003020C1103 -:060984001207AA020C118B -:0D098A0090E6B8E0FA530280BA80028003C4 -:03099700020B123E -:0B099A0090E6B9E0FABA0003020A8BF5 -:0509A500BA06028035D6 -:0509AA00BA08028008FC -:0509AF00BA0A028017E6 -:0309B400020B0C27 -:0C09B70090E740E512F090E68AE4F09032 -:0809C300E68B7401F0020C1137 -:0C09CB0090E740E513F090E68AE4F0901D -:0809D700E68B7401F0020C1123 -:0A09DF0090E6BBE0FABA01028017AF -:0509E900BA0202803893 -:0509EE00BA030280596C -:0509F300BA0602801BA2 -:0509F800BA0702803C7B -:0309FD00020A8566 -:0A0A0000AA14AB1590E6B3EBF07BEF -:090A0A000090E6B4EAF0020C11C0 -:0A0A1300AA16AB1790E6B3EBF07BD8 -:090A1D000090E6B4EAF0020C11AD -:0A0A2600AA18AB1990E6B3EBF07BC1 -:090A30000090E6B4EAF0020C119A -:0A0A3900AA1AAB1B90E6B3EBF07BAA -:090A43000090E6B4EAF0020C1187 -:0E0A4C0090E6BAE0FA90E186E0FBC3EA9B4038 -:070A5A00061207AA020C11AD -:0C0A610090E6BAE075F002A42487F5824C -:0B0A6D0074E135F0F583E0FAA3E0909F -:0D0A7800E6B3F07B0090E6B4EAF0020C114A -:060A85001207AA020C1189 -:0D0A8B0090E6B8E0FA53021FBA0002800A9C -:050A9800BA0102801B01 -:050A9D00BA0266802C86 -:0E0AA20090E740E4F090E741F090E68AF09093 -:080AB000E68B7402F0020C1148 -:0E0AB80090E740E4F090E741F090E68AF0907D -:080AC600E68B7402F0020C1132 -:0E0ACE0090E6BCE0F5821208EBE58260259010 -:0E0ADC00E6BCE0F58212090AE0FA530201902E -:0E0AEA00E740EAF090E741E4F090E68AF090F1 -:080AF800E68B7402F0020C1100 -:060B00001207AA020C110D -:060B06001207AA020C1107 -:060B0C001207AA020C1101 -:0C0B120090E6B9E0FA24F45003020C0E47 -:070B1E00EA2A2A900B25735F -:070B2500020C0E020B5B0243 -:060B2C000BD6020BB7021C -:060B32000C0E020C0E0285 -:060B38000C0E020C0E027F -:060B3E000C0E020B49023F -:050B44000C0E020B5233 -:090B490090E6BAE0F512020C116D -:090B520090E6BAE0F513020C1163 -:0D0B5B0090E6B8E0FA53021FBA00028005D0 -:050B6800BA0247800AFB -:0A0B6D0090E6BAE01207AA020C118C -:0D0B770090E6BAE0703090E6BCE0F5821226 -:0D0B840008EBE582602390E6BCE0F58212EC -:0E0B9100090AAA82AB83E0FC5304FE8A828B21 -:0E0B9F0083ECF090E6BCE0F5821207B28064B1 -:050BAD001207AA805FA1 -:050BB2001207AA805AA1 -:0E0BB70090E6B8E0FA53021FBA004F90E6BA7B -:070BC500E0FABA010280050D -:050BCC00BA02028040A6 -:050BD1001207AA803BA1 -:0E0BD60090E6BAE0FA702C90E6BCE0F58212D0 -:0D0BE40008EBE582601A90E6BCE0F5821295 -:0E0BF100090AAA82AB83E0FC4304018A828BCE -:050BFF0083ECF0800D05 -:050C04001207AA8008A0 -:050C09001207AA8003A0 -:030C0E001207AA20 -:080C110090E6A0E04480F0220F -:050C1900AA82BA0300ED -:070C1E004005EA249C50018F -:010C250022AC -:090C2600740F5AFBBB03028007A6 -:070C2F00740F5AFBBB0B45DB -:0A0C3600A2AF9203C2AFEA2400F55A -:0C0C400082E43400F5837402F07B007441 -:0C0C4C00012AFCE43BFDEC2400F582EDE5 -:0A0C58003400F583E51DFCF0740282 -:0C0C62002AFAE43BFBEA2400F582EB34A4 -:0A0C6E0000F583AA1C7B00EAF0A247 -:030C78000392AF35 -:010C7B002256 -:080C7C00E582FA2483500122F5 -:060C8400EA5403600122A6 -:0A0C8A00A2AF9204C2AFEA2400F505 -:0C0C940082E43401F5837402F07B0074EC -:0C0CA000012AFCE43BFDEC2400F582ED91 -:0A0CAC003401F583E51DF074022AFF -:0B0CB600FAE43BFBEA2400F582EB347B -:080CC10001F583AA1CEAF0A270 -:040CC9000492AF22C0 -:050CCD00AA82BA8000BC -:070CD2004005EA244B50012C -:010CD90022F8 -:060CDA00EA540360012250 -:0A0CE000A2AF9205C2AFEA2480F52E -:0C0CEA0082E43400F5837402F07B007497 -:0C0CF600012AFCE43BFDEC2480F582EDBB -:0A0D02003400F583E51DF074022AA9 -:0B0D0C00FAE43BFBEA2480F582EB34A4 -:080D170000F583AA1CEAF0A21A -:040D1F000592AF2268 -:080D2300C2E8C2EA751C00756C -:060D2B001D017582431258 -:040D31000C19751C08 -:030D350080751DA9 -:0C0D380000758253120C190090E650E484 -:0E0D4400F00090E652E4F00090E654E4F00077 -:0E0D520090E656E4F00090E65174FFF0009039 -:0E0D6000E65374FFF00090E65574FFF000902B -:0E0D6E00E65774FFF00090E658E4F090E65966 -:0E0D7C0074FFF090E65AE4F090E65B74FFF02E -:0E0D8A0090E65CE4F090E65D74FFF090E65EAB -:0E0D9800E4F090E65F74FFF00090E660E4F097 -:0D0DA6000090E66174FFF090E662E4F090CA -:0E0DB300E66374FFF090E665E4F090E6687485 -:0A0DC1000BF05391AFD2E8D2EA2202 -:010DCB002205 -:020DCC00AA82F9 -:060DCE00120DCBDAFB223E -:030DD40090FB5041 -:080DD700A3E582458370F922B7 -:040DDF00AA82AB83B6 -:080DE300120DD41ABAFF011B26 -:050DEB00EA4B70F42248 -:030DFE00758121DB -:0A0E01001205DAE5826003020DF924 +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E7A00020E80E5 +:030E9300020E7DCF +:030E7D000203F479 +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120635D000D001D004D00580D88A068B078E0D +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C0041206721201AA8D +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120607D004D00580108F82C005C0041206271201AAD0E3 +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209B51201BF80F5C2AF90E609E4F0120180120646 +:12040000C1120459120D8612091CD2AF12080C0203E949 +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E194E0F582120412D00790E194E07E +:2004F2002FFFF582C00712041290E1B2E0F582120412D00790E1B2E02FF58212041290E19B +:20051200DCE0F5821204127F0090E194E0FEC3EF64808EF063F08095F05017EF2494F5821B +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1B2E0FEC3EF64808EF063BE +:20055200F08095F05017EF24B2F582E434E1F583E0F582C007120412D0070F80D77F0090EE +:20057200E1DCE0FEC3EF64808EF063F08095F05017EF24DCF582E434E1F583E0F582C00706 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF40010009022E004E +:20E1200001010080FA0904000004FFFFFF020705810200020007050202000200070504029E +:20E14000000200070586020002001201000200000040C016EF030400010203010A060002ED +:20E16000FFFFFF4001000902200001010080FA0904000002FFFFFF020705810240000007D6 +:0FE180000502024000000490E194E1B2E1DCE10D +:20E19000040309041E037700770077002E0072006500740072006F00310031002E00640087 +:20E1B00065002A036E00650078007900730032005F006A007400610067005F003200660058 +:1EE1D000690066006F005F006900630012033000300030003000300030003000300033 +:2005F80022222222D2B775B5809001F4020E63AF82AEB574FE5E441CF5B5EF13920392B4E5 +:20061800EFA2E1920392B3EFA2E4920392B222120607A2B0E433FF74024FF58222E58213A7 +:2006380092B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B48C +:2006580013C2B492B2D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B0139271 +:20067800B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4C5 +:20069800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2AA +:0906B800D2B400C2B4F582222282 +:2006C10090E6007412F090E60174A3F090E6707480F000000090E60274E0F000000090E6B3 +:2006E1000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000F9 +:200701000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A26D +:20072100F000000090E61374A2F000000090E61474E0F000000090E6157402F000000090EA +:20074100E6047404F000000090E6047406F000000090E6047408F000000090E604E4F0002E +:20076100000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E462 +:20078100F000000090E6197410F000000090E6327480F000000090E6337404F00000009038 +:2007A100E61A740CF000000090E6247402F000000090E625E4F000000090E6347419F00032 +:2007C100000090E63574FCF000000090E61BE4F000000000000090E6917480F0000000902D +:0907E100E6917480F00000002292 +:2007EA0090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442070 +:20080A00F02290E680E0440AF09000FA120E6390E65D74FFF090E65F74FFF0AF9174EF5F2B +:0A082A00F59190E680E054F7F0220B +:060E8D00E478FFF6D8FD39 +:060E740075120075130069 +:2008340090E680E0FF30E7197514007515E17516127517E175181C7519E1751A66751BE123 +:200854002275144A7515E175165C7517E17518667519E1751A1C751BE122C0E0C007C0D039 +:2008740075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C0839C +:20089400C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012A3 +:2008B4000834D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C0B4 +:2008D40021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91DD +:2008F40074EF5FF59175A100120834D0D0D000D001D002D003D004D005D006D007D083D0D9 +:2009140082D0F0D0E0D02132120834751C6E751D08758200120CDF751C8A751D0875821017 +:20093400120CDF751CD3751D08758214120CDF90E65C7431F022AF828F06747F5EFF24F7E6 +:20095400500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A188 +:20097400E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C64 +:2009940090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583FE +:2009B40022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280D9 +:2009D40003020C741207EA020C74120375E5826003020C741207EA020C7490E6B8E0FF533E +:2009F4000780BF80028003020B7890E6B9E0FFBF0003020AEFBF06028035BF08028008BFBC +:200A14000A028017020B7290E740E512F090E68AE4F090E68B7401F0020C7490E740E51397 +:200A3400F090E68AE4F090E68B7401F0020C7490E6BBE0FFBF01028017BF02028038BF0350 +:200A5400028059BF0602801BBF0702803C020AE9AE14AF1590E6B3EFF07F0090E6B4EEF0B7 +:200A7400020C74AE16AF1790E6B3EFF07F0090E6B4EEF0020C74AE18AF1990E6B3EFF07F30 +:200A94000090E6B4EEF0020C74AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C7490E6BAE005 +:200AB400FF90E186E0FEC3EF9E40061207EA020C7490E6BAE075F002A42487F58274E1356C +:200AD400F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C741207EA020C7490E6B8E0FF85 +:200AF40053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A28 +:200B1400F090E68B7402F0020C7490E740E4F090E741F090E68AF090E68B7402F0020C74DC +:200B340090E6BCE0F58212094AE582602590E6BCE0F58212096CE0FF53070190E740EFF0E7 +:200B540090E741E4F090E68AF090E68B7402F0020C741207EA020C741207EA020C741207F9 +:200B7400EA020C7490E6B9E0FF24F45003020C71EF240A83F582EF241083F583E47371BC44 +:200B9400391A7171717171AA71B30C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C749035 +:200BB400E6BAE0F513020C7490E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE015 +:200BD4001207EA020C7490E6BAE0703090E6BCE0F58212094AE582602390E6BCE0F5821259 +:200BF400096CAE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821207F280641207EA80DD +:200C14005F1207EA805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF0202804017 +:200C34001207EA803B90E6BAE0FF702C90E6BCE0F58212094AE582601A90E6BCE0F58212CD +:200C5400096CAE82AF83E0FD4305018E828F83EDF0800D1207EA80081207EA80031207EAE3 +:080C740090E6A0E04480F022AC +:200C7C00AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9203 +:200C9C0005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED345D +:200CBC0000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205FB +:200CDC0092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F55A +:200CFC00837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43ED9 +:200D1C00FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B50017D +:200D3C0022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC33 +:200D5C00E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5E1 +:200D7C0083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C7C751C80751D002F +:200D9C00758253120C7C00000090E650E4F000000090E652E4F000000090E654E4F000007F +:200DBC000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFE3 +:200DDC00F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B8E +:200DFC0074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4FE +:200E1C00F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0A8 +:130E3C00AF9174EF5FF591AF9174BF5FF591D2E8D2EA222B +:200E4F0022AF82120E4FDFFB2290FB50A3E582458370F922AE82AF83120E581EBEFF011FB8 +:050E6F00EE4F70F422BB +:0D0E80007581211205D6E5826003020E7D0A :00000001FF diff --git a/tools/fx2/bin/nexys2_jtag_3fifo_as.ihx b/tools/fx2/bin/nexys2_jtag_3fifo_as.ihx index 8081bdfd..2d9dc699 100644 --- a/tools/fx2/bin/nexys2_jtag_3fifo_as.ihx +++ b/tools/fx2/bin/nexys2_jtag_3fifo_as.ihx @@ -1,4 +1,4 @@ -:06000000020E0C02006B71 +:06000000020E9802006BE5 :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,435 +12,135 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030E1200020E1AB3 -:030E2D00020E159D -:050E15001203F180FE54 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120637D001D000D005D0F4 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C0051206741201AAD005D00462 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C00512060BB9 -:06034C00D005D004801072 -:0E0352008A82C004C0051206291201AAD00535 -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312096F52 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206C312BA -:0603FF000455120D3F122F -:0804050008D9D2AF1207E8028A -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E19EE0F58212040FD002901E -:0D04F100E19EE02AFAF582C00212040F908D -:0B04FE00E1BCE0F58212040FD0029078 -:0A050900E1BCE02AF58212040F9015 -:0A051300E1E6E0F58212040F7A0021 -:0E051D0090E19EE0FBC3EA64808BF063F08007 -:0B052B0095F05017EA249EF582E4349E -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1BCE0FBC3EA64808BF063F080BE -:0B05560095F05017EA24BCF582E43455 -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1E6E0FBC3EA64808BF063F08069 -:0B05810095F05017EA24E6F582E43400 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009023500010100BA -:0EE1230080FA0904000005FFFFFF02070581D6 -:0EE131000200020007050202000200070504BA -:0EE13F000200020007058602000200070588A4 -:04E14D0002000200CA -:0EE152001201000200000040C016EF0304009E -:04E1600001020301B4 -:0AE164000A060002FFFFFF40010061 -:0EE16E000902200001010080FA0904000002ED -:0EE17C00FFFFFF0207058102400000070502B9 -:04E18A00024000004F -:01E18E00048C -:02E18F0098E115 -:02E191009EE10D -:02E19300BCE1ED -:02E19500E6E1C1 -:06E198000603000009046B -:0EE19E001E037700770077002E0072006500E8 -:0EE1AC00740072006F00310031002E0064001C -:02E1BA006500FE -:0EE1BC002A036E0065007800790073003200BF -:0EE1CA005F006A007400610067005F003300B0 -:0EE1D8006600690066006F005F006100730062 -:0EE1E6001203300030003000300030003000F6 -:04E1F40030003000C7 -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:0B060000D2B775B5809001F4020DFB2D -:0E060B00AA82ABB574FE5BF5F0741C45F0F5E9 -:0E061900B5EA1392B4EAA2E192B3EAA2E49227 -:02062700B222FD -:0E06290012060BA2B0E433FA74024AF58222E4 -:0E063700E5821392B2D2B413C2B492B2D2B41E -:0E06450013C2B492B2D2B413C2B492B2D2B401 -:0E06530013C2B492B2D2B413C2B492B2D2B4F3 -:0E06610013C2B492B2D2B413C2B492B2D2B4E5 -:05066F0000C2B42222CC -:0E067400E582A2B01392B2D2B4C2B4A2B01307 -:0E06820092B2D2B4C2B4A2B01392B2D2B4C239 -:0E069000B4A2B01392B2D2B4C2B4A2B013920C -:0E069E00B2D2B4C2B4A2B01392B2D2B4C2B4FB -:0E06AC00A2B01392B2D2B4C2B4A2B01392B2F2 -:0906BA00D2B400C2B4F582222280 -:0D06C30090E6007412F090E60174ABF09028 -:0E06D000E6707480F00090E60274E0F0009096 -:0E06DE00E60374F9F00090E6047480F00090DA -:0D06EC00E60B7403F00090E610E4F00090BF -:0D06F900E61174A0F00090E618E4F0009007 -:0E070600E6047402F00090E61274A2F0009077 -:0E071400E61374A2F00090E61474E2F0009078 -:0E072200E61574E2F00090E6047404F0009016 -:0E073000E6047406F00090E6047408F00090F1 -:0E073E00E604E4F00090E60BE4F00090E649DB -:0E074C007484F00090E6497484F00090E61981 -:0E075A00E4F00090E6197410F00090E632749E -:0E07680080F00090E6337404F00090E61A74FE -:0E0776000CF00090E6247402F00090E625E4FA -:0E078400F00090E6347409F00090E63574FC45 -:0E079200F00090E61B740CF00090E626740256 -:0E07A000F00090E627E4F00090E6367441F099 -:0E07AE000090E63774FCF0000090E691748035 -:0A07BC00F00090E6917480F0002236 -:0807C60090E6A0E04401F022DE -:0E07CE00AA8274805AC423541FFB740F5A90E1 -:0C07DC00E6834BF090E683E04420F0221E -:0E07E80090E680E0440AF09000FA120DFB90BB -:0E07F600E65D74FFF090E65F74FFF05391EF44 -:0808040090E680E054F7F022B9 -:060E2700E478FFF6D8FD9F -:060E0C00751200751300D1 -:0A080C0090E680E0FA30E719751459 -:0308160000751555 -:03081900E1751670 -:03081C001275173B -:03081F00E1751868 -:030822001C751929 -:03082500E1751A60 -:030828006E751BCF -:02082B00E122C8 -:04082D007514527577 -:0308310015E17559 -:03083400166475D2 -:0308370017E17551 -:03083A00186E75C0 -:03083D0019E17549 -:030840001A1C750A -:030843001BE12294 -:090846005391EF75A100D20232BA -:0C084F00C021C0E0C0F0C082C083C00225 -:0E085B00C003C004C005C006C007C000C00135 -:0E086900C0D075D0005391EF75A10012080C9D -:0E087700D0D0D001D000D007D006D005D004DC -:0D088500D003D002D083D082D0F0D0E0D0DC -:02089200213211 -:0C089400C021C0E0C0F0C082C083C002E0 -:0E08A000C003C004C005C006C007C000C001F0 -:0E08AE00C0D075D0005391EF75A10012080C58 -:0E08BC00D0D0D001D000D007D006D005D00497 -:0D08CA00D003D002D083D082D0F0D0E0D097 -:0208D7002132CC -:0508D90012080C751C63 -:0308DE0046751D3F -:0808E10008758200120C9875E5 -:0308E9001C4F752C -:0608EC001D0875821012C8 -:0408F2000C98751CCD -:0308F60094751DD9 -:0C08F90008758214120C9890E65C7431B3 -:02090500F022DE -:0D090700E582547FFA24F750047582002227 -:07091400BA01047582012203 -:08091B00530201E4BA000104DB -:03092300F5822238 -:0E092600AA82BA010C90E6A1E0FB7C008B8255 -:030934008C83228F -:0E093700BA810C90E6A2E0FB7C008B828C83E0 -:01094500228F -:0E09460053027FEA700C90E6A0E0FB7C008B71 -:04095400828C8322EC -:0E09580090E6A3E0FB7C00EAC313FA7D00EA00 -:090966002BFBED3C8B82F5832292 -:0C096F00C20290E6B8E0FA530260BA0041 -:03097B00028028CF -:05097E00BA2002800D0B -:05098300BA4002800EE5 -:05098800BA60028003CB -:03098D00020C2D2C -:060990001207C6020C2D47 -:0A099600120372E5826003020C2DCB -:0609A0001207C6020C2D37 -:0D09A60090E6B8E0FA530280BA80028003A8 -:0309B300020B2E06 -:0B09B60090E6B9E0FABA0003020AA7BD -:0509C100BA06028035BA -:0509C600BA08028008E0 -:0509CB00BA0A028017CA -:0309D000020B28EF -:0C09D30090E740E512F090E68AE4F09016 -:0809DF00E68B7401F0020C2DFF -:0C09E70090E740E513F090E68AE4F09001 -:0809F300E68B7401F0020C2DEB -:0A09FB0090E6BBE0FABA0102801793 -:050A0500BA0202803876 -:050A0A00BA030280594F -:050A0F00BA0602801B85 -:050A1400BA0702803C5E -:030A1900020AA12D -:0A0A1C00AA14AB1590E6B3EBF07BD3 -:090A26000090E6B4EAF0020C2D88 -:0A0A2F00AA16AB1790E6B3EBF07BBC -:090A39000090E6B4EAF0020C2D75 -:0A0A4200AA18AB1990E6B3EBF07BA5 -:090A4C000090E6B4EAF0020C2D62 -:0A0A5500AA1AAB1B90E6B3EBF07B8E -:090A5F000090E6B4EAF0020C2D4F -:0E0A680090E6BAE0FA90E18EE0FBC3EA9B4014 -:070A7600061207C6020C2D59 -:0C0A7D0090E6BAE075F002A4248FF58228 -:0B0A890074E135F0F583E0FAA3E09083 -:0D0A9400E6B3F07B0090E6B4EAF0020C2D12 -:060AA1001207C6020C2D35 -:0D0AA70090E6B8E0FA53021FBA0002800A80 -:050AB400BA0102801BE5 -:050AB900BA0266802C6A -:0E0ABE0090E740E4F090E741F090E68AF09077 -:080ACC00E68B7402F0020C2D10 -:0E0AD40090E740E4F090E741F090E68AF09061 -:080AE200E68B7402F0020C2DFA -:0E0AEA0090E6BCE0F582120907E582602590D7 -:0E0AF800E6BCE0F582120926E0FA53020190F6 -:0E0B0600E740EAF090E741E4F090E68AF090D4 -:080B1400E68B7402F0020C2DC7 -:060B1C001207C6020C2DB9 -:060B22001207C6020C2DB3 -:060B28001207C6020C2DAD -:0C0B2E0090E6B9E0FA24F45003020C2A0F -:070B3A00EA2A2A900B417327 -:070B4100020C2A020B7702EF -:060B48000BF2020BD302C8 -:060B4E000C2A020C2A0231 -:060B54000C2A020C2A022B -:060B5A000C2A020B6502EB -:050B60000C2A020B6EDF -:090B650090E6BAE0F512020C2D35 -:090B6E0090E6BAE0F513020C2D2B -:0D0B770090E6B8E0FA53021FBA00028005B4 -:050B8400BA0247800ADF -:0A0B890090E6BAE01207C6020C2D38 -:0D0B930090E6BAE0703090E6BCE0F582120A -:0D0BA0000907E582602390E6BCE0F58212B3 -:0E0BAD000926AA82AB83E0FC5304FE8A828BE9 -:0E0BBB0083ECF090E6BCE0F5821207CE806479 -:050BC9001207C6805F69 -:050BCE001207C6805A69 -:0E0BD30090E6B8E0FA53021FBA004F90E6BA5F -:070BE100E0FABA01028005F1 -:050BE800BA020280408A -:050BED001207C6803B69 -:0E0BF20090E6BAE0FA702C90E6BCE0F58212B4 -:0D0C00000907E582601A90E6BCE0F582125B -:0E0C0D000926AA82AB83E0FC4304018A828B95 -:050C1B0083ECF0800DE8 -:050C20001207C6800868 -:050C25001207C6800368 -:030C2A001207C6E8 -:080C2D0090E6A0E04480F022F3 -:050C3500AA82BA0300D1 -:070C3A004005EA249C500173 -:010C41002290 -:090C4200740F5AFBBB030280078A -:070C4B00740F5AFBBB0B45BF -:0A0C5200A2AF9203C2AFEA2400F53E -:0C0C5C0082E43400F5837402F07B007425 -:0C0C6800012AFCE43BFDEC2400F582EDC9 -:0A0C74003400F583E51DFCF0740266 -:0C0C7E002AFAE43BFBEA2400F582EB3488 -:0A0C8A0000F583AA1C7B00EAF0A22B -:030C94000392AF19 -:010C9700223A -:080C9800E582FA2483500122D9 -:060CA000EA54036001228A -:0A0CA600A2AF9204C2AFEA2400F5E9 -:0C0CB00082E43401F5837402F07B0074D0 -:0C0CBC00012AFCE43BFDEC2400F582ED75 -:0A0CC8003401F583E51DF074022AE3 -:0B0CD200FAE43BFBEA2400F582EB345F -:080CDD0001F583AA1CEAF0A254 -:040CE5000492AF22A4 -:050CE900AA82BA8000A0 -:070CEE004005EA244B500110 -:010CF50022DC -:060CF600EA540360012234 -:0A0CFC00A2AF9205C2AFEA2480F512 -:0C0D060082E43400F5837402F07B00747A -:0C0D1200012AFCE43BFDEC2480F582ED9E -:0A0D1E003400F583E51DF074022A8D -:0B0D2800FAE43BFBEA2480F582EB3488 -:080D330000F583AA1CEAF0A2FE -:040D3B000592AF224C -:080D3F00C2E8C2EA751C007550 -:060D47001D01758243123C -:040D4D000C35751CD0 -:030D510080751D8D -:0C0D540000758253120C350090E650E44C -:0E0D6000F00090E652E4F00090E654E4F0005B -:0E0D6E0090E656E4F00090E65174FFF000901D -:0E0D7C00E65374FFF00090E65574FFF000900F -:0E0D8A00E65774FFF00090E658E4F090E6594A -:0E0D980074FFF090E65AE4F090E65B74FFF012 -:0E0DA60090E65CE4F090E65D74FFF090E65E8F -:0E0DB400E4F090E65F74FFF00090E660E4F07B -:0D0DC2000090E66174FFF090E662E4F090AE -:0E0DCF00E66374FFF090E665E4F090E6687469 -:0A0DDD000BF05391AFD2E8D2EA22E6 -:010DE70022E9 -:020DE800AA82DD -:060DEA00120DE7DAFB2206 -:030DF00090FB5025 -:080DF300A3E582458370F9229B -:040DFB00AA82AB839A -:080DFF00120DF01ABAFF011BEE -:050E0700EA4B70F4222B -:030E1A00758121BE -:0A0E1D001205DAE5826003020E15EB +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E9E00020EA49D +:030EB700020EA187 +:030EA1000203F455 +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120635D000D001D004D00580D88A068B078E0D +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C0041206721201AA8D +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120607D004D00580108F82C005C0041206271201AAD0E3 +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209D91201BF80F5C2AF90E609E4F0120180120622 +:12040000C1120459120DAA120940D2AF1208300203E9DD +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E19CE0F582120412D00790E19CE06E +:2004F2002FFFF582C00712041290E1BAE0F582120412D00790E1BAE02FF58212041290E18B +:20051200E4E0F5821204127F0090E19CE0FEC3EF64808EF063F08095F05017EF249CF58203 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1BAE0FEC3EF64808EF063B6 +:20055200F08095F05017EF24BAF582E434E1F583E0F582C007120412D0070F80D77F0090E6 +:20057200E1E4E0FEC3EF64808EF063F08095F05017EF24E4F582E434E1F583E0F582C007F6 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF4001000902350047 +:20E1200001010080FA0904000005FFFFFF020705810200020007050202000200070504029D +:11E1400000020007058602000200070588020002009E +:20E152001201000200000040C016EF030400010203010A060002FFFFFF400100090220000A +:20E1720001010080FA0904000002FFFFFF0207058102400000070502024000000498E19CCB +:05E19200E1BAE1E4E147 +:20E19800040309041E037700770077002E0072006500740072006F00310031002E0064007F +:20E1B80065002A036E00650078007900730032005F006A007400610067005F00330066004F +:1EE1D800690066006F005F006100730012033000300030003000300030003000300023 +:2005F80022222222D2B775B5809001F4020E87AF82AEB574FE5E441CF5B5EF13920392B4C1 +:20061800EFA2E1920392B3EFA2E4920392B222120607A2B0E433FF74024FF58222E58213A7 +:2006380092B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B48C +:2006580013C2B492B2D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B0139271 +:20067800B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4C5 +:20069800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2AA +:0906B800D2B400C2B4F582222282 +:2006C10090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6AB +:2006E1000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000F9 +:200701000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A26D +:20072100F000000090E61374A2F000000090E61474E2F000000090E61574E2F00000009008 +:20074100E6047404F000000090E6047406F000000090E6047408F000000090E604E4F0002E +:20076100000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E462 +:20078100F000000090E6197410F000000090E6327480F000000090E6337404F00000009038 +:2007A100E61A740CF000000090E6247402F000000090E625E4F000000090E6347409F00042 +:2007C100000090E63574FCF000000090E61B740CF000000090E6267402F000000090E6276D +:2007E100E4F000000090E6367441F000000090E63774FCF000000000000090E6917480F0DB +:0D08010000000090E6917480F000000022DD +:20080E0090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E044204B +:20082E00F02290E680E0440AF09000FA120E8790E65D74FFF090E65F74FFF0AF9174EF5FE3 +:0A084E00F59190E680E054F7F022E7 +:060EB100E478FFF6D8FD15 +:060E980075120075130045 +:2008580090E680E0FF30E7197514007515E17516127517E175181C7519E1751A6E751BE1F7 +:20087800227514527515E17516647517E175186E7519E1751A1C751BE122C0E0C007C0D0FD +:2008980075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C08378 +:2008B800C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A100127F +:2008D8000858D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C06C +:2008F80021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91B9 +:2009180074EF5FF59175A100120858D0D0D000D001D002D003D004D005D006D007D083D090 +:2009380082D0F0D0E0D02132120858751C92751D08758200120D03751CAE751D0875821062 +:20095800120D03751CF7751D08758214120D0390E65C7431F022AF828F06747F5EFF24F754 +:20097800500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A164 +:20099800E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C40 +:2009B80090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583DA +:2009D80022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280B5 +:2009F80003020C9812080E020C98120375E5826003020C9812080E020C9890E6B8E0FF5340 +:200A18000780BF80028003020B9C90E6B9E0FFBF0003020B13BF06028035BF08028008BF4E +:200A38000A028017020B9690E740E512F090E68AE4F090E68B7401F0020C9890E740E5132B +:200A5800F090E68AE4F090E68B7401F0020C9890E6BBE0FFBF01028017BF02028038BF0308 +:200A7800028059BF0602801BBF0702803C020B0DAE14AF1590E6B3EFF07F0090E6B4EEF06E +:200A9800020C98AE16AF1790E6B3EFF07F0090E6B4EEF0020C98AE18AF1990E6B3EFF07FC4 +:200AB8000090E6B4EEF0020C98AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C9890E6BAE099 +:200AD800FF90E18EE0FEC3EF9E400612080E020C9890E6BAE075F002A4248FF58274E135EF +:200AF800F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C9812080E020C9890E6B8E0FFF4 +:200B180053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A03 +:200B3800F090E68B7402F0020C9890E740E4F090E741F090E68AF090E68B7402F0020C9870 +:200B580090E6BCE0F58212096EE582602590E6BCE0F582120990E0FF53070190E740EFF07B +:200B780090E741E4F090E68AF090E68B7402F0020C9812080E020C9812080E020C9812081E +:200B98000E020C9890E6B9E0FF24F45003020C95EF240A83F582EF241083F583E47395E06C +:200BB8005D3E9595959595CE95D70C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C989085 +:200BD800E6BAE0F513020C9890E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0CD +:200BF80012080E020C9890E6BAE0703090E6BCE0F58212096EE582602390E6BCE0F58212C8 +:200C18000990AE82AF83E0FD5305FE8E828F83EDF090E6BCE0F582120816806412080E804A +:200C38005F12080E805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040CE +:200C580012080E803B90E6BAE0FF702C90E6BCE0F58212096EE582601A90E6BCE0F5821260 +:200C78000990AE82AF83E0FD4305018E828F83EDF0800D12080E800812080E800312080E2C +:080C980090E6A0E04480F02288 +:200CA000AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF92DF +:200CC00005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED3439 +:200CE00000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205D7 +:200D000092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F535 +:200D2000837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EB4 +:200D4000FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B500159 +:200D600022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC0F +:200D8000E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5BD +:200DA00083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120CA0751C80751D00E7 +:200DC000758253120CA000000090E650E4F000000090E652E4F000000090E654E4F0000037 +:200DE0000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFBF +:200E0000F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B69 +:200E200074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4D9 +:200E4000F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF084 +:130E6000AF9174EF5FF591AF9174BF5FF591D2E8D2EA2207 +:200E730022AF82120E73DFFB2290FB50A3E582458370F922AE82AF83120E7C1EBEFF011F4C +:050E9300EE4F70F42297 +:0D0EA4007581211205D6E5826003020EA1C2 :00000001FF diff --git a/tools/fx2/bin/nexys2_jtag_3fifo_ic.ihx b/tools/fx2/bin/nexys2_jtag_3fifo_ic.ihx index 9753bc2b..552c80de 100644 --- a/tools/fx2/bin/nexys2_jtag_3fifo_ic.ihx +++ b/tools/fx2/bin/nexys2_jtag_3fifo_ic.ihx @@ -1,4 +1,4 @@ -:06000000020E0C02006B71 +:06000000020E9802006BE5 :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,435 +12,135 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030E1200020E1AB3 -:030E2D00020E159D -:050E15001203F180FE54 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120637D001D000D005D0F4 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C0051206741201AAD005D00462 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C00512060BB9 -:06034C00D005D004801072 -:0E0352008A82C004C0051206291201AAD00535 -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312096F52 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206C312BA -:0603FF000455120D3F122F -:0804050008D9D2AF1207E8028A -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E19EE0F58212040FD002901E -:0D04F100E19EE02AFAF582C00212040F908D -:0B04FE00E1BCE0F58212040FD0029078 -:0A050900E1BCE02AF58212040F9015 -:0A051300E1E6E0F58212040F7A0021 -:0E051D0090E19EE0FBC3EA64808BF063F08007 -:0B052B0095F05017EA249EF582E4349E -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1BCE0FBC3EA64808BF063F080BE -:0B05560095F05017EA24BCF582E43455 -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1E6E0FBC3EA64808BF063F08069 -:0B05810095F05017EA24E6F582E43400 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009023500010100BA -:0EE1230080FA0904000005FFFFFF02070581D6 -:0EE131000200020007050202000200070504BA -:0EE13F000200020007058602000200070588A4 -:04E14D0002000200CA -:0EE152001201000200000040C016EF0304009E -:04E1600001020301B4 -:0AE164000A060002FFFFFF40010061 -:0EE16E000902200001010080FA0904000002ED -:0EE17C00FFFFFF0207058102400000070502B9 -:04E18A00024000004F -:01E18E00048C -:02E18F0098E115 -:02E191009EE10D -:02E19300BCE1ED -:02E19500E6E1C1 -:06E198000603000009046B -:0EE19E001E037700770077002E0072006500E8 -:0EE1AC00740072006F00310031002E0064001C -:02E1BA006500FE -:0EE1BC002A036E0065007800790073003200BF -:0EE1CA005F006A007400610067005F003300B0 -:0EE1D8006600690066006F005F00690063006A -:0EE1E6001203300030003000300030003000F6 -:04E1F40030003000C7 -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:0B060000D2B775B5809001F4020DFB2D -:0E060B00AA82ABB574FE5BF5F0741C45F0F5E9 -:0E061900B5EA1392B4EAA2E192B3EAA2E49227 -:02062700B222FD -:0E06290012060BA2B0E433FA74024AF58222E4 -:0E063700E5821392B2D2B413C2B492B2D2B41E -:0E06450013C2B492B2D2B413C2B492B2D2B401 -:0E06530013C2B492B2D2B413C2B492B2D2B4F3 -:0E06610013C2B492B2D2B413C2B492B2D2B4E5 -:05066F0000C2B42222CC -:0E067400E582A2B01392B2D2B4C2B4A2B01307 -:0E06820092B2D2B4C2B4A2B01392B2D2B4C239 -:0E069000B4A2B01392B2D2B4C2B4A2B013920C -:0E069E00B2D2B4C2B4A2B01392B2D2B4C2B4FB -:0E06AC00A2B01392B2D2B4C2B4A2B01392B2F2 -:0906BA00D2B400C2B4F582222280 -:0D06C30090E6007412F090E60174A3F09030 -:0E06D000E6707480F00090E60274E0F0009096 -:0E06DE00E60374F9F00090E6047480F00090DA -:0D06EC00E60B7403F00090E610E4F00090BF -:0D06F900E61174A0F00090E618E4F0009007 -:0E070600E6047402F00090E61274A2F0009077 -:0E071400E61374A2F00090E61474E2F0009078 -:0E072200E61574E2F00090E6047404F0009016 -:0E073000E6047406F00090E6047408F00090F1 -:0E073E00E604E4F00090E60BE4F00090E649DB -:0E074C007484F00090E6497484F00090E61981 -:0E075A00E4F00090E6197410F00090E632749E -:0E07680080F00090E6337404F00090E61A74FE -:0E0776000CF00090E6247402F00090E625E4FA -:0E078400F00090E6347409F00090E63574FC45 -:0E079200F00090E61B740CF00090E626740256 -:0E07A000F00090E627E4F00090E6367441F099 -:0E07AE000090E63774FCF0000090E691748035 -:0A07BC00F00090E6917480F0002236 -:0807C60090E6A0E04401F022DE -:0E07CE00AA8274805AC423541FFB740F5A90E1 -:0C07DC00E6834BF090E683E04420F0221E -:0E07E80090E680E0440AF09000FA120DFB90BB -:0E07F600E65D74FFF090E65F74FFF05391EF44 -:0808040090E680E054F7F022B9 -:060E2700E478FFF6D8FD9F -:060E0C00751200751300D1 -:0A080C0090E680E0FA30E719751459 -:0308160000751555 -:03081900E1751670 -:03081C001275173B -:03081F00E1751868 -:030822001C751929 -:03082500E1751A60 -:030828006E751BCF -:02082B00E122C8 -:04082D007514527577 -:0308310015E17559 -:03083400166475D2 -:0308370017E17551 -:03083A00186E75C0 -:03083D0019E17549 -:030840001A1C750A -:030843001BE12294 -:090846005391EF75A100D20232BA -:0C084F00C021C0E0C0F0C082C083C00225 -:0E085B00C003C004C005C006C007C000C00135 -:0E086900C0D075D0005391EF75A10012080C9D -:0E087700D0D0D001D000D007D006D005D004DC -:0D088500D003D002D083D082D0F0D0E0D0DC -:02089200213211 -:0C089400C021C0E0C0F0C082C083C002E0 -:0E08A000C003C004C005C006C007C000C001F0 -:0E08AE00C0D075D0005391EF75A10012080C58 -:0E08BC00D0D0D001D000D007D006D005D00497 -:0D08CA00D003D002D083D082D0F0D0E0D097 -:0208D7002132CC -:0508D90012080C751C63 -:0308DE0046751D3F -:0808E10008758200120C9875E5 -:0308E9001C4F752C -:0608EC001D0875821012C8 -:0408F2000C98751CCD -:0308F60094751DD9 -:0C08F90008758214120C9890E65C7431B3 -:02090500F022DE -:0D090700E582547FFA24F750047582002227 -:07091400BA01047582012203 -:08091B00530201E4BA000104DB -:03092300F5822238 -:0E092600AA82BA010C90E6A1E0FB7C008B8255 -:030934008C83228F -:0E093700BA810C90E6A2E0FB7C008B828C83E0 -:01094500228F -:0E09460053027FEA700C90E6A0E0FB7C008B71 -:04095400828C8322EC -:0E09580090E6A3E0FB7C00EAC313FA7D00EA00 -:090966002BFBED3C8B82F5832292 -:0C096F00C20290E6B8E0FA530260BA0041 -:03097B00028028CF -:05097E00BA2002800D0B -:05098300BA4002800EE5 -:05098800BA60028003CB -:03098D00020C2D2C -:060990001207C6020C2D47 -:0A099600120372E5826003020C2DCB -:0609A0001207C6020C2D37 -:0D09A60090E6B8E0FA530280BA80028003A8 -:0309B300020B2E06 -:0B09B60090E6B9E0FABA0003020AA7BD -:0509C100BA06028035BA -:0509C600BA08028008E0 -:0509CB00BA0A028017CA -:0309D000020B28EF -:0C09D30090E740E512F090E68AE4F09016 -:0809DF00E68B7401F0020C2DFF -:0C09E70090E740E513F090E68AE4F09001 -:0809F300E68B7401F0020C2DEB -:0A09FB0090E6BBE0FABA0102801793 -:050A0500BA0202803876 -:050A0A00BA030280594F -:050A0F00BA0602801B85 -:050A1400BA0702803C5E -:030A1900020AA12D -:0A0A1C00AA14AB1590E6B3EBF07BD3 -:090A26000090E6B4EAF0020C2D88 -:0A0A2F00AA16AB1790E6B3EBF07BBC -:090A39000090E6B4EAF0020C2D75 -:0A0A4200AA18AB1990E6B3EBF07BA5 -:090A4C000090E6B4EAF0020C2D62 -:0A0A5500AA1AAB1B90E6B3EBF07B8E -:090A5F000090E6B4EAF0020C2D4F -:0E0A680090E6BAE0FA90E18EE0FBC3EA9B4014 -:070A7600061207C6020C2D59 -:0C0A7D0090E6BAE075F002A4248FF58228 -:0B0A890074E135F0F583E0FAA3E09083 -:0D0A9400E6B3F07B0090E6B4EAF0020C2D12 -:060AA1001207C6020C2D35 -:0D0AA70090E6B8E0FA53021FBA0002800A80 -:050AB400BA0102801BE5 -:050AB900BA0266802C6A -:0E0ABE0090E740E4F090E741F090E68AF09077 -:080ACC00E68B7402F0020C2D10 -:0E0AD40090E740E4F090E741F090E68AF09061 -:080AE200E68B7402F0020C2DFA -:0E0AEA0090E6BCE0F582120907E582602590D7 -:0E0AF800E6BCE0F582120926E0FA53020190F6 -:0E0B0600E740EAF090E741E4F090E68AF090D4 -:080B1400E68B7402F0020C2DC7 -:060B1C001207C6020C2DB9 -:060B22001207C6020C2DB3 -:060B28001207C6020C2DAD -:0C0B2E0090E6B9E0FA24F45003020C2A0F -:070B3A00EA2A2A900B417327 -:070B4100020C2A020B7702EF -:060B48000BF2020BD302C8 -:060B4E000C2A020C2A0231 -:060B54000C2A020C2A022B -:060B5A000C2A020B6502EB -:050B60000C2A020B6EDF -:090B650090E6BAE0F512020C2D35 -:090B6E0090E6BAE0F513020C2D2B -:0D0B770090E6B8E0FA53021FBA00028005B4 -:050B8400BA0247800ADF -:0A0B890090E6BAE01207C6020C2D38 -:0D0B930090E6BAE0703090E6BCE0F582120A -:0D0BA0000907E582602390E6BCE0F58212B3 -:0E0BAD000926AA82AB83E0FC5304FE8A828BE9 -:0E0BBB0083ECF090E6BCE0F5821207CE806479 -:050BC9001207C6805F69 -:050BCE001207C6805A69 -:0E0BD30090E6B8E0FA53021FBA004F90E6BA5F -:070BE100E0FABA01028005F1 -:050BE800BA020280408A -:050BED001207C6803B69 -:0E0BF20090E6BAE0FA702C90E6BCE0F58212B4 -:0D0C00000907E582601A90E6BCE0F582125B -:0E0C0D000926AA82AB83E0FC4304018A828B95 -:050C1B0083ECF0800DE8 -:050C20001207C6800868 -:050C25001207C6800368 -:030C2A001207C6E8 -:080C2D0090E6A0E04480F022F3 -:050C3500AA82BA0300D1 -:070C3A004005EA249C500173 -:010C41002290 -:090C4200740F5AFBBB030280078A -:070C4B00740F5AFBBB0B45BF -:0A0C5200A2AF9203C2AFEA2400F53E -:0C0C5C0082E43400F5837402F07B007425 -:0C0C6800012AFCE43BFDEC2400F582EDC9 -:0A0C74003400F583E51DFCF0740266 -:0C0C7E002AFAE43BFBEA2400F582EB3488 -:0A0C8A0000F583AA1C7B00EAF0A22B -:030C94000392AF19 -:010C9700223A -:080C9800E582FA2483500122D9 -:060CA000EA54036001228A -:0A0CA600A2AF9204C2AFEA2400F5E9 -:0C0CB00082E43401F5837402F07B0074D0 -:0C0CBC00012AFCE43BFDEC2400F582ED75 -:0A0CC8003401F583E51DF074022AE3 -:0B0CD200FAE43BFBEA2400F582EB345F -:080CDD0001F583AA1CEAF0A254 -:040CE5000492AF22A4 -:050CE900AA82BA8000A0 -:070CEE004005EA244B500110 -:010CF50022DC -:060CF600EA540360012234 -:0A0CFC00A2AF9205C2AFEA2480F512 -:0C0D060082E43400F5837402F07B00747A -:0C0D1200012AFCE43BFDEC2480F582ED9E -:0A0D1E003400F583E51DF074022A8D -:0B0D2800FAE43BFBEA2480F582EB3488 -:080D330000F583AA1CEAF0A2FE -:040D3B000592AF224C -:080D3F00C2E8C2EA751C007550 -:060D47001D01758243123C -:040D4D000C35751CD0 -:030D510080751D8D -:0C0D540000758253120C350090E650E44C -:0E0D6000F00090E652E4F00090E654E4F0005B -:0E0D6E0090E656E4F00090E65174FFF000901D -:0E0D7C00E65374FFF00090E65574FFF000900F -:0E0D8A00E65774FFF00090E658E4F090E6594A -:0E0D980074FFF090E65AE4F090E65B74FFF012 -:0E0DA60090E65CE4F090E65D74FFF090E65E8F -:0E0DB400E4F090E65F74FFF00090E660E4F07B -:0D0DC2000090E66174FFF090E662E4F090AE -:0E0DCF00E66374FFF090E665E4F090E6687469 -:0A0DDD000BF05391AFD2E8D2EA22E6 -:010DE70022E9 -:020DE800AA82DD -:060DEA00120DE7DAFB2206 -:030DF00090FB5025 -:080DF300A3E582458370F9229B -:040DFB00AA82AB839A -:080DFF00120DF01ABAFF011BEE -:050E0700EA4B70F4222B -:030E1A00758121BE -:0A0E1D001205DAE5826003020E15EB +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E9E00020EA49D +:030EB700020EA187 +:030EA1000203F455 +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120635D000D001D004D00580D88A068B078E0D +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C0041206721201AA8D +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120607D004D00580108F82C005C0041206271201AAD0E3 +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209D91201BF80F5C2AF90E609E4F0120180120622 +:12040000C1120459120DAA120940D2AF1208300203E9DD +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E19CE0F582120412D00790E19CE06E +:2004F2002FFFF582C00712041290E1BAE0F582120412D00790E1BAE02FF58212041290E18B +:20051200E4E0F5821204127F0090E19CE0FEC3EF64808EF063F08095F05017EF249CF58203 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1BAE0FEC3EF64808EF063B6 +:20055200F08095F05017EF24BAF582E434E1F583E0F582C007120412D0070F80D77F0090E6 +:20057200E1E4E0FEC3EF64808EF063F08095F05017EF24E4F582E434E1F583E0F582C007F6 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF4001000902350047 +:20E1200001010080FA0904000005FFFFFF020705810200020007050202000200070504029D +:11E1400000020007058602000200070588020002009E +:20E152001201000200000040C016EF030400010203010A060002FFFFFF400100090220000A +:20E1720001010080FA0904000002FFFFFF0207058102400000070502024000000498E19CCB +:05E19200E1BAE1E4E147 +:20E19800040309041E037700770077002E0072006500740072006F00310031002E0064007F +:20E1B80065002A036E00650078007900730032005F006A007400610067005F00330066004F +:1EE1D800690066006F005F00690063001203300030003000300030003000300030002B +:2005F80022222222D2B775B5809001F4020E87AF82AEB574FE5E441CF5B5EF13920392B4C1 +:20061800EFA2E1920392B3EFA2E4920392B222120607A2B0E433FF74024FF58222E58213A7 +:2006380092B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B48C +:2006580013C2B492B2D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B0139271 +:20067800B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4C5 +:20069800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2AA +:0906B800D2B400C2B4F582222282 +:2006C10090E6007412F090E60174A3F090E6707480F000000090E60274E0F000000090E6B3 +:2006E1000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000F9 +:200701000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A26D +:20072100F000000090E61374A2F000000090E61474E2F000000090E61574E2F00000009008 +:20074100E6047404F000000090E6047406F000000090E6047408F000000090E604E4F0002E +:20076100000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E462 +:20078100F000000090E6197410F000000090E6327480F000000090E6337404F00000009038 +:2007A100E61A740CF000000090E6247402F000000090E625E4F000000090E6347409F00042 +:2007C100000090E63574FCF000000090E61B740CF000000090E6267402F000000090E6276D +:2007E100E4F000000090E6367441F000000090E63774FCF000000000000090E6917480F0DB +:0D08010000000090E6917480F000000022DD +:20080E0090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E044204B +:20082E00F02290E680E0440AF09000FA120E8790E65D74FFF090E65F74FFF0AF9174EF5FE3 +:0A084E00F59190E680E054F7F022E7 +:060EB100E478FFF6D8FD15 +:060E980075120075130045 +:2008580090E680E0FF30E7197514007515E17516127517E175181C7519E1751A6E751BE1F7 +:20087800227514527515E17516647517E175186E7519E1751A1C751BE122C0E0C007C0D0FD +:2008980075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C08378 +:2008B800C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A100127F +:2008D8000858D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C06C +:2008F80021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91B9 +:2009180074EF5FF59175A100120858D0D0D000D001D002D003D004D005D006D007D083D090 +:2009380082D0F0D0E0D02132120858751C92751D08758200120D03751CAE751D0875821062 +:20095800120D03751CF7751D08758214120D0390E65C7431F022AF828F06747F5EFF24F754 +:20097800500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A164 +:20099800E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C40 +:2009B80090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583DA +:2009D80022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280B5 +:2009F80003020C9812080E020C98120375E5826003020C9812080E020C9890E6B8E0FF5340 +:200A18000780BF80028003020B9C90E6B9E0FFBF0003020B13BF06028035BF08028008BF4E +:200A38000A028017020B9690E740E512F090E68AE4F090E68B7401F0020C9890E740E5132B +:200A5800F090E68AE4F090E68B7401F0020C9890E6BBE0FFBF01028017BF02028038BF0308 +:200A7800028059BF0602801BBF0702803C020B0DAE14AF1590E6B3EFF07F0090E6B4EEF06E +:200A9800020C98AE16AF1790E6B3EFF07F0090E6B4EEF0020C98AE18AF1990E6B3EFF07FC4 +:200AB8000090E6B4EEF0020C98AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C9890E6BAE099 +:200AD800FF90E18EE0FEC3EF9E400612080E020C9890E6BAE075F002A4248FF58274E135EF +:200AF800F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C9812080E020C9890E6B8E0FFF4 +:200B180053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A03 +:200B3800F090E68B7402F0020C9890E740E4F090E741F090E68AF090E68B7402F0020C9870 +:200B580090E6BCE0F58212096EE582602590E6BCE0F582120990E0FF53070190E740EFF07B +:200B780090E741E4F090E68AF090E68B7402F0020C9812080E020C9812080E020C9812081E +:200B98000E020C9890E6B9E0FF24F45003020C95EF240A83F582EF241083F583E47395E06C +:200BB8005D3E9595959595CE95D70C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C989085 +:200BD800E6BAE0F513020C9890E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0CD +:200BF80012080E020C9890E6BAE0703090E6BCE0F58212096EE582602390E6BCE0F58212C8 +:200C18000990AE82AF83E0FD5305FE8E828F83EDF090E6BCE0F582120816806412080E804A +:200C38005F12080E805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040CE +:200C580012080E803B90E6BAE0FF702C90E6BCE0F58212096EE582601A90E6BCE0F5821260 +:200C78000990AE82AF83E0FD4305018E828F83EDF0800D12080E800812080E800312080E2C +:080C980090E6A0E04480F02288 +:200CA000AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF92DF +:200CC00005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED3439 +:200CE00000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205D7 +:200D000092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F535 +:200D2000837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EB4 +:200D4000FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B500159 +:200D600022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC0F +:200D8000E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5BD +:200DA00083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120CA0751C80751D00E7 +:200DC000758253120CA000000090E650E4F000000090E652E4F000000090E654E4F0000037 +:200DE0000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFBF +:200E0000F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B69 +:200E200074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4D9 +:200E4000F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF084 +:130E6000AF9174EF5FF591AF9174BF5FF591D2E8D2EA2207 +:200E730022AF82120E73DFFB2290FB50A3E582458370F922AE82AF83120E7C1EBEFF011F4C +:050E9300EE4F70F42297 +:0D0EA4007581211205D6E5826003020EA1C2 :00000001FF diff --git a/tools/fx2/bin/nexys3_jtag.ihx b/tools/fx2/bin/nexys3_jtag.ihx index 17bea7ad..62c1efd1 100644 --- a/tools/fx2/bin/nexys3_jtag.ihx +++ b/tools/fx2/bin/nexys3_jtag.ihx @@ -1,4 +1,4 @@ -:06000000020DAC02006BD2 +:06000000020E1E02006B5F :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,426 +12,130 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DB200020DBA75 -:030DCD00020DB55F -:050DB5001203F180FEB5 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120632D001D000D005D0F9 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C00512066F1201AAD005D00467 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C005120606BE -:06034C00D005D004801072 -:0E0352008A82C004C0051206241201AAD0053A -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312090FB2 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206BE12BF -:0603FF000455120CDF1290 -:080405000879D2AF120788024A -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E188E0F58212040FD0029034 -:0D04F100E188E02AFAF582C00212040F90A3 -:0B04FE00E1A6E0F58212040FD002908E -:0A050900E1A6E02AF58212040F902B -:0A051300E1BEE0F58212040F7A0049 -:0E051D0090E188E0FBC3EA64808BF063F0801D -:0B052B0095F05017EA2488F582E434B4 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1A6E0FBC3EA64808BF063F080D4 -:0B05560095F05017EA24A6F582E4346B -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1BEE0FBC3EA64808BF063F08091 -:0B05810095F05017EA24BEF582E43428 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022000010100CF -:0EE1230080FA0904000002FFFFFF02070581D9 -:0BE131000200020007050202000200CD -:0EE13C001201000200000040C016EF030400B4 -:04E14A0001020301CA -:0AE14E000A060002FFFFFF40010077 -:0EE158000902200001010080FA090400000203 -:0EE16600FFFFFF0207058102400000070502CF -:04E174000240000065 -:01E1780004A2 -:02E1790082E141 -:02E17B0088E139 -:02E17D00A6E119 -:02E17F00BEE1FF -:06E1820006030000090481 -:0EE188001E037700770077002E0072006500FE -:0EE19600740072006F00310031002E00640032 -:02E1A400650014 -:0EE1A60018036E0065007800790073003300E6 -:0AE1B4005F006A007400610067005C -:0EE1BE0012033000300030003000300030001E -:04E1CC0030003000EF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:060600009001F4020D9BC5 -:0E060600AA82ABB574FE5BF5F0741C45F0F5EE -:0E061400B5EA1392B4EAA2E192B3EAA2E4922C -:02062200B22202 -:0E062400120606A2B0E433FA74024AF58222EE -:0E063200E5821392B2D2B413C2B492B2D2B423 -:0E06400013C2B492B2D2B413C2B492B2D2B406 -:0E064E0013C2B492B2D2B413C2B492B2D2B4F8 -:0E065C0013C2B492B2D2B413C2B492B2D2B4EA -:05066A0000C2B42222D1 -:0E066F00E582A2B01392B2D2B4C2B4A2B0130C -:0E067D0092B2D2B4C2B4A2B01392B2D2B4C23E -:0E068B00B4A2B01392B2D2B4C2B4A2B0139211 -:0E069900B2D2B4C2B4A2B01392B2D2B4C2B400 -:0E06A700A2B01392B2D2B4C2B4A2B01392B2F7 -:0906B500D2B400C2B4F582222285 -:0D06BE0090E6007412F090E60174ABF0902D -:0E06CB00E6707480F00090E60274E0F000909B -:0E06D900E60374F9F00090E6047480F00090DF -:0D06E700E60B7403F00090E610E4F00090C4 -:0D06F400E61174A0F00090E618E4F000900C -:0E070100E6047402F00090E61274A2F000907C -:0E070F00E6137402F00090E6147402F00090FD -:0E071D00E6157402F00090E6047404F00090FB -:0E072B00E6047406F00090E6047408F00090F6 -:0E073900E604E4F00090E619E4F00090E61A01 -:0E074700E4F00090E61BE4F00090E60BE4F016 -:0E075500000090E6917480F00090E6917480B0 -:03076300F0002281 -:0807660090E6A0E04401F0223E -:0E076E00AA8274805AC423541FFB740F5A9041 -:0C077C00E6834BF090E683E04420F0227E -:0E07880090E680E0440AF09000FA120D9B907B -:0E079600E65D74FFF090E65F74FFF05391EFA4 -:0807A40090E680E054F7F0221A -:060DC700E478FFF6D8FD00 -:060DAC0075120075130032 -:0A07AC0090E680E0FA30E7197514BA -:0307B600007515B6 -:0307B900E17516D1 -:0307BC001275179C -:0307BF00E17518C9 -:0307C2001C75198A -:0307C500E1751AC1 -:0307C80058751B46 -:0207CB00E12229 -:0407CD0075143C75EE -:0307D10015E175BA -:0307D400164E7549 -:0307D70017E175B2 -:0307DA0018587537 -:0307DD0019E175AA -:0307E0001A1C756B -:0307E3001BE122F5 -:0907E6005391EF75A100D202321B -:0C07EF00C021C0E0C0F0C082C083C00286 -:0E07FB00C003C004C005C006C007C000C00196 -:0E080900C0D075D0005391EF75A1001207AC5E -:0E081700D0D0D001D000D007D006D005D0043C -:0D082500D003D002D083D082D0F0D0E0D03C -:02083200213271 -:0C083400C021C0E0C0F0C082C083C00240 -:0E084000C003C004C005C006C007C000C00150 -:0E084E00C0D075D0005391EF75A1001207AC19 -:0E085C00D0D0D001D000D007D006D005D004F7 -:0D086A00D003D002D083D082D0F0D0E0D0F7 -:0208770021322C -:050879001207AC751C24 -:03087E00E6751DFF -:0808810007758200120C3875A6 -:030889001CEF75EC -:06088C001D077582101229 -:040892000C38751C8D -:0308960034751D99 -:0C08990008758214120C3890E65C743173 -:0208A500F0223F -:0D08A700E582547FFA24F750047582002288 -:0708B400BA01047582012264 -:0808BB00530201E4BA0001043C -:0308C300F5822299 -:0E08C600AA82BA010C90E6A1E0FB7C008B82B6 -:0308D4008C8322F0 -:0E08D700BA810C90E6A2E0FB7C008B828C8341 -:0108E50022F0 -:0E08E60053027FEA700C90E6A0E0FB7C008BD2 -:0408F400828C83224D -:0E08F80090E6A3E0FB7C00EAC313FA7D00EA61 -:090906002BFBED3C8B82F58322F2 -:0C090F00C20290E6B8E0FA530260BA00A1 -:03091B000280282F -:05091E00BA2002800D6B -:05092300BA4002800E45 -:05092800BA600280032B -:03092D00020BCDED -:06093000120766020BCD68 -:0A093600120372E5826003020BCD8C -:06094000120766020BCD58 -:0D09460090E6B8E0FA530280BA8002800308 -:03095300020ACEC7 -:0B09560090E6B9E0FABA0003020A477D -:05096100BA060280351A -:05096600BA0802800840 -:05096B00BA0A0280172A -:03097000020AC8B0 -:0C09730090E740E512F090E68AE4F09076 -:08097F00E68B7401F0020BCDC0 -:0C09870090E740E513F090E68AE4F09061 -:08099300E68B7401F0020BCDAC -:0A099B0090E6BBE0FABA01028017F3 -:0509A500BA02028038D7 -:0509AA00BA03028059B0 -:0509AF00BA0602801BE6 -:0509B400BA0702803CBF -:0309B900020A41EE -:0A09BC00AA14AB1590E6B3EBF07B34 -:0909C6000090E6B4EAF0020BCD4A -:0A09CF00AA16AB1790E6B3EBF07B1D -:0909D9000090E6B4EAF0020BCD37 -:0A09E200AA18AB1990E6B3EBF07B06 -:0909EC000090E6B4EAF0020BCD24 -:0A09F500AA1AAB1B90E6B3EBF07BEF -:0909FF000090E6B4EAF0020BCD11 -:0E0A080090E6BAE0FA90E178E0FBC3EA9B408A -:070A160006120766020BCD7A -:0C0A1D0090E6BAE075F002A42479F5829E -:0B0A290074E135F0F583E0FAA3E090E3 -:0D0A3400E6B3F07B0090E6B4EAF0020BCDD3 -:060A4100120766020BCD56 -:0D0A470090E6B8E0FA53021FBA0002800AE0 -:050A5400BA0102801B45 -:050A5900BA0266802CCA -:0E0A5E0090E740E4F090E741F090E68AF090D7 -:080A6C00E68B7402F0020BCDD1 -:0E0A740090E740E4F090E741F090E68AF090C1 -:080A8200E68B7402F0020BCDBB -:0E0A8A0090E6BCE0F5821208A7E58260259098 -:0E0A9800E6BCE0F5821208C6E0FA53020190B7 -:0E0AA600E740EAF090E741E4F090E68AF09035 -:080AB400E68B7402F0020BCD89 -:060ABC00120766020BCDDB -:060AC200120766020BCDD5 -:060AC800120766020BCDCF -:0C0ACE0090E6B9E0FA24F45003020BCAD1 -:070ADA00EA2A2A900AE173E9 -:070AE100020BCA020B170211 -:060AE8000B92020B7302E9 -:060AEE000BCA020BCA0254 -:060AF4000BCA020BCA024E -:060AFA000BCA020B05020D -:050B00000BCA020B0E00 -:090B050090E6BAE0F512020BCDF6 -:090B0E0090E6BAE0F513020BCDEC -:0D0B170090E6B8E0FA53021FBA0002800514 -:050B2400BA0247800A3F -:0A0B290090E6BAE0120766020BCD59 -:0D0B330090E6BAE0703090E6BCE0F582126A -:0D0B400008A7E582602390E6BCE0F5821274 -:0E0B4D0008C6AA82AB83E0FC5304FE8A828BAA -:0E0B5B0083ECF090E6BCE0F58212076E806439 -:050B6900120766805F29 -:050B6E00120766805A29 -:0E0B730090E6B8E0FA53021FBA004F90E6BABF -:070B8100E0FABA0102800551 -:050B8800BA02028040EA -:050B8D00120766803B29 -:0E0B920090E6BAE0FA702C90E6BCE0F5821214 -:0D0BA00008A7E582601A90E6BCE0F582121D -:0E0BAD0008C6AA82AB83E0FC4304018A828B57 -:050BBB0083ECF0800D49 -:050BC000120766800829 -:050BC500120766800329 -:030BCA00120766A9 -:080BCD0090E6A0E04480F02254 -:050BD500AA82BA030032 -:070BDA004005EA249C5001D4 -:010BE10022F1 -:090BE200740F5AFBBB03028007EB -:070BEB00740F5AFBBB0B4520 -:0A0BF200A2AF9203C2AFEA2400F59F -:0C0BFC0082E43400F5837402F07B007486 -:0C0C0800012AFCE43BFDEC2400F582ED29 -:0A0C14003400F583E51DFCF07402C6 -:0C0C1E002AFAE43BFBEA2400F582EB34E8 -:0A0C2A0000F583AA1C7B00EAF0A28B -:030C34000392AF79 -:010C3700229A -:080C3800E582FA248350012239 -:060C4000EA5403600122EA -:0A0C4600A2AF9204C2AFEA2400F549 -:0C0C500082E43401F5837402F07B007430 -:0C0C5C00012AFCE43BFDEC2400F582EDD5 -:0A0C68003401F583E51DF074022A43 -:0B0C7200FAE43BFBEA2400F582EB34BF -:080C7D0001F583AA1CEAF0A2B4 -:040C85000492AF2204 -:050C8900AA82BA800000 -:070C8E004005EA244B500170 -:010C9500223C -:060C9600EA540360012294 -:0A0C9C00A2AF9205C2AFEA2480F572 -:0C0CA60082E43400F5837402F07B0074DB -:0C0CB200012AFCE43BFDEC2480F582EDFF -:0A0CBE003400F583E51DF074022AEE -:0B0CC800FAE43BFBEA2480F582EB34E9 -:080CD30000F583AA1CEAF0A25F -:040CDB000592AF22AD -:080CDF00C2E8C2EA751C0075B1 -:060CE7001D01758243129D -:040CED000BD5751C92 -:030CF10080751DEE -:0C0CF40000758253120BD50090E650E40E -:0E0D0000F00090E652E4F00090E654E4F000BB -:0E0D0E0090E656E4F00090E65174FFF000907D -:0E0D1C00E65374FFF00090E65574FFF000906F -:0E0D2A00E65774FFF00090E658E4F090E659AA -:0E0D380074FFF090E65AE4F090E65B74FFF072 -:0E0D460090E65CE4F090E65D74FFF090E65EEF -:0E0D5400E4F090E65F74FFF00090E660E4F0DB -:0D0D62000090E66174FFF090E662E4F0900E -:0E0D6F00E66374FFF090E665E4F090E66874C9 -:0A0D7D000BF05391AFD2E8D2EA2246 -:010D87002249 -:020D8800AA823D -:060D8A00120D87DAFB22C6 -:030D900090FB5085 -:080D9300A3E582458370F922FB -:040D9B00AA82AB83FA -:080D9F00120D901ABAFF011BAE -:050DA700EA4B70F4228C -:030DBA007581211F -:0A0DBD001205DAE5826003020DB5AD +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E2400020E2A91 +:030E3D00020E277B +:030E27000203F4CF +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120630D000D001D004D00580D88A068B078E12 +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C00412066D1201AA92 +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120602D004D00580108F82C005C0041206221201AAD0ED +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF07582012230040312095F1201BF80F5C2AF90E609E4F012018012069C +:12040000BC120459120D301208C6D2AF1207B60203E952 +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E186E0F582120412D00790E186E09A +:2004F2002FFFF582C00712041290E1A4E0F582120412D00790E1A4E02FF58212041290E1B7 +:20051200BCE0F5821204127F0090E186E0FEC3EF64808EF063F08095F05017EF2486F58257 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1A4E0FEC3EF64808EF063CC +:20055200F08095F05017EF24A4F582E434E1F583E0F582C007120412D0070F80D77F0090FC +:20057200E1BCE0FEC3EF64808EF063F08095F05017EF24BCF582E434E1F583E0F582C00746 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF400100090220005C +:20E1200001010080FA0904000002FFFFFF020705810200020007050202000200120100029D +:20E1400000000040C016EF030400010203010A060002FFFFFF4001000902200001010080AF +:20E16000FA0904000002FFFFFF0207058102400000070502024000000482E186E1A4E1BC69 +:01E18000E1BD +:20E18200040309041E037700770077002E0072006500740072006F00310031002E00640095 +:20E1A200650018036E00650078007900730033005F006A00740061006700120330003000F9 +:0CE1C20030003000300030003000300031 +:2005F800222222229001F4020E0DAF82AEB574FE5E441CF5B5EF13920392B4EFA2E1920367 +:2006180092B3EFA2E4920392B222120602A2B0E433FF74024FF58222E5821392B2D2B413D6 +:20063800C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B29C +:20065800D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B01392B2D2B4C2B490 +:20067800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2CA +:20069800D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B400C2B457 +:0406B800F582222283 +:2006BC0090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6B0 +:2006DC000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000FE +:2006FC000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A273 +:20071C00F000000090E6137402F000000090E6147402F000000090E6157402F0000000906D +:20073C00E6047404F000000090E6047406F000000090E6047408F000000090E604E4F00033 +:20075C00000090E619E4F000000090E61AE4F000000090E61BE4F000000090E60BE4F000FC +:18077C00000000000090E6917480F000000090E6917480F0000000226D +:2007940090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E04420C6 +:2007B400F02290E680E0440AF09000FA120E0D90E65D74FFF090E65F74FFF0AF9174EF5FD8 +:0A07D400F59190E680E054F7F02262 +:060E3700E478FFF6D8FD8F +:060E1E00751200751300BF +:2007DE0090E680E0FF30E7197514007515E17516127517E175181C7519E1751A58751BE188 +:2007FE002275143C7515E175164E7517E17518587519E1751A1C751BE122C0E0C007C0D0BA +:20081E0075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C083F2 +:20083E00C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012F9 +:20085E0007DED0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C061 +:20087E0021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF9133 +:20089E0074EF5FF59175A1001207DED0D0D000D001D002D003D004D005D006D007D083D086 +:2008BE0082D0F0D0E0D021321207DE751C18751D08758200120C89751C34751D08758210C7 +:2008DE00120C89751C7D751D08758214120C8990E65C7431F022AF828F06747F5EFF24F73F +:2008FE00500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A1DF +:20091E00E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700CBA +:20093E0090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F58354 +:20095E0022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF6002802F +:20097E0003020C1E120794020C1E120375E5826003020C1E120794020C1E90E6B8E0FF5398 +:20099E000780BF80028003020B2290E6B9E0FFBF0003020A99BF06028035BF08028008BFBE +:2009BE000A028017020B1C90E740E512F090E68AE4F090E68B7401F0020C1E90E740E5139A +:2009DE00F090E68AE4F090E68B7401F0020C1E90E6BBE0FFBF01028017BF02028038BF03FD +:2009FE00028059BF0602801BBF0702803C020A93AE14AF1590E6B3EFF07F0090E6B4EEF064 +:200A1E00020C1EAE16AF1790E6B3EFF07F0090E6B4EEF0020C1EAE18AF1990E6B3EFF07F32 +:200A3E000090E6B4EEF0020C1EAE1AAF1B90E6B3EFF07F0090E6B4EEF0020C1E90E6BAE007 +:200A5E00FF90E178E0FEC3EF9E4006120794020C1E90E6BAE075F002A42479F58274E1358A +:200A7E00F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C1E120794020C1E90E6B8E0FFDD +:200A9E0053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A7E +:200ABE00F090E68B7402F0020C1E90E740E4F090E741F090E68AF090E68B7402F0020C1EDF +:200ADE0090E6BCE0F5821208F4E582602590E6BCE0F582120916E0FF53070190E740EFF0EB +:200AFE0090E741E4F090E68AF090E68B7402F0020C1E120794020C1E120794020C1E1207FE +:200B1E0094020C1E90E6B9E0FF24F45003020C1BEF240A83F582EF241083F583E4731B6648 +:200B3E00E3C41B1B1B1B1B541B5D0C0B0B0B0C0C0C0C0C0B0C0B90E6BAE0F512020C1E903F +:200B5E00E6BAE0F513020C1E90E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0C1 +:200B7E00120794020C1E90E6BAE0703090E6BCE0F5821208F4E582602390E6BCE0F58212B2 +:200B9E000916AE82AF83E0FD5305FE8E828F83EDF090E6BCE0F58212079C80641207948035 +:200BBE005F120794805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040C4 +:200BDE00120794803B90E6BAE0FF702C90E6BCE0F5821208F4E582601A90E6BCE0F58212D1 +:200BFE000916AE82AF83E0FD4305018E828F83EDF0800D1207948008120794800312079492 +:080C1E0090E6A0E04480F02202 +:200C2600AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9259 +:200C460005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED34B3 +:200C660000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A20551 +:200C860092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F5B0 +:200CA600837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43E2F +:200CC600FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B5001D4 +:200CE60022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC8A +:200D0600E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F537 +:200D260083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C26751C80751D00DB +:200D4600758253120C2600000090E650E4F000000090E652E4F000000090E654E4F000002B +:200D66000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FF39 +:200D8600F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65BE4 +:200DA60074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E454 +:200DC600F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0FF +:130DE600AF9174EF5FF591AF9174BF5FF591D2E8D2EA2282 +:200DF90022AF82120DF9DFFB2290FB50A3E582458370F922AE82AF83120E021EBEFF011FBC +:050E1900EE4F70F42211 +:0D0E2A007581211205D6E5826003020E27B6 :00000001FF diff --git a/tools/fx2/bin/nexys3_jtag_2fifo_as.ihx b/tools/fx2/bin/nexys3_jtag_2fifo_as.ihx index 6afa7054..c3340c8d 100644 --- a/tools/fx2/bin/nexys3_jtag_2fifo_as.ihx +++ b/tools/fx2/bin/nexys3_jtag_2fifo_as.ihx @@ -1,4 +1,4 @@ -:06000000020DEB02006B93 +:06000000020E6F02006B0E :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,432 +12,133 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DF100020DF9F7 -:030E0C00020DF4E0 -:050DF4001203F180FE76 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120632D001D000D005D0F9 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C00512066F1201AAD005D00467 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C005120606BE -:06034C00D005D004801072 -:0E0352008A82C004C0051206241201AAD0053A -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312094E73 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206BE12BF -:0603FF000455120D1E1250 -:0804050008B8D2AF1207C702CC -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E196E0F58212040FD0029026 -:0D04F100E196E02AFAF582C00212040F9095 -:0B04FE00E1B4E0F58212040FD0029080 -:0A050900E1B4E02AF58212040F901D -:0A051300E1DEE0F58212040F7A0029 -:0E051D0090E196E0FBC3EA64808BF063F0800F -:0B052B0095F05017EA2496F582E434A6 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1B4E0FBC3EA64808BF063F080C6 -:0B05560095F05017EA24B4F582E4345D -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1DEE0FBC3EA64808BF063F08071 -:0B05810095F05017EA24DEF582E43408 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022E00010100C1 -:0EE1230080FA0904000004FFFFFF02070581D7 -:0EE131000200020007050202000200070504BA -:0BE13F0002000200070586020002003B -:0EE14A001201000200000040C016EF030400A6 -:04E1580001020301BC -:0AE15C000A060002FFFFFF40010069 -:0EE166000902200001010080FA0904000002F5 -:0EE17400FFFFFF0207058102400000070502C1 -:04E182000240000057 -:01E186000494 -:02E1870090E125 -:02E1890096E11D -:02E18B00B4E1FD -:02E18D00DEE1D1 -:06E1900006030000090473 -:0EE196001E037700770077002E0072006500F0 -:0EE1A400740072006F00310031002E00640024 -:02E1B200650006 -:0EE1B4002A036E0065007800790073003300C6 -:0EE1C2005F006A007400610067005F003200B9 -:0EE1D0006600690066006F005F00610073006A -:0EE1DE001203300030003000300030003000FE -:04E1EC0030003000CF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:060600009001F4020DDA86 -:0E060600AA82ABB574FE5BF5F0741C45F0F5EE -:0E061400B5EA1392B4EAA2E192B3EAA2E4922C -:02062200B22202 -:0E062400120606A2B0E433FA74024AF58222EE -:0E063200E5821392B2D2B413C2B492B2D2B423 -:0E06400013C2B492B2D2B413C2B492B2D2B406 -:0E064E0013C2B492B2D2B413C2B492B2D2B4F8 -:0E065C0013C2B492B2D2B413C2B492B2D2B4EA -:05066A0000C2B42222D1 -:0E066F00E582A2B01392B2D2B4C2B4A2B0130C -:0E067D0092B2D2B4C2B4A2B01392B2D2B4C23E -:0E068B00B4A2B01392B2D2B4C2B4A2B0139211 -:0E069900B2D2B4C2B4A2B01392B2D2B4C2B400 -:0E06A700A2B01392B2D2B4C2B4A2B01392B2F7 -:0906B500D2B400C2B4F582222285 -:0D06BE0090E6007412F090E60174ABF0902D -:0E06CB00E6707480F00090E60274E0F000909B -:0E06D900E60374F9F00090E6047480F00090DF -:0D06E700E60B7403F00090E610E4F00090C4 -:0D06F400E61174A0F00090E618E4F000900C -:0E070100E6047402F00090E61274A2F000907C -:0E070F00E61374A2F00090E61474E0F000907F -:0E071D00E6157402F00090E6047404F00090FB -:0E072B00E6047406F00090E6047408F00090F6 -:0E073900E604E4F00090E60BE4F00090E649E0 -:0E0747007484F00090E6497484F00090E61986 -:0E075500E4F00090E6197410F00090E63274A3 -:0E07630080F00090E6337404F00090E61A7403 -:0E0771000CF00090E6247402F00090E625E4FF -:0E077F00F00090E6347419F00090E63574FC3A -:0E078D00F00090E61BE4F0000090E69174800E -:0A079B00F00090E6917480F0002257 -:0807A50090E6A0E04401F022FF -:0E07AD00AA8274805AC423541FFB740F5A9002 -:0C07BB00E6834BF090E683E04420F0223F -:0E07C70090E680E0440AF09000FA120DDA90FD -:0E07D500E65D74FFF090E65F74FFF05391EF65 -:0807E30090E680E054F7F022DB -:060E0600E478FFF6D8FDC0 -:060DEB00751200751300F3 -:0A07EB0090E680E0FA30E71975147B -:0307F50000751577 -:0307F800E1751692 -:0307FB001275175D -:0307FE00E175188A -:030801001C75194A -:03080400E1751A81 -:0308070066751BF8 -:02080A00E122E9 -:04080C0075144A75A0 -:0308100015E1757A -:03081300165C75FB -:0308160017E17572 -:03081900186675E9 -:03081C0019E1756A -:03081F001A1C752B -:030822001BE122B5 -:090825005391EF75A100D20232DB -:0C082E00C021C0E0C0F0C082C083C00246 -:0E083A00C003C004C005C006C007C000C00156 -:0E084800C0D075D0005391EF75A1001207EBE0 -:0E085600D0D0D001D000D007D006D005D004FD -:0D086400D003D002D083D082D0F0D0E0D0FD -:02087100213232 -:0C087300C021C0E0C0F0C082C083C00201 -:0E087F00C003C004C005C006C007C000C00111 -:0E088D00C0D075D0005391EF75A1001207EB9B -:0E089B00D0D0D001D000D007D006D005D004B8 -:0D08A900D003D002D083D082D0F0D0E0D0B8 -:0208B6002132ED -:0508B8001207EB751CA6 -:0308BD0025751D81 -:0808C00008758200120C777527 -:0308C8001C2E756E -:0608CB001D0875821012E9 -:0408D1000C77751C0F -:0308D50073751D1B -:0C08D80008758214120C7790E65C7431F5 -:0208E400F02200 -:0D08E600E582547FFA24F750047582002249 -:0708F300BA01047582012225 -:0808FA00530201E4BA000104FD -:03090200F5822259 -:0E090500AA82BA010C90E6A1E0FB7C008B8276 -:030913008C8322B0 -:0E091600BA810C90E6A2E0FB7C008B828C8301 -:0109240022B0 -:0E09250053027FEA700C90E6A0E0FB7C008B92 -:04093300828C83220D -:0E09370090E6A3E0FB7C00EAC313FA7D00EA21 -:090945002BFBED3C8B82F58322B3 -:0C094E00C20290E6B8E0FA530260BA0062 -:03095A00028028F0 -:05095D00BA2002800D2C -:05096200BA4002800E06 -:05096700BA60028003EC -:03096C00020C0C6E -:06096F001207A5020C0CAA -:0A097500120372E5826003020C0C0D -:06097F001207A5020C0C9A -:0D09850090E6B8E0FA530280BA80028003C9 -:03099200020B0D48 -:0B09950090E6B9E0FABA0003020A86FF -:0509A000BA06028035DB -:0509A500BA0802800801 -:0509AA00BA0A028017EB -:0309AF00020B0731 -:0C09B20090E740E512F090E68AE4F09037 -:0809BE00E68B7401F0020C0C41 -:0C09C60090E740E513F090E68AE4F09022 -:0809D200E68B7401F0020C0C2D -:0A09DA0090E6BBE0FABA01028017B4 -:0509E400BA0202803898 -:0509E900BA0302805971 -:0509EE00BA0602801BA7 -:0509F300BA0702803C80 -:0309F800020A8070 -:0A09FB00AA14AB1590E6B3EBF07BF5 -:090A05000090E6B4EAF0020C0CCA -:0A0A0E00AA16AB1790E6B3EBF07BDD -:090A18000090E6B4EAF0020C0CB7 -:0A0A2100AA18AB1990E6B3EBF07BC6 -:090A2B000090E6B4EAF0020C0CA4 -:0A0A3400AA1AAB1B90E6B3EBF07BAF -:090A3E000090E6B4EAF0020C0C91 -:0E0A470090E6BAE0FA90E186E0FBC3EA9B403D -:070A5500061207A5020C0CBC -:0C0A5C0090E6BAE075F002A42487F58251 -:0B0A680074E135F0F583E0FAA3E090A4 -:0D0A7300E6B3F07B0090E6B4EAF0020C0C54 -:060A80001207A5020C0C98 -:0D0A860090E6B8E0FA53021FBA0002800AA1 -:050A9300BA0102801B06 -:050A9800BA0266802C8B -:0E0A9D0090E740E4F090E741F090E68AF09098 -:080AAB00E68B7402F0020C0C52 -:0E0AB30090E740E4F090E741F090E68AF09082 -:080AC100E68B7402F0020C0C3C -:0E0AC90090E6BCE0F5821208E6E5826025901A -:0E0AD700E6BCE0F582120905E0FA5302019038 -:0E0AE500E740EAF090E741E4F090E68AF090F6 -:080AF300E68B7402F0020C0C0A -:060AFB001207A5020C0C1D -:060B01001207A5020C0C16 -:060B07001207A5020C0C10 -:0C0B0D0090E6B9E0FA24F45003020C0951 -:070B1900EA2A2A900B207369 -:070B2000020C09020B560252 -:060B27000BD1020BB2022B -:060B2D000C09020C090294 -:060B33000C09020C09028E -:060B39000C09020B44024E -:050B3F000C09020B4D42 -:090B440090E6BAE0F512020C0C77 -:090B4D0090E6BAE0F513020C0C6D -:0D0B560090E6B8E0FA53021FBA00028005D5 -:050B6300BA0247800A00 -:0A0B680090E6BAE01207A5020C0C9B -:0D0B720090E6BAE0703090E6BCE0F582122B -:0D0B7F0008E6E582602390E6BCE0F58212F6 -:0E0B8C000905AA82AB83E0FC5304FE8A828B2B -:0E0B9A0083ECF090E6BCE0F5821207AD8064BB -:050BA8001207A5805FAB -:050BAD001207A5805AAB -:0E0BB20090E6B8E0FA53021FBA004F90E6BA80 -:070BC000E0FABA0102800512 -:050BC700BA02028040AB -:050BCC001207A5803BAB -:0E0BD10090E6BAE0FA702C90E6BCE0F58212D5 -:0D0BDF0008E6E582601A90E6BCE0F582129F -:0E0BEC000905AA82AB83E0FC4304018A828BD8 -:050BFA0083ECF0800D0A -:050BFF001207A58008AB -:050C04001207A58003AA -:030C09001207A52A -:080C0C0090E6A0E04480F02214 -:050C1400AA82BA0300F2 -:070C19004005EA249C500194 -:010C200022B1 -:090C2100740F5AFBBB03028007AB -:070C2A00740F5AFBBB0B45E0 -:0A0C3100A2AF9203C2AFEA2400F55F -:0C0C3B0082E43400F5837402F07B007446 -:0C0C4700012AFCE43BFDEC2400F582EDEA -:0A0C53003400F583E51DFCF0740287 -:0C0C5D002AFAE43BFBEA2400F582EB34A9 -:0A0C690000F583AA1C7B00EAF0A24C -:030C73000392AF3A -:010C7600225B -:080C7700E582FA2483500122FA -:060C7F00EA5403600122AB -:0A0C8500A2AF9204C2AFEA2400F50A -:0C0C8F0082E43401F5837402F07B0074F1 -:0C0C9B00012AFCE43BFDEC2400F582ED96 -:0A0CA7003401F583E51DF074022A04 -:0B0CB100FAE43BFBEA2400F582EB3480 -:080CBC0001F583AA1CEAF0A275 -:040CC4000492AF22C5 -:050CC800AA82BA8000C1 -:070CCD004005EA244B500131 -:010CD40022FD -:060CD500EA540360012255 -:0A0CDB00A2AF9205C2AFEA2480F533 -:0C0CE50082E43400F5837402F07B00749C -:0C0CF100012AFCE43BFDEC2480F582EDC0 -:0A0CFD003400F583E51DF074022AAF -:0B0D0700FAE43BFBEA2480F582EB34A9 -:080D120000F583AA1CEAF0A21F -:040D1A000592AF226D -:080D1E00C2E8C2EA751C007571 -:060D26001D01758243125D -:040D2C000C14751C12 -:030D300080751DAE -:0C0D330000758253120C140090E650E48E -:0E0D3F00F00090E652E4F00090E654E4F0007C -:0E0D4D0090E656E4F00090E65174FFF000903E -:0E0D5B00E65374FFF00090E65574FFF0009030 -:0E0D6900E65774FFF00090E658E4F090E6596B -:0E0D770074FFF090E65AE4F090E65B74FFF033 -:0E0D850090E65CE4F090E65D74FFF090E65EB0 -:0E0D9300E4F090E65F74FFF00090E660E4F09C -:0D0DA1000090E66174FFF090E662E4F090CF -:0E0DAE00E66374FFF090E665E4F090E668748A -:0A0DBC000BF05391AFD2E8D2EA2207 -:010DC600220A -:020DC700AA82FE -:060DC900120DC6DAFB2248 -:030DCF0090FB5046 -:080DD200A3E582458370F922BC -:040DDA00AA82AB83BB -:080DDE00120DCF1ABAFF011B30 -:050DE600EA4B70F4224D -:030DF900758121E0 -:0A0DFC001205DAE5826003020DF42F +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E7500020E7BEF +:030E8E00020E78D9 +:030E78000203F47E +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120630D000D001D004D00580D88A068B078E12 +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C00412066D1201AA92 +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120602D004D00580108F82C005C0041206221201AAD0ED +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209B01201BF80F5C2AF90E609E4F012018012064B +:12040000BC120459120D81120917D2AF1208070203E95D +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E194E0F582120412D00790E194E07E +:2004F2002FFFF582C00712041290E1B2E0F582120412D00790E1B2E02FF58212041290E19B +:20051200DCE0F5821204127F0090E194E0FEC3EF64808EF063F08095F05017EF2494F5821B +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1B2E0FEC3EF64808EF063BE +:20055200F08095F05017EF24B2F582E434E1F583E0F582C007120412D0070F80D77F0090EE +:20057200E1DCE0FEC3EF64808EF063F08095F05017EF24DCF582E434E1F583E0F582C00706 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF40010009022E004E +:20E1200001010080FA0904000004FFFFFF020705810200020007050202000200070504029E +:20E14000000200070586020002001201000200000040C016EF030400010203010A060002ED +:20E16000FFFFFF4001000902200001010080FA0904000002FFFFFF020705810240000007D6 +:0FE180000502024000000490E194E1B2E1DCE10D +:20E19000040309041E037700770077002E0072006500740072006F00310031002E00640087 +:20E1B00065002A036E00650078007900730033005F006A007400610067005F003200660057 +:1EE1D000690066006F005F00610073001203300030003000300030003000300030002B +:2005F800222222229001F4020E5EAF82AEB574FE5E441CF5B5EF13920392B4EFA2E1920316 +:2006180092B3EFA2E4920392B222120602A2B0E433FF74024FF58222E5821392B2D2B413D6 +:20063800C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B29C +:20065800D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B01392B2D2B4C2B490 +:20067800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2CA +:20069800D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B400C2B457 +:0406B800F582222283 +:2006BC0090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6B0 +:2006DC000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000FE +:2006FC000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A273 +:20071C00F000000090E61374A2F000000090E61474E0F000000090E6157402F000000090EF +:20073C00E6047404F000000090E6047406F000000090E6047408F000000090E604E4F00033 +:20075C00000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E467 +:20077C00F000000090E6197410F000000090E6327480F000000090E6337404F0000000903D +:20079C00E61A740CF000000090E6247402F000000090E625E4F000000090E6347419F00037 +:2007BC00000090E63574FCF000000090E61BE4F000000000000090E6917480F00000009032 +:0907DC00E6917480F00000002297 +:2007E50090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442075 +:20080500F02290E680E0440AF09000FA120E5E90E65D74FFF090E65F74FFF0AF9174EF5F35 +:0A082500F59190E680E054F7F02210 +:060E8800E478FFF6D8FD3E +:060E6F007512007513006E +:20082F0090E680E0FF30E7197514007515E17516127517E175181C7519E1751A66751BE128 +:20084F002275144A7515E175165C7517E17518667519E1751A1C751BE122C0E0C007C0D03E +:20086F0075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C083A1 +:20088F00C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012A8 +:2008AF00082FD0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C0BE +:2008CF0021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91E2 +:2008EF0074EF5FF59175A10012082FD0D0D000D001D002D003D004D005D006D007D083D0E3 +:20090F0082D0F0D0E0D0213212082F751C69751D08758200120CDA751C85751D0875821030 +:20092F00120CDA751CCE751D08758214120CDA90E65C7431F022AF828F06747F5EFF24F7FA +:20094F00500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A18D +:20096F00E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C69 +:20098F0090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F58303 +:2009AF0022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280DE +:2009CF0003020C6F1207E5020C6F120375E5826003020C6F1207E5020C6F90E6B8E0FF5361 +:2009EF000780BF80028003020B7390E6B9E0FFBF0003020AEABF06028035BF08028008BFCB +:200A0F000A028017020B6D90E740E512F090E68AE4F090E68B7401F0020C6F90E740E513A6 +:200A2F00F090E68AE4F090E68B7401F0020C6F90E6BBE0FFBF01028017BF02028038BF035A +:200A4F00028059BF0602801BBF0702803C020AE4AE14AF1590E6B3EFF07F0090E6B4EEF0C1 +:200A6F00020C6FAE16AF1790E6B3EFF07F0090E6B4EEF0020C6FAE18AF1990E6B3EFF07F3F +:200A8F000090E6B4EEF0020C6FAE1AAF1B90E6B3EFF07F0090E6B4EEF0020C6F90E6BAE014 +:200AAF00FF90E186E0FEC3EF9E40061207E5020C6F90E6BAE075F002A42487F58274E1357B +:200ACF00F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C6F1207E5020C6F90E6B8E0FF99 +:200AEF0053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A2D +:200B0F00F090E68B7402F0020C6F90E740E4F090E741F090E68AF090E68B7402F0020C6FEB +:200B2F0090E6BCE0F582120945E582602590E6BCE0F582120967E0FF53070190E740EFF0F6 +:200B4F0090E741E4F090E68AF090E68B7402F0020C6F1207E5020C6F1207E5020C6F120717 +:200B6F00E5020C6F90E6B9E0FF24F45003020C6CEF240A83F582EF241083F583E4736CB762 +:200B8F0034156C6C6C6C6CA56CAE0C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C6F9071 +:200BAF00E6BAE0F513020C6F90E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE01F +:200BCF001207E5020C6F90E6BAE0703090E6BCE0F582120945E582602390E6BCE0F582126D +:200BEF000967AE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821207ED80641207E580F1 +:200C0F005F1207E5805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF0202804021 +:200C2F001207E5803B90E6BAE0FF702C90E6BCE0F582120945E582601A90E6BCE0F58212DC +:200C4F000967AE82AF83E0FD4305018E828F83EDF0800D1207E580081207E580031207E5FC +:080C6F0090E6A0E04480F022B1 +:200C7700AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9208 +:200C970005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED3462 +:200CB70000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A20500 +:200CD70092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F55F +:200CF700837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EDE +:200D1700FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B500182 +:200D370022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC38 +:200D5700E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5E6 +:200D770083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C77751C80751D0039 +:200D9700758253120C7700000090E650E4F000000090E652E4F000000090E654E4F0000089 +:200DB7000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFE8 +:200DD700F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B93 +:200DF70074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E403 +:200E1700F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0AD +:130E3700AF9174EF5FF591AF9174BF5FF591D2E8D2EA2230 +:200E4A0022AF82120E4ADFFB2290FB50A3E582458370F922AE82AF83120E531EBEFF011FC7 +:050E6A00EE4F70F422C0 +:0D0E7B007581211205D6E5826003020E7814 :00000001FF diff --git a/tools/fx2/bin/nexys3_jtag_2fifo_ic.ihx b/tools/fx2/bin/nexys3_jtag_2fifo_ic.ihx index ee2135f9..ac33f421 100644 --- a/tools/fx2/bin/nexys3_jtag_2fifo_ic.ihx +++ b/tools/fx2/bin/nexys3_jtag_2fifo_ic.ihx @@ -1,4 +1,4 @@ -:06000000020DEB02006B93 +:06000000020E6F02006B0E :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,432 +12,133 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030DF100020DF9F7 -:030E0C00020DF4E0 -:050DF4001203F180FE76 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120632D001D000D005D0F9 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C00512066F1201AAD005D00467 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C005120606BE -:06034C00D005D004801072 -:0E0352008A82C004C0051206241201AAD0053A -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312094E73 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206BE12BF -:0603FF000455120D1E1250 -:0804050008B8D2AF1207C702CC -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E196E0F58212040FD0029026 -:0D04F100E196E02AFAF582C00212040F9095 -:0B04FE00E1B4E0F58212040FD0029080 -:0A050900E1B4E02AF58212040F901D -:0A051300E1DEE0F58212040F7A0029 -:0E051D0090E196E0FBC3EA64808BF063F0800F -:0B052B0095F05017EA2496F582E434A6 -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1B4E0FBC3EA64808BF063F080C6 -:0B05560095F05017EA24B4F582E4345D -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1DEE0FBC3EA64808BF063F08071 -:0B05810095F05017EA24DEF582E43408 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009022E00010100C1 -:0EE1230080FA0904000004FFFFFF02070581D7 -:0EE131000200020007050202000200070504BA -:0BE13F0002000200070586020002003B -:0EE14A001201000200000040C016EF030400A6 -:04E1580001020301BC -:0AE15C000A060002FFFFFF40010069 -:0EE166000902200001010080FA0904000002F5 -:0EE17400FFFFFF0207058102400000070502C1 -:04E182000240000057 -:01E186000494 -:02E1870090E125 -:02E1890096E11D -:02E18B00B4E1FD -:02E18D00DEE1D1 -:06E1900006030000090473 -:0EE196001E037700770077002E0072006500F0 -:0EE1A400740072006F00310031002E00640024 -:02E1B200650006 -:0EE1B4002A036E0065007800790073003300C6 -:0EE1C2005F006A007400610067005F003200B9 -:0EE1D0006600690066006F005F006900630072 -:0EE1DE001203300030003000300030003000FE -:04E1EC0030003000CF -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:060600009001F4020DDA86 -:0E060600AA82ABB574FE5BF5F0741C45F0F5EE -:0E061400B5EA1392B4EAA2E192B3EAA2E4922C -:02062200B22202 -:0E062400120606A2B0E433FA74024AF58222EE -:0E063200E5821392B2D2B413C2B492B2D2B423 -:0E06400013C2B492B2D2B413C2B492B2D2B406 -:0E064E0013C2B492B2D2B413C2B492B2D2B4F8 -:0E065C0013C2B492B2D2B413C2B492B2D2B4EA -:05066A0000C2B42222D1 -:0E066F00E582A2B01392B2D2B4C2B4A2B0130C -:0E067D0092B2D2B4C2B4A2B01392B2D2B4C23E -:0E068B00B4A2B01392B2D2B4C2B4A2B0139211 -:0E069900B2D2B4C2B4A2B01392B2D2B4C2B400 -:0E06A700A2B01392B2D2B4C2B4A2B01392B2F7 -:0906B500D2B400C2B4F582222285 -:0D06BE0090E6007412F090E60174A3F09035 -:0E06CB00E6707480F00090E60274E0F000909B -:0E06D900E60374F9F00090E6047480F00090DF -:0D06E700E60B7403F00090E610E4F00090C4 -:0D06F400E61174A0F00090E618E4F000900C -:0E070100E6047402F00090E61274A2F000907C -:0E070F00E61374A2F00090E61474E0F000907F -:0E071D00E6157402F00090E6047404F00090FB -:0E072B00E6047406F00090E6047408F00090F6 -:0E073900E604E4F00090E60BE4F00090E649E0 -:0E0747007484F00090E6497484F00090E61986 -:0E075500E4F00090E6197410F00090E63274A3 -:0E07630080F00090E6337404F00090E61A7403 -:0E0771000CF00090E6247402F00090E625E4FF -:0E077F00F00090E6347419F00090E63574FC3A -:0E078D00F00090E61BE4F0000090E69174800E -:0A079B00F00090E6917480F0002257 -:0807A50090E6A0E04401F022FF -:0E07AD00AA8274805AC423541FFB740F5A9002 -:0C07BB00E6834BF090E683E04420F0223F -:0E07C70090E680E0440AF09000FA120DDA90FD -:0E07D500E65D74FFF090E65F74FFF05391EF65 -:0807E30090E680E054F7F022DB -:060E0600E478FFF6D8FDC0 -:060DEB00751200751300F3 -:0A07EB0090E680E0FA30E71975147B -:0307F50000751577 -:0307F800E1751692 -:0307FB001275175D -:0307FE00E175188A -:030801001C75194A -:03080400E1751A81 -:0308070066751BF8 -:02080A00E122E9 -:04080C0075144A75A0 -:0308100015E1757A -:03081300165C75FB -:0308160017E17572 -:03081900186675E9 -:03081C0019E1756A -:03081F001A1C752B -:030822001BE122B5 -:090825005391EF75A100D20232DB -:0C082E00C021C0E0C0F0C082C083C00246 -:0E083A00C003C004C005C006C007C000C00156 -:0E084800C0D075D0005391EF75A1001207EBE0 -:0E085600D0D0D001D000D007D006D005D004FD -:0D086400D003D002D083D082D0F0D0E0D0FD -:02087100213232 -:0C087300C021C0E0C0F0C082C083C00201 -:0E087F00C003C004C005C006C007C000C00111 -:0E088D00C0D075D0005391EF75A1001207EB9B -:0E089B00D0D0D001D000D007D006D005D004B8 -:0D08A900D003D002D083D082D0F0D0E0D0B8 -:0208B6002132ED -:0508B8001207EB751CA6 -:0308BD0025751D81 -:0808C00008758200120C777527 -:0308C8001C2E756E -:0608CB001D0875821012E9 -:0408D1000C77751C0F -:0308D50073751D1B -:0C08D80008758214120C7790E65C7431F5 -:0208E400F02200 -:0D08E600E582547FFA24F750047582002249 -:0708F300BA01047582012225 -:0808FA00530201E4BA000104FD -:03090200F5822259 -:0E090500AA82BA010C90E6A1E0FB7C008B8276 -:030913008C8322B0 -:0E091600BA810C90E6A2E0FB7C008B828C8301 -:0109240022B0 -:0E09250053027FEA700C90E6A0E0FB7C008B92 -:04093300828C83220D -:0E09370090E6A3E0FB7C00EAC313FA7D00EA21 -:090945002BFBED3C8B82F58322B3 -:0C094E00C20290E6B8E0FA530260BA0062 -:03095A00028028F0 -:05095D00BA2002800D2C -:05096200BA4002800E06 -:05096700BA60028003EC -:03096C00020C0C6E -:06096F001207A5020C0CAA -:0A097500120372E5826003020C0C0D -:06097F001207A5020C0C9A -:0D09850090E6B8E0FA530280BA80028003C9 -:03099200020B0D48 -:0B09950090E6B9E0FABA0003020A86FF -:0509A000BA06028035DB -:0509A500BA0802800801 -:0509AA00BA0A028017EB -:0309AF00020B0731 -:0C09B20090E740E512F090E68AE4F09037 -:0809BE00E68B7401F0020C0C41 -:0C09C60090E740E513F090E68AE4F09022 -:0809D200E68B7401F0020C0C2D -:0A09DA0090E6BBE0FABA01028017B4 -:0509E400BA0202803898 -:0509E900BA0302805971 -:0509EE00BA0602801BA7 -:0509F300BA0702803C80 -:0309F800020A8070 -:0A09FB00AA14AB1590E6B3EBF07BF5 -:090A05000090E6B4EAF0020C0CCA -:0A0A0E00AA16AB1790E6B3EBF07BDD -:090A18000090E6B4EAF0020C0CB7 -:0A0A2100AA18AB1990E6B3EBF07BC6 -:090A2B000090E6B4EAF0020C0CA4 -:0A0A3400AA1AAB1B90E6B3EBF07BAF -:090A3E000090E6B4EAF0020C0C91 -:0E0A470090E6BAE0FA90E186E0FBC3EA9B403D -:070A5500061207A5020C0CBC -:0C0A5C0090E6BAE075F002A42487F58251 -:0B0A680074E135F0F583E0FAA3E090A4 -:0D0A7300E6B3F07B0090E6B4EAF0020C0C54 -:060A80001207A5020C0C98 -:0D0A860090E6B8E0FA53021FBA0002800AA1 -:050A9300BA0102801B06 -:050A9800BA0266802C8B -:0E0A9D0090E740E4F090E741F090E68AF09098 -:080AAB00E68B7402F0020C0C52 -:0E0AB30090E740E4F090E741F090E68AF09082 -:080AC100E68B7402F0020C0C3C -:0E0AC90090E6BCE0F5821208E6E5826025901A -:0E0AD700E6BCE0F582120905E0FA5302019038 -:0E0AE500E740EAF090E741E4F090E68AF090F6 -:080AF300E68B7402F0020C0C0A -:060AFB001207A5020C0C1D -:060B01001207A5020C0C16 -:060B07001207A5020C0C10 -:0C0B0D0090E6B9E0FA24F45003020C0951 -:070B1900EA2A2A900B207369 -:070B2000020C09020B560252 -:060B27000BD1020BB2022B -:060B2D000C09020C090294 -:060B33000C09020C09028E -:060B39000C09020B44024E -:050B3F000C09020B4D42 -:090B440090E6BAE0F512020C0C77 -:090B4D0090E6BAE0F513020C0C6D -:0D0B560090E6B8E0FA53021FBA00028005D5 -:050B6300BA0247800A00 -:0A0B680090E6BAE01207A5020C0C9B -:0D0B720090E6BAE0703090E6BCE0F582122B -:0D0B7F0008E6E582602390E6BCE0F58212F6 -:0E0B8C000905AA82AB83E0FC5304FE8A828B2B -:0E0B9A0083ECF090E6BCE0F5821207AD8064BB -:050BA8001207A5805FAB -:050BAD001207A5805AAB -:0E0BB20090E6B8E0FA53021FBA004F90E6BA80 -:070BC000E0FABA0102800512 -:050BC700BA02028040AB -:050BCC001207A5803BAB -:0E0BD10090E6BAE0FA702C90E6BCE0F58212D5 -:0D0BDF0008E6E582601A90E6BCE0F582129F -:0E0BEC000905AA82AB83E0FC4304018A828BD8 -:050BFA0083ECF0800D0A -:050BFF001207A58008AB -:050C04001207A58003AA -:030C09001207A52A -:080C0C0090E6A0E04480F02214 -:050C1400AA82BA0300F2 -:070C19004005EA249C500194 -:010C200022B1 -:090C2100740F5AFBBB03028007AB -:070C2A00740F5AFBBB0B45E0 -:0A0C3100A2AF9203C2AFEA2400F55F -:0C0C3B0082E43400F5837402F07B007446 -:0C0C4700012AFCE43BFDEC2400F582EDEA -:0A0C53003400F583E51DFCF0740287 -:0C0C5D002AFAE43BFBEA2400F582EB34A9 -:0A0C690000F583AA1C7B00EAF0A24C -:030C73000392AF3A -:010C7600225B -:080C7700E582FA2483500122FA -:060C7F00EA5403600122AB -:0A0C8500A2AF9204C2AFEA2400F50A -:0C0C8F0082E43401F5837402F07B0074F1 -:0C0C9B00012AFCE43BFDEC2400F582ED96 -:0A0CA7003401F583E51DF074022A04 -:0B0CB100FAE43BFBEA2400F582EB3480 -:080CBC0001F583AA1CEAF0A275 -:040CC4000492AF22C5 -:050CC800AA82BA8000C1 -:070CCD004005EA244B500131 -:010CD40022FD -:060CD500EA540360012255 -:0A0CDB00A2AF9205C2AFEA2480F533 -:0C0CE50082E43400F5837402F07B00749C -:0C0CF100012AFCE43BFDEC2480F582EDC0 -:0A0CFD003400F583E51DF074022AAF -:0B0D0700FAE43BFBEA2480F582EB34A9 -:080D120000F583AA1CEAF0A21F -:040D1A000592AF226D -:080D1E00C2E8C2EA751C007571 -:060D26001D01758243125D -:040D2C000C14751C12 -:030D300080751DAE -:0C0D330000758253120C140090E650E48E -:0E0D3F00F00090E652E4F00090E654E4F0007C -:0E0D4D0090E656E4F00090E65174FFF000903E -:0E0D5B00E65374FFF00090E65574FFF0009030 -:0E0D6900E65774FFF00090E658E4F090E6596B -:0E0D770074FFF090E65AE4F090E65B74FFF033 -:0E0D850090E65CE4F090E65D74FFF090E65EB0 -:0E0D9300E4F090E65F74FFF00090E660E4F09C -:0D0DA1000090E66174FFF090E662E4F090CF -:0E0DAE00E66374FFF090E665E4F090E668748A -:0A0DBC000BF05391AFD2E8D2EA2207 -:010DC600220A -:020DC700AA82FE -:060DC900120DC6DAFB2248 -:030DCF0090FB5046 -:080DD200A3E582458370F922BC -:040DDA00AA82AB83BB -:080DDE00120DCF1ABAFF011B30 -:050DE600EA4B70F4224D -:030DF900758121E0 -:0A0DFC001205DAE5826003020DF42F +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E7500020E7BEF +:030E8E00020E78D9 +:030E78000203F47E +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120630D000D001D004D00580D88A068B078E12 +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C00412066D1201AA92 +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120602D004D00580108F82C005C0041206221201AAD0ED +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209B01201BF80F5C2AF90E609E4F012018012064B +:12040000BC120459120D81120917D2AF1208070203E95D +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E194E0F582120412D00790E194E07E +:2004F2002FFFF582C00712041290E1B2E0F582120412D00790E1B2E02FF58212041290E19B +:20051200DCE0F5821204127F0090E194E0FEC3EF64808EF063F08095F05017EF2494F5821B +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1B2E0FEC3EF64808EF063BE +:20055200F08095F05017EF24B2F582E434E1F583E0F582C007120412D0070F80D77F0090EE +:20057200E1DCE0FEC3EF64808EF063F08095F05017EF24DCF582E434E1F583E0F582C00706 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF40010009022E004E +:20E1200001010080FA0904000004FFFFFF020705810200020007050202000200070504029E +:20E14000000200070586020002001201000200000040C016EF030400010203010A060002ED +:20E16000FFFFFF4001000902200001010080FA0904000002FFFFFF020705810240000007D6 +:0FE180000502024000000490E194E1B2E1DCE10D +:20E19000040309041E037700770077002E0072006500740072006F00310031002E00640087 +:20E1B00065002A036E00650078007900730033005F006A007400610067005F003200660057 +:1EE1D000690066006F005F006900630012033000300030003000300030003000300033 +:2005F800222222229001F4020E5EAF82AEB574FE5E441CF5B5EF13920392B4EFA2E1920316 +:2006180092B3EFA2E4920392B222120602A2B0E433FF74024FF58222E5821392B2D2B413D6 +:20063800C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B29C +:20065800D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B01392B2D2B4C2B490 +:20067800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2CA +:20069800D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B400C2B457 +:0406B800F582222283 +:2006BC0090E6007412F090E60174A3F090E6707480F000000090E60274E0F000000090E6B8 +:2006DC000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000FE +:2006FC000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A273 +:20071C00F000000090E61374A2F000000090E61474E0F000000090E6157402F000000090EF +:20073C00E6047404F000000090E6047406F000000090E6047408F000000090E604E4F00033 +:20075C00000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E467 +:20077C00F000000090E6197410F000000090E6327480F000000090E6337404F0000000903D +:20079C00E61A740CF000000090E6247402F000000090E625E4F000000090E6347419F00037 +:2007BC00000090E63574FCF000000090E61BE4F000000000000090E6917480F00000009032 +:0907DC00E6917480F00000002297 +:2007E50090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442075 +:20080500F02290E680E0440AF09000FA120E5E90E65D74FFF090E65F74FFF0AF9174EF5F35 +:0A082500F59190E680E054F7F02210 +:060E8800E478FFF6D8FD3E +:060E6F007512007513006E +:20082F0090E680E0FF30E7197514007515E17516127517E175181C7519E1751A66751BE128 +:20084F002275144A7515E175165C7517E17518667519E1751A1C751BE122C0E0C007C0D03E +:20086F0075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C083A1 +:20088F00C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A10012A8 +:2008AF00082FD0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C0BE +:2008CF0021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91E2 +:2008EF0074EF5FF59175A10012082FD0D0D000D001D002D003D004D005D006D007D083D0E3 +:20090F0082D0F0D0E0D0213212082F751C69751D08758200120CDA751C85751D0875821030 +:20092F00120CDA751CCE751D08758214120CDA90E65C7431F022AF828F06747F5EFF24F7FA +:20094F00500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A18D +:20096F00E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C69 +:20098F0090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F58303 +:2009AF0022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280DE +:2009CF0003020C6F1207E5020C6F120375E5826003020C6F1207E5020C6F90E6B8E0FF5361 +:2009EF000780BF80028003020B7390E6B9E0FFBF0003020AEABF06028035BF08028008BFCB +:200A0F000A028017020B6D90E740E512F090E68AE4F090E68B7401F0020C6F90E740E513A6 +:200A2F00F090E68AE4F090E68B7401F0020C6F90E6BBE0FFBF01028017BF02028038BF035A +:200A4F00028059BF0602801BBF0702803C020AE4AE14AF1590E6B3EFF07F0090E6B4EEF0C1 +:200A6F00020C6FAE16AF1790E6B3EFF07F0090E6B4EEF0020C6FAE18AF1990E6B3EFF07F3F +:200A8F000090E6B4EEF0020C6FAE1AAF1B90E6B3EFF07F0090E6B4EEF0020C6F90E6BAE014 +:200AAF00FF90E186E0FEC3EF9E40061207E5020C6F90E6BAE075F002A42487F58274E1357B +:200ACF00F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C6F1207E5020C6F90E6B8E0FF99 +:200AEF0053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A2D +:200B0F00F090E68B7402F0020C6F90E740E4F090E741F090E68AF090E68B7402F0020C6FEB +:200B2F0090E6BCE0F582120945E582602590E6BCE0F582120967E0FF53070190E740EFF0F6 +:200B4F0090E741E4F090E68AF090E68B7402F0020C6F1207E5020C6F1207E5020C6F120717 +:200B6F00E5020C6F90E6B9E0FF24F45003020C6CEF240A83F582EF241083F583E4736CB762 +:200B8F0034156C6C6C6C6CA56CAE0C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C6F9071 +:200BAF00E6BAE0F513020C6F90E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE01F +:200BCF001207E5020C6F90E6BAE0703090E6BCE0F582120945E582602390E6BCE0F582126D +:200BEF000967AE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821207ED80641207E580F1 +:200C0F005F1207E5805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF0202804021 +:200C2F001207E5803B90E6BAE0FF702C90E6BCE0F582120945E582601A90E6BCE0F58212DC +:200C4F000967AE82AF83E0FD4305018E828F83EDF0800D1207E580081207E580031207E5FC +:080C6F0090E6A0E04480F022B1 +:200C7700AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF9208 +:200C970005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED3462 +:200CB70000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A20500 +:200CD70092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F55F +:200CF700837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EDE +:200D1700FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B500182 +:200D370022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC38 +:200D5700E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5E6 +:200D770083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C77751C80751D0039 +:200D9700758253120C7700000090E650E4F000000090E652E4F000000090E654E4F0000089 +:200DB7000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFE8 +:200DD700F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B93 +:200DF70074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E403 +:200E1700F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF0AD +:130E3700AF9174EF5FF591AF9174BF5FF591D2E8D2EA2230 +:200E4A0022AF82120E4ADFFB2290FB50A3E582458370F922AE82AF83120E531EBEFF011FC7 +:050E6A00EE4F70F422C0 +:0D0E7B007581211205D6E5826003020E7814 :00000001FF diff --git a/tools/fx2/bin/nexys3_jtag_3fifo_as.ihx b/tools/fx2/bin/nexys3_jtag_3fifo_as.ihx index d0ee3cb7..b7f4c9b2 100644 --- a/tools/fx2/bin/nexys3_jtag_3fifo_as.ihx +++ b/tools/fx2/bin/nexys3_jtag_3fifo_as.ihx @@ -1,4 +1,4 @@ -:06000000020E0702006B76 +:06000000020E9302006BEA :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,435 +12,135 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030E0D00020E15BD -:030E2800020E10A7 -:050E10001203F180FE59 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120632D001D000D005D0F9 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C00512066F1201AAD005D00467 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C005120606BE -:06034C00D005D004801072 -:0E0352008A82C004C0051206241201AAD0053A -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312096A57 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206BE12BF -:0603FF000455120D3A1234 -:0804050008D4D2AF1207E30294 -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E19EE0F58212040FD002901E -:0D04F100E19EE02AFAF582C00212040F908D -:0B04FE00E1BCE0F58212040FD0029078 -:0A050900E1BCE02AF58212040F9015 -:0A051300E1E6E0F58212040F7A0021 -:0E051D0090E19EE0FBC3EA64808BF063F08007 -:0B052B0095F05017EA249EF582E4349E -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1BCE0FBC3EA64808BF063F080BE -:0B05560095F05017EA24BCF582E43455 -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1E6E0FBC3EA64808BF063F08069 -:0B05810095F05017EA24E6F582E43400 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009023500010100BA -:0EE1230080FA0904000005FFFFFF02070581D6 -:0EE131000200020007050202000200070504BA -:0EE13F000200020007058602000200070588A4 -:04E14D0002000200CA -:0EE152001201000200000040C016EF0304009E -:04E1600001020301B4 -:0AE164000A060002FFFFFF40010061 -:0EE16E000902200001010080FA0904000002ED -:0EE17C00FFFFFF0207058102400000070502B9 -:04E18A00024000004F -:01E18E00048C -:02E18F0098E115 -:02E191009EE10D -:02E19300BCE1ED -:02E19500E6E1C1 -:06E198000603000009046B -:0EE19E001E037700770077002E0072006500E8 -:0EE1AC00740072006F00310031002E0064001C -:02E1BA006500FE -:0EE1BC002A036E0065007800790073003300BE -:0EE1CA005F006A007400610067005F003300B0 -:0EE1D8006600690066006F005F006100730062 -:0EE1E6001203300030003000300030003000F6 -:04E1F40030003000C7 -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:060600009001F4020DF66A -:0E060600AA82ABB574FE5BF5F0741C45F0F5EE -:0E061400B5EA1392B4EAA2E192B3EAA2E4922C -:02062200B22202 -:0E062400120606A2B0E433FA74024AF58222EE -:0E063200E5821392B2D2B413C2B492B2D2B423 -:0E06400013C2B492B2D2B413C2B492B2D2B406 -:0E064E0013C2B492B2D2B413C2B492B2D2B4F8 -:0E065C0013C2B492B2D2B413C2B492B2D2B4EA -:05066A0000C2B42222D1 -:0E066F00E582A2B01392B2D2B4C2B4A2B0130C -:0E067D0092B2D2B4C2B4A2B01392B2D2B4C23E -:0E068B00B4A2B01392B2D2B4C2B4A2B0139211 -:0E069900B2D2B4C2B4A2B01392B2D2B4C2B400 -:0E06A700A2B01392B2D2B4C2B4A2B01392B2F7 -:0906B500D2B400C2B4F582222285 -:0D06BE0090E6007412F090E60174ABF0902D -:0E06CB00E6707480F00090E60274E0F000909B -:0E06D900E60374F9F00090E6047480F00090DF -:0D06E700E60B7403F00090E610E4F00090C4 -:0D06F400E61174A0F00090E618E4F000900C -:0E070100E6047402F00090E61274A2F000907C -:0E070F00E61374A2F00090E61474E2F000907D -:0E071D00E61574E2F00090E6047404F000901B -:0E072B00E6047406F00090E6047408F00090F6 -:0E073900E604E4F00090E60BE4F00090E649E0 -:0E0747007484F00090E6497484F00090E61986 -:0E075500E4F00090E6197410F00090E63274A3 -:0E07630080F00090E6337404F00090E61A7403 -:0E0771000CF00090E6247402F00090E625E4FF -:0E077F00F00090E6347409F00090E63574FC4A -:0E078D00F00090E61B740CF00090E62674025B -:0E079B00F00090E627E4F00090E6367441F09E -:0E07A9000090E63774FCF0000090E69174803A -:0A07B700F00090E6917480F000223B -:0807C10090E6A0E04401F022E3 -:0E07C900AA8274805AC423541FFB740F5A90E6 -:0C07D700E6834BF090E683E04420F02223 -:0E07E30090E680E0440AF09000FA120DF690C5 -:0E07F100E65D74FFF090E65F74FFF05391EF49 -:0807FF0090E680E054F7F022BF -:060E2200E478FFF6D8FDA4 -:060E0700751200751300D6 -:0A08070090E680E0FA30E71975145E -:030811000075155A -:03081400E1751675 -:0308170012751740 -:03081A00E175186D -:03081D001C75192E -:03082000E1751A65 -:030823006E751BD4 -:02082600E122CD -:04082800751452757C -:03082C0015E1755E -:03082F00166475D7 -:0308320017E17556 -:03083500186E75C5 -:0308380019E1754E -:03083B001A1C750F -:03083E001BE12299 -:090841005391EF75A100D20232BF -:0C084A00C021C0E0C0F0C082C083C0022A -:0E085600C003C004C005C006C007C000C0013A -:0E086400C0D075D0005391EF75A100120807A7 -:0E087200D0D0D001D000D007D006D005D004E1 -:0D088000D003D002D083D082D0F0D0E0D0E1 -:02088D00213216 -:0C088F00C021C0E0C0F0C082C083C002E5 -:0E089B00C003C004C005C006C007C000C001F5 -:0E08A900C0D075D0005391EF75A10012080762 -:0E08B700D0D0D001D000D007D006D005D0049C -:0D08C500D003D002D083D082D0F0D0E0D09C -:0208D2002132D1 -:0508D400120807751C6D -:0308D90041751D49 -:0808DC0008758200120C9375EF -:0308E4001C4A7536 -:0608E7001D0875821012CD -:0408ED000C93751CD7 -:0308F1008F751DE3 -:0C08F40008758214120C9390E65C7431BD -:02090000F022E3 -:0D090200E582547FFA24F75004758200222C -:07090F00BA01047582012208 -:08091600530201E4BA000104E0 -:03091E00F582223D -:0E092100AA82BA010C90E6A1E0FB7C008B825A -:03092F008C832294 -:0E093200BA810C90E6A2E0FB7C008B828C83E5 -:010940002294 -:0E09410053027FEA700C90E6A0E0FB7C008B76 -:04094F00828C8322F1 -:0E09530090E6A3E0FB7C00EAC313FA7D00EA05 -:090961002BFBED3C8B82F5832297 -:0C096A00C20290E6B8E0FA530260BA0046 -:03097600028028D4 -:05097900BA2002800D10 -:05097E00BA4002800EEA -:05098300BA60028003D0 -:03098800020C2836 -:06098B001207C1020C2856 -:0A099100120372E5826003020C28D5 -:06099B001207C1020C2846 -:0D09A10090E6B8E0FA530280BA80028003AD -:0309AE00020B2910 -:0B09B10090E6B9E0FABA0003020AA2C7 -:0509BC00BA06028035BF -:0509C100BA08028008E5 -:0509C600BA0A028017CF -:0309CB00020B23F9 -:0C09CE0090E740E512F090E68AE4F0901B -:0809DA00E68B7401F0020C2809 -:0C09E20090E740E513F090E68AE4F09006 -:0809EE00E68B7401F0020C28F5 -:0A09F60090E6BBE0FABA0102801798 -:050A0000BA020280387B -:050A0500BA0302805954 -:050A0A00BA0602801B8A -:050A0F00BA0702803C63 -:030A1400020A9C37 -:0A0A1700AA14AB1590E6B3EBF07BD8 -:090A21000090E6B4EAF0020C2892 -:0A0A2A00AA16AB1790E6B3EBF07BC1 -:090A34000090E6B4EAF0020C287F -:0A0A3D00AA18AB1990E6B3EBF07BAA -:090A47000090E6B4EAF0020C286C -:0A0A5000AA1AAB1B90E6B3EBF07B93 -:090A5A000090E6B4EAF0020C2859 -:0E0A630090E6BAE0FA90E18EE0FBC3EA9B4019 -:070A7100061207C1020C2868 -:0C0A780090E6BAE075F002A4248FF5822D -:0B0A840074E135F0F583E0FAA3E09088 -:0D0A8F00E6B3F07B0090E6B4EAF0020C281C -:060A9C001207C1020C2844 -:0D0AA20090E6B8E0FA53021FBA0002800A85 -:050AAF00BA0102801BEA -:050AB400BA0266802C6F -:0E0AB90090E740E4F090E741F090E68AF0907C -:080AC700E68B7402F0020C281A -:0E0ACF0090E740E4F090E741F090E68AF09066 -:080ADD00E68B7402F0020C2804 -:0E0AE50090E6BCE0F582120902E582602590E1 -:0E0AF300E6BCE0F582120921E0FA5302019000 -:0E0B0100E740EAF090E741E4F090E68AF090D9 -:080B0F00E68B7402F0020C28D1 -:060B17001207C1020C28C8 -:060B1D001207C1020C28C2 -:060B23001207C1020C28BC -:0C0B290090E6B9E0FA24F45003020C2519 -:070B3500EA2A2A900B3C7331 -:070B3C00020C25020B7202FE -:060B43000BED020BCE02D7 -:060B49000C25020C250240 -:060B4F000C25020C25023A -:060B55000C25020B6002FA -:050B5B000C25020B69EE -:090B600090E6BAE0F512020C283F -:090B690090E6BAE0F513020C2835 -:0D0B720090E6B8E0FA53021FBA00028005B9 -:050B7F00BA0247800AE4 -:0A0B840090E6BAE01207C1020C2847 -:0D0B8E0090E6BAE0703090E6BCE0F582120F -:0D0B9B000902E582602390E6BCE0F58212BD -:0E0BA8000921AA82AB83E0FC5304FE8A828BF3 -:0E0BB60083ECF090E6BCE0F5821207C9806483 -:050BC4001207C1805F73 -:050BC9001207C1805A73 -:0E0BCE0090E6B8E0FA53021FBA004F90E6BA64 -:070BDC00E0FABA01028005F6 -:050BE300BA020280408F -:050BE8001207C1803B73 -:0E0BED0090E6BAE0FA702C90E6BCE0F58212B9 -:0D0BFB000902E582601A90E6BCE0F5821266 -:0E0C08000921AA82AB83E0FC4304018A828B9F -:050C160083ECF0800DED -:050C1B001207C1800872 -:050C20001207C1800372 -:030C25001207C1F2 -:080C280090E6A0E04480F022F8 -:050C3000AA82BA0300D6 -:070C35004005EA249C500178 -:010C3C002295 -:090C3D00740F5AFBBB030280078F -:070C4600740F5AFBBB0B45C4 -:0A0C4D00A2AF9203C2AFEA2400F543 -:0C0C570082E43400F5837402F07B00742A -:0C0C6300012AFCE43BFDEC2400F582EDCE -:0A0C6F003400F583E51DFCF074026B -:0C0C79002AFAE43BFBEA2400F582EB348D -:0A0C850000F583AA1C7B00EAF0A230 -:030C8F000392AF1E -:010C9200223F -:080C9300E582FA2483500122DE -:060C9B00EA54036001228F -:0A0CA100A2AF9204C2AFEA2400F5EE -:0C0CAB0082E43401F5837402F07B0074D5 -:0C0CB700012AFCE43BFDEC2400F582ED7A -:0A0CC3003401F583E51DF074022AE8 -:0B0CCD00FAE43BFBEA2400F582EB3464 -:080CD80001F583AA1CEAF0A259 -:040CE0000492AF22A9 -:050CE400AA82BA8000A5 -:070CE9004005EA244B500115 -:010CF00022E1 -:060CF100EA540360012239 -:0A0CF700A2AF9205C2AFEA2480F517 -:0C0D010082E43400F5837402F07B00747F -:0C0D0D00012AFCE43BFDEC2480F582EDA3 -:0A0D19003400F583E51DF074022A92 -:0B0D2300FAE43BFBEA2480F582EB348D -:080D2E0000F583AA1CEAF0A203 -:040D36000592AF2251 -:080D3A00C2E8C2EA751C007555 -:060D42001D017582431241 -:040D48000C30751CDA -:030D4C0080751D92 -:0C0D4F0000758253120C300090E650E456 -:0E0D5B00F00090E652E4F00090E654E4F00060 -:0E0D690090E656E4F00090E65174FFF0009022 -:0E0D7700E65374FFF00090E65574FFF0009014 -:0E0D8500E65774FFF00090E658E4F090E6594F -:0E0D930074FFF090E65AE4F090E65B74FFF017 -:0E0DA10090E65CE4F090E65D74FFF090E65E94 -:0E0DAF00E4F090E65F74FFF00090E660E4F080 -:0D0DBD000090E66174FFF090E662E4F090B3 -:0E0DCA00E66374FFF090E665E4F090E668746E -:0A0DD8000BF05391AFD2E8D2EA22EB -:010DE20022EE -:020DE300AA82E2 -:060DE500120DE2DAFB2210 -:030DEB0090FB502A -:080DEE00A3E582458370F922A0 -:040DF600AA82AB839F -:080DFA00120DEB1ABAFF011BF8 -:050E0200EA4B70F42230 -:030E1500758121C3 -:0A0E18001205DAE5826003020E10F5 +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E9900020E9FA7 +:030EB200020E9C91 +:030E9C000203F45A +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120630D000D001D004D00580D88A068B078E12 +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C00412066D1201AA92 +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120602D004D00580108F82C005C0041206221201AAD0ED +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209D41201BF80F5C2AF90E609E4F0120180120627 +:12040000BC120459120DA512093BD2AF12082B0203E9F1 +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E19CE0F582120412D00790E19CE06E +:2004F2002FFFF582C00712041290E1BAE0F582120412D00790E1BAE02FF58212041290E18B +:20051200E4E0F5821204127F0090E19CE0FEC3EF64808EF063F08095F05017EF249CF58203 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1BAE0FEC3EF64808EF063B6 +:20055200F08095F05017EF24BAF582E434E1F583E0F582C007120412D0070F80D77F0090E6 +:20057200E1E4E0FEC3EF64808EF063F08095F05017EF24E4F582E434E1F583E0F582C007F6 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF4001000902350047 +:20E1200001010080FA0904000005FFFFFF020705810200020007050202000200070504029D +:11E1400000020007058602000200070588020002009E +:20E152001201000200000040C016EF030400010203010A060002FFFFFF400100090220000A +:20E1720001010080FA0904000002FFFFFF0207058102400000070502024000000498E19CCB +:05E19200E1BAE1E4E147 +:20E19800040309041E037700770077002E0072006500740072006F00310031002E0064007F +:20E1B80065002A036E00650078007900730033005F006A007400610067005F00330066004E +:1EE1D800690066006F005F006100730012033000300030003000300030003000300023 +:2005F800222222229001F4020E82AF82AEB574FE5E441CF5B5EF13920392B4EFA2E19203F2 +:2006180092B3EFA2E4920392B222120602A2B0E433FF74024FF58222E5821392B2D2B413D6 +:20063800C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B29C +:20065800D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B01392B2D2B4C2B490 +:20067800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2CA +:20069800D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B400C2B457 +:0406B800F582222283 +:2006BC0090E6007412F090E60174ABF090E6707480F000000090E60274E0F000000090E6B0 +:2006DC000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000FE +:2006FC000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A273 +:20071C00F000000090E61374A2F000000090E61474E2F000000090E61574E2F0000000900D +:20073C00E6047404F000000090E6047406F000000090E6047408F000000090E604E4F00033 +:20075C00000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E467 +:20077C00F000000090E6197410F000000090E6327480F000000090E6337404F0000000903D +:20079C00E61A740CF000000090E6247402F000000090E625E4F000000090E6347409F00047 +:2007BC00000090E63574FCF000000090E61B740CF000000090E6267402F000000090E62772 +:2007DC00E4F000000090E6367441F000000090E63774FCF000000000000090E6917480F0E0 +:0D07FC0000000090E6917480F000000022E3 +:2008090090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442050 +:20082900F02290E680E0440AF09000FA120E8290E65D74FFF090E65F74FFF0AF9174EF5FED +:0A084900F59190E680E054F7F022EC +:060EAC00E478FFF6D8FD1A +:060E93007512007513004A +:2008530090E680E0FF30E7197514007515E17516127517E175181C7519E1751A6E751BE1FC +:20087300227514527515E17516647517E175186E7519E1751A1C751BE122C0E0C007C0D002 +:2008930075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C0837D +:2008B300C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A1001284 +:2008D3000853D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C076 +:2008F30021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91BE +:2009130074EF5FF59175A100120853D0D0D000D001D002D003D004D005D006D007D083D09A +:2009330082D0F0D0E0D02132120853751C8D751D08758200120CFE751CA9751D087582107C +:20095300120CFE751CF2751D08758214120CFE90E65C7431F022AF828F06747F5EFF24F76A +:20097300500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A169 +:20099300E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C45 +:2009B30090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583DF +:2009D30022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280BA +:2009F30003020C93120809020C93120375E5826003020C93120809020C9390E6B8E0FF5363 +:200A13000780BF80028003020B9790E6B9E0FFBF0003020B0EBF06028035BF08028008BF5D +:200A33000A028017020B9190E740E512F090E68AE4F090E68B7401F0020C9390E740E5133A +:200A5300F090E68AE4F090E68B7401F0020C9390E6BBE0FFBF01028017BF02028038BF0312 +:200A7300028059BF0602801BBF0702803C020B08AE14AF1590E6B3EFF07F0090E6B4EEF078 +:200A9300020C93AE16AF1790E6B3EFF07F0090E6B4EEF0020C93AE18AF1990E6B3EFF07FD3 +:200AB3000090E6B4EEF0020C93AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C9390E6BAE0A8 +:200AD300FF90E18EE0FEC3EF9E4006120809020C9390E6BAE075F002A4248FF58274E135FE +:200AF300F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C93120809020C9390E6B8E0FF08 +:200B130053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A08 +:200B3300F090E68B7402F0020C9390E740E4F090E741F090E68AF090E68B7402F0020C937F +:200B530090E6BCE0F582120969E582602590E6BCE0F58212098BE0FF53070190E740EFF08A +:200B730090E741E4F090E68AF090E68B7402F0020C93120809020C93120809020C9312083C +:200B930009020C9390E6B9E0FF24F45003020C90EF240A83F582EF241083F583E47390DB8A +:200BB30058399090909090C990D20C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C9390C1 +:200BD300E6BAE0F513020C9390E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0D7 +:200BF300120809020C9390E6BAE0703090E6BCE0F582120969E582602390E6BCE0F58212DC +:200C1300098BAE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821208118064120809805E +:200C33005F120809805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040D8 +:200C5300120809803B90E6BAE0FF702C90E6BCE0F582120969E582601A90E6BCE0F582126F +:200C7300098BAE82AF83E0FD4305018E828F83EDF0800D1208098008120809800312080945 +:080C930090E6A0E04480F0228D +:200C9B00AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF92E4 +:200CBB0005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED343E +:200CDB0000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205DC +:200CFB0092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F53B +:200D1B00837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EB9 +:200D3B00FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B50015E +:200D5B0022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC14 +:200D7B00E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5C2 +:200D9B0083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C9B751C80751D00F1 +:200DBB00758253120C9B00000090E650E4F000000090E652E4F000000090E654E4F0000041 +:200DDB000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFC4 +:200DFB00F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B6F +:200E1B0074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4DE +:200E3B00F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF089 +:130E5B00AF9174EF5FF591AF9174BF5FF591D2E8D2EA220C +:200E6E0022AF82120E6EDFFB2290FB50A3E582458370F922AE82AF83120E771EBEFF011F5B +:050E8E00EE4F70F4229C +:0D0E9F007581211205D6E5826003020E9CCC :00000001FF diff --git a/tools/fx2/bin/nexys3_jtag_3fifo_ic.ihx b/tools/fx2/bin/nexys3_jtag_3fifo_ic.ihx index 1aa921e7..fc3d44bc 100644 --- a/tools/fx2/bin/nexys3_jtag_3fifo_ic.ihx +++ b/tools/fx2/bin/nexys3_jtag_3fifo_ic.ihx @@ -1,4 +1,4 @@ -:06000000020E0702006B76 +:06000000020E9302006BEA :03000B0002006B85 :0300130002006B7D :03001B0002006B75 @@ -12,435 +12,135 @@ :03005B0002006B35 :0300630002006B2D :01006B003262 -:0900800002006B0002006B00029B -:08008900006B0002006B000295 -:08009100006B0002006B00028D -:08009900006B0002006B000285 -:0800A100006B0002006B00027D -:0800A900006B0002006B000275 -:0700B100006B0002006B0070 -:0901000002006B0002006B00021A -:08010900006B0002006B000214 -:08011100006B0002006B00020C -:08011900006B0002006B000204 -:08012100006B0002006B0002FC -:08012900006B0002006B0002F4 -:08013100006B0002006B0002EC -:08013900006B0002006B0002E4 -:08014100006B0002006B0002DC -:08014900006B0002006B0002D4 -:08015100006B0002006B0002CC -:08015900006B0002006B0002C4 -:08016100006B0002006B0002BC -:08016900006B0002006B0002B4 -:08017100006B0002006B0002AC -:07017900006B0002006B00A7 -:030E0D00020E15BD -:030E2800020E10A7 -:050E10001203F180FE59 -:06018000C200E4F508F5E1 -:0401860009F50AD29B -:05018A0001750B00757A -:06018F000C001206001234 -:0E01950005FD75CB6375CAC0758E0075C80474 -:0701A300D2AFD2B0D2B122AD -:0B01AA00AA82850C827583E0EAF00554 -:0501B5000C0509E4B592 -:0401BA000902050A27 -:0101BE00221E -:0401BF0020000122F9 -:0E01C3001205FC90E6A2E0FA30E103020257BA -:0A01D100E509450A60687AC07BE783 -:0E01DB008B9D7AC07BE77B008A9E90E67C7449 -:0C01E90031F07460F0C3743E9509E49599 -:0A01F5000A50107A3EE50924C2F515 -:0601FF0009E50A34FFF5DA -:030205000A800765 -:06020800AA09E4F509F566 -:01020E000AE5 -:0B020F008A037C007DE08D9A850B9B2C -:0E021A008A041AEC601090E67BE090E67CF01F -:080228007C007DE08D9A80EA64 -:0C023000859B0B0090E68F74022BF0D22F -:03023C00CF801858 -:0E023F0030CF1590E7C07431F090E7C17460C5 -:0A024D00F00090E68F7402F0C2CFBB -:06025700E5AA30E00122DF -:0A025D00C3E50994C1E50A940040CE -:02026700012272 -:0E02690090E690E0FB7A0090E691E0FC7D00CC -:0A027700EA4CF50DEB4DF50E7C008E -:0E0281007DF08D9A7C007DF08C9B7C007D00D2 -:0A028F00C3EC950DED950E4003023F -:02029900036AF6 -:07029B00E5087003020326D1 -:0A02A200E50DC39CFEE50E9DFFA8CC -:0C02AC00087900C3E89EE99F5004880612 -:0202B8008907B4 -:0A02BA008E00E508C398F508EE2C4D -:0B02C400FCEF3DFD30012C8E008F018F -:0902CF008802890318B8FF011927 -:0E02D800EA4B60B390E67BE0F582C004C005FF -:0E02E600C000C001120632D001D000D005D0F9 -:0302F4000480D8AB -:0402F7008E028F03E1 -:0902FB008A068B071ABAFF011BE9 -:0E030400EE4F608790E67BE0F582C002C003FA -:0E031200C004C00512066F1201AAD005D00467 -:06032000D003D00280D5DD -:0D03260090E67BE0FA23235401FBB40100B4 -:0A0333009201EA30E707743F5AF523 -:03033D0008802213 -:0C03400030010F8A82C004C005120606BE -:06034C00D005D004801072 -:0E0352008A82C004C0051206241201AAD0053A -:02036000D004C7 -:050362000CBC00010DC0 -:0303670002028F00 -:08036A000090E6917480F0227E -:0E03720090E6B8E0FA20E70C90E6B9E07002E1 -:02038000D200A9 -:04038200758201225D -:0E03860090E6B9E0FABA902B90E6BCE025E0D4 -:0A039400547FFA2400F582E43418C7 -:0C039E00F583E0FB90E740F0EA04240047 -:0C03AA00F582E43418F583E0FA90E74196 -:0303B600F0800CC8 -:0C03B90090E7407436F090E7417483F048 -:0D03C50090E68AE4F090E6BEE0FABA02008D -:0903D200500790E6BEE0FA80023B -:0203DB007A02A4 -:0903DD0090E68BEAF07582012222 -:0603E60030020312096A57 -:0503EC001201BF80F5C5 -:0E03F100C2AF90E609E4F01201801206BE12BF -:0603FF000455120D3A1234 -:0804050008D4D2AF1207E30294 -:02040D0003E604 -:0A040F00AA82E50F54FEFBB50F02B0 -:02041900802938 -:0A041B008A048C05E46210ED621102 -:0A042500EB2400F582E43418F5839F -:0A042F00E0FB7C006210EC6211E5B6 -:060439001033C51133C5AC -:05043F001192E0F51030 -:06044400AB0F050FEB24D5 -:0A044A0000F582E43418F583EAF0AF -:010454002285 -:07045500750F007510AA7578 -:0C045C0011AA75820012040F75820012B4 -:04046800040F7A0003 -:0C046C00C3EA648094865017EA2408F567 -:0C04780082E434E1F583E0F582C002125A -:07048400040FD0020A80E121 -:02048B007A00F5 -:0C048D00C3EA648094825017EA2423F52F -:0C04990082E434E1F583E0F582C0021239 -:0704A500040FD0020A80E100 -:0E04AC0075821C12040F75820012040F7A0074 -:0C04BA00C3EA648094825017EA2402F523 -:0C04C60082E434E1F583E0F582C002120C -:0704D200040FD0020A80E1D3 -:0C04D9007486250FFAF582C00212040F91 -:0C04E50090E19EE0F58212040FD002901E -:0D04F100E19EE02AFAF582C00212040F908D -:0B04FE00E1BCE0F58212040FD0029078 -:0A050900E1BCE02AF58212040F9015 -:0A051300E1E6E0F58212040F7A0021 -:0E051D0090E19EE0FBC3EA64808BF063F08007 -:0B052B0095F05017EA249EF582E4349E -:0C053600E1F583E0F582C00212040FD052 -:04054200020A80D752 -:020546007A0039 -:0E05480090E1BCE0FBC3EA64808BF063F080BE -:0B05560095F05017EA24BCF582E43455 -:0C056100E1F583E0F582C00212040FD027 -:04056D00020A80D727 -:020571007A000E -:0E05730090E1E6E0FBC3EA64808BF063F08069 -:0B05810095F05017EA24E6F582E43400 -:0C058C00E1F583E0F582C00212040FD0FC -:04059800020A80D7FC -:02059C007A00E3 -:0C059E00C3EA648094845017EA240EF530 -:0C05AA0082E434E1F583E0F582C0021227 -:0705B600040FD0020A80E1EE -:0C05BD007482250F400875820012040FA4 -:0205C90080F2BE -:0805CB00AA1090187EEAF0AAC4 -:0705D3001190187FEAF022ED -:0805DA007880E84400600C7910 -:0C05E20001901800E4F0A3D8FCD9FAD076 -:0E05EE0083D082F6D8FDC082C08375820022C1 -:02E1000012010A -:06E10200000200000040D5 -:06E10800C016EF03040045 -:04E10E000102030106 -:0AE112000A060002FFFFFF400100B3 -:07E11C0009023500010100BA -:0EE1230080FA0904000005FFFFFF02070581D6 -:0EE131000200020007050202000200070504BA -:0EE13F000200020007058602000200070588A4 -:04E14D0002000200CA -:0EE152001201000200000040C016EF0304009E -:04E1600001020301B4 -:0AE164000A060002FFFFFF40010061 -:0EE16E000902200001010080FA0904000002ED -:0EE17C00FFFFFF0207058102400000070502B9 -:04E18A00024000004F -:01E18E00048C -:02E18F0098E115 -:02E191009EE10D -:02E19300BCE1ED -:02E19500E6E1C1 -:06E198000603000009046B -:0EE19E001E037700770077002E0072006500E8 -:0EE1AC00740072006F00310031002E0064001C -:02E1BA006500FE -:0EE1BC002A036E0065007800790073003300BE -:0EE1CA005F006A007400610067005F003300B0 -:0EE1D8006600690066006F005F00690063006A -:0EE1E6001203300030003000300030003000F6 -:04E1F40030003000C7 -:0105FC0022DC -:0105FD0022DB -:0105FE0022DA -:0105FF0022D9 -:060600009001F4020DF66A -:0E060600AA82ABB574FE5BF5F0741C45F0F5EE -:0E061400B5EA1392B4EAA2E192B3EAA2E4922C -:02062200B22202 -:0E062400120606A2B0E433FA74024AF58222EE -:0E063200E5821392B2D2B413C2B492B2D2B423 -:0E06400013C2B492B2D2B413C2B492B2D2B406 -:0E064E0013C2B492B2D2B413C2B492B2D2B4F8 -:0E065C0013C2B492B2D2B413C2B492B2D2B4EA -:05066A0000C2B42222D1 -:0E066F00E582A2B01392B2D2B4C2B4A2B0130C -:0E067D0092B2D2B4C2B4A2B01392B2D2B4C23E -:0E068B00B4A2B01392B2D2B4C2B4A2B0139211 -:0E069900B2D2B4C2B4A2B01392B2D2B4C2B400 -:0E06A700A2B01392B2D2B4C2B4A2B01392B2F7 -:0906B500D2B400C2B4F582222285 -:0D06BE0090E6007412F090E60174A3F09035 -:0E06CB00E6707480F00090E60274E0F000909B -:0E06D900E60374F9F00090E6047480F00090DF -:0D06E700E60B7403F00090E610E4F00090C4 -:0D06F400E61174A0F00090E618E4F000900C -:0E070100E6047402F00090E61274A2F000907C -:0E070F00E61374A2F00090E61474E2F000907D -:0E071D00E61574E2F00090E6047404F000901B -:0E072B00E6047406F00090E6047408F00090F6 -:0E073900E604E4F00090E60BE4F00090E649E0 -:0E0747007484F00090E6497484F00090E61986 -:0E075500E4F00090E6197410F00090E63274A3 -:0E07630080F00090E6337404F00090E61A7403 -:0E0771000CF00090E6247402F00090E625E4FF -:0E077F00F00090E6347409F00090E63574FC4A -:0E078D00F00090E61B740CF00090E62674025B -:0E079B00F00090E627E4F00090E6367441F09E -:0E07A9000090E63774FCF0000090E69174803A -:0A07B700F00090E6917480F000223B -:0807C10090E6A0E04401F022E3 -:0E07C900AA8274805AC423541FFB740F5A90E6 -:0C07D700E6834BF090E683E04420F02223 -:0E07E30090E680E0440AF09000FA120DF690C5 -:0E07F100E65D74FFF090E65F74FFF05391EF49 -:0807FF0090E680E054F7F022BF -:060E2200E478FFF6D8FDA4 -:060E0700751200751300D6 -:0A08070090E680E0FA30E71975145E -:030811000075155A -:03081400E1751675 -:0308170012751740 -:03081A00E175186D -:03081D001C75192E -:03082000E1751A65 -:030823006E751BD4 -:02082600E122CD -:04082800751452757C -:03082C0015E1755E -:03082F00166475D7 -:0308320017E17556 -:03083500186E75C5 -:0308380019E1754E -:03083B001A1C750F -:03083E001BE12299 -:090841005391EF75A100D20232BF -:0C084A00C021C0E0C0F0C082C083C0022A -:0E085600C003C004C005C006C007C000C0013A -:0E086400C0D075D0005391EF75A100120807A7 -:0E087200D0D0D001D000D007D006D005D004E1 -:0D088000D003D002D083D082D0F0D0E0D0E1 -:02088D00213216 -:0C088F00C021C0E0C0F0C082C083C002E5 -:0E089B00C003C004C005C006C007C000C001F5 -:0E08A900C0D075D0005391EF75A10012080762 -:0E08B700D0D0D001D000D007D006D005D0049C -:0D08C500D003D002D083D082D0F0D0E0D09C -:0208D2002132D1 -:0508D400120807751C6D -:0308D90041751D49 -:0808DC0008758200120C9375EF -:0308E4001C4A7536 -:0608E7001D0875821012CD -:0408ED000C93751CD7 -:0308F1008F751DE3 -:0C08F40008758214120C9390E65C7431BD -:02090000F022E3 -:0D090200E582547FFA24F75004758200222C -:07090F00BA01047582012208 -:08091600530201E4BA000104E0 -:03091E00F582223D -:0E092100AA82BA010C90E6A1E0FB7C008B825A -:03092F008C832294 -:0E093200BA810C90E6A2E0FB7C008B828C83E5 -:010940002294 -:0E09410053027FEA700C90E6A0E0FB7C008B76 -:04094F00828C8322F1 -:0E09530090E6A3E0FB7C00EAC313FA7D00EA05 -:090961002BFBED3C8B82F5832297 -:0C096A00C20290E6B8E0FA530260BA0046 -:03097600028028D4 -:05097900BA2002800D10 -:05097E00BA4002800EEA -:05098300BA60028003D0 -:03098800020C2836 -:06098B001207C1020C2856 -:0A099100120372E5826003020C28D5 -:06099B001207C1020C2846 -:0D09A10090E6B8E0FA530280BA80028003AD -:0309AE00020B2910 -:0B09B10090E6B9E0FABA0003020AA2C7 -:0509BC00BA06028035BF -:0509C100BA08028008E5 -:0509C600BA0A028017CF -:0309CB00020B23F9 -:0C09CE0090E740E512F090E68AE4F0901B -:0809DA00E68B7401F0020C2809 -:0C09E20090E740E513F090E68AE4F09006 -:0809EE00E68B7401F0020C28F5 -:0A09F60090E6BBE0FABA0102801798 -:050A0000BA020280387B -:050A0500BA0302805954 -:050A0A00BA0602801B8A -:050A0F00BA0702803C63 -:030A1400020A9C37 -:0A0A1700AA14AB1590E6B3EBF07BD8 -:090A21000090E6B4EAF0020C2892 -:0A0A2A00AA16AB1790E6B3EBF07BC1 -:090A34000090E6B4EAF0020C287F -:0A0A3D00AA18AB1990E6B3EBF07BAA -:090A47000090E6B4EAF0020C286C -:0A0A5000AA1AAB1B90E6B3EBF07B93 -:090A5A000090E6B4EAF0020C2859 -:0E0A630090E6BAE0FA90E18EE0FBC3EA9B4019 -:070A7100061207C1020C2868 -:0C0A780090E6BAE075F002A4248FF5822D -:0B0A840074E135F0F583E0FAA3E09088 -:0D0A8F00E6B3F07B0090E6B4EAF0020C281C -:060A9C001207C1020C2844 -:0D0AA20090E6B8E0FA53021FBA0002800A85 -:050AAF00BA0102801BEA -:050AB400BA0266802C6F -:0E0AB90090E740E4F090E741F090E68AF0907C -:080AC700E68B7402F0020C281A -:0E0ACF0090E740E4F090E741F090E68AF09066 -:080ADD00E68B7402F0020C2804 -:0E0AE50090E6BCE0F582120902E582602590E1 -:0E0AF300E6BCE0F582120921E0FA5302019000 -:0E0B0100E740EAF090E741E4F090E68AF090D9 -:080B0F00E68B7402F0020C28D1 -:060B17001207C1020C28C8 -:060B1D001207C1020C28C2 -:060B23001207C1020C28BC -:0C0B290090E6B9E0FA24F45003020C2519 -:070B3500EA2A2A900B3C7331 -:070B3C00020C25020B7202FE -:060B43000BED020BCE02D7 -:060B49000C25020C250240 -:060B4F000C25020C25023A -:060B55000C25020B6002FA -:050B5B000C25020B69EE -:090B600090E6BAE0F512020C283F -:090B690090E6BAE0F513020C2835 -:0D0B720090E6B8E0FA53021FBA00028005B9 -:050B7F00BA0247800AE4 -:0A0B840090E6BAE01207C1020C2847 -:0D0B8E0090E6BAE0703090E6BCE0F582120F -:0D0B9B000902E582602390E6BCE0F58212BD -:0E0BA8000921AA82AB83E0FC5304FE8A828BF3 -:0E0BB60083ECF090E6BCE0F5821207C9806483 -:050BC4001207C1805F73 -:050BC9001207C1805A73 -:0E0BCE0090E6B8E0FA53021FBA004F90E6BA64 -:070BDC00E0FABA01028005F6 -:050BE300BA020280408F -:050BE8001207C1803B73 -:0E0BED0090E6BAE0FA702C90E6BCE0F58212B9 -:0D0BFB000902E582601A90E6BCE0F5821266 -:0E0C08000921AA82AB83E0FC4304018A828B9F -:050C160083ECF0800DED -:050C1B001207C1800872 -:050C20001207C1800372 -:030C25001207C1F2 -:080C280090E6A0E04480F022F8 -:050C3000AA82BA0300D6 -:070C35004005EA249C500178 -:010C3C002295 -:090C3D00740F5AFBBB030280078F -:070C4600740F5AFBBB0B45C4 -:0A0C4D00A2AF9203C2AFEA2400F543 -:0C0C570082E43400F5837402F07B00742A -:0C0C6300012AFCE43BFDEC2400F582EDCE -:0A0C6F003400F583E51DFCF074026B -:0C0C79002AFAE43BFBEA2400F582EB348D -:0A0C850000F583AA1C7B00EAF0A230 -:030C8F000392AF1E -:010C9200223F -:080C9300E582FA2483500122DE -:060C9B00EA54036001228F -:0A0CA100A2AF9204C2AFEA2400F5EE -:0C0CAB0082E43401F5837402F07B0074D5 -:0C0CB700012AFCE43BFDEC2400F582ED7A -:0A0CC3003401F583E51DF074022AE8 -:0B0CCD00FAE43BFBEA2400F582EB3464 -:080CD80001F583AA1CEAF0A259 -:040CE0000492AF22A9 -:050CE400AA82BA8000A5 -:070CE9004005EA244B500115 -:010CF00022E1 -:060CF100EA540360012239 -:0A0CF700A2AF9205C2AFEA2480F517 -:0C0D010082E43400F5837402F07B00747F -:0C0D0D00012AFCE43BFDEC2480F582EDA3 -:0A0D19003400F583E51DF074022A92 -:0B0D2300FAE43BFBEA2480F582EB348D -:080D2E0000F583AA1CEAF0A203 -:040D36000592AF2251 -:080D3A00C2E8C2EA751C007555 -:060D42001D017582431241 -:040D48000C30751CDA -:030D4C0080751D92 -:0C0D4F0000758253120C300090E650E456 -:0E0D5B00F00090E652E4F00090E654E4F00060 -:0E0D690090E656E4F00090E65174FFF0009022 -:0E0D7700E65374FFF00090E65574FFF0009014 -:0E0D8500E65774FFF00090E658E4F090E6594F -:0E0D930074FFF090E65AE4F090E65B74FFF017 -:0E0DA10090E65CE4F090E65D74FFF090E65E94 -:0E0DAF00E4F090E65F74FFF00090E660E4F080 -:0D0DBD000090E66174FFF090E662E4F090B3 -:0E0DCA00E66374FFF090E665E4F090E668746E -:0A0DD8000BF05391AFD2E8D2EA22EB -:010DE20022EE -:020DE300AA82E2 -:060DE500120DE2DAFB2210 -:030DEB0090FB502A -:080DEE00A3E582458370F922A0 -:040DF600AA82AB839F -:080DFA00120DEB1ABAFF011BF8 -:050E0200EA4B70F42230 -:030E1500758121C3 -:0A0E18001205DAE5826003020E10F5 +:2000800002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B00F8 +:1800A00002006B0002006B0002006B0002006B0002006B0002006B00BA +:2001000002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0077 +:2001200002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0057 +:2001400002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0037 +:2001600002006B0002006B0002006B0002006B0002006B0002006B0002006B0002006B0017 +:030E9900020E9FA7 +:030EB200020E9C91 +:030E9C000203F45A +:20018000C200E4F508F509F50AD201750B00750C001205FC1205F975CB6375CAC0758E0023 +:2001A00075C804D2AFD2B0D2B122AF82850C827583E0EFF0050C0509E4B50902050A222047 +:2001C0000001221205F890E6A2E0FF30E10302025BE509450A606A7EC07FE78F9D7EC07FEF +:2001E000E77F008E9E90E67C7431F07460F0C3743E9509E4950A50107F3EE50924C2F5099D +:20020000E50A34FFF50A8007AF09E4F509F50A8F067C007DE08D9A850B9B8F051FED6010CD +:2002200090E67BE090E67CF07C007DE08D9A80EA859B0B00000090E68F74022EF0D2CF80BC +:200240001A30CF1790E7C07431F090E7C17460F000000090E68F7402F0C2CFE5AA30E0010A +:2002600022C3E50994C1E50A940040012290E690E0FE7F0090E691E0FD7C00EF4DF50DEE81 +:200280004CF50E7C007DF08D9A7C007DF08C9B7C007D00C3EC950DED950E400302036BE57D +:2002A00008700302032AE50DC39CFAE50E9DFBA8087900C3E89AE99B5004880289038A01D7 +:2002C000E508C399F508EA2CFCEB3DFD30012C8A008B018806890718B8FF0119EE4F60B3D7 +:2002E00090E67BE0F582C005C004C001C000120630D000D001D004D00580D88A068B078E12 +:20030000028F031EBEFF011FEA4B608790E67BE0F582C007C006C005C00412066D1201AA92 +:20032000D004D005D006D00780D590E67BE0FFA2E69202B39201EF30E707743F5FF5088044 +:200340002230010F8F82C005C004120602D004D00580108F82C005C0041206221201AAD0ED +:2003600004D0050CBC00010D02029300000090E6917480F02290E6B8E0FF20E70C90E6B9DB +:20038000E07002D2007582012290E6B9E0FFBF902B90E6BCE025E0547FFF2400F582E434FB +:2003A00018F583E0FE90E740F0EF042400F582E43418F583E0FF90E741F0800C90E74074B4 +:2003C00036F090E7417483F090E68AE4F090E6BEE0FFBF0200500790E6BEE0FF80027F0243 +:2003E00090E68BEFF0758201223004031209D41201BF80F5C2AF90E609E4F0120180120627 +:12040000BC120459120DA512093BD2AF12082B0203E9F1 +:20041200AF82E50F54FEFEB50F02802A8F048C05E4FC6210ED6211EE2400F582E43418F561 +:2004320083E0FE7D006210ED6211E51033C51133C51192E0F510AE0F050FEE2400F582E43E +:200452003418F583EFF022750F007510AA7511AA7582001204127582001204127F00EF2412 +:2004720008F582E434E1F583E0F582C007120412D0070FC3EF6480948640E37F00EF2423C6 +:20049200F582E434E1F583E0F582C007120412D0070FC3EF6480948240E375821C1204122C +:2004B2007582001204127F00EF2402F582E434E1F583E0F582C007120412D0070FC3EF644D +:2004D20080948240E37486250FFFF582C00712041290E19CE0F582120412D00790E19CE06E +:2004F2002FFFF582C00712041290E1BAE0F582120412D00790E1BAE02FF58212041290E18B +:20051200E4E0F5821204127F0090E19CE0FEC3EF64808EF063F08095F05017EF249CF58203 +:20053200E434E1F583E0F582C007120412D0070F80D77F0090E1BAE0FEC3EF64808EF063B6 +:20055200F08095F05017EF24BAF582E434E1F583E0F582C007120412D0070F80D77F0090E6 +:20057200E1E4E0FEC3EF64808EF063F08095F05017EF24E4F582E434E1F583E0F582C007F6 +:20059200120412D0070F80D77F00EF240EF582E434E1F583E0F582C007120412D0070FC36D +:2005B200EF6480948440E37482250F400875820012041280F2AE1090187EEEF0AF119018EE +:2005D2007FEFF0227880E84400600C7901901800E4F0A3D8FCD9FAD083D082F6D8FDC08207 +:0605F200C08375820022A7 +:20E100001201000200000040C016EF030400010203010A060002FFFFFF4001000902350047 +:20E1200001010080FA0904000005FFFFFF020705810200020007050202000200070504029D +:11E1400000020007058602000200070588020002009E +:20E152001201000200000040C016EF030400010203010A060002FFFFFF400100090220000A +:20E1720001010080FA0904000002FFFFFF0207058102400000070502024000000498E19CCB +:05E19200E1BAE1E4E147 +:20E19800040309041E037700770077002E0072006500740072006F00310031002E0064007F +:20E1B80065002A036E00650078007900730033005F006A007400610067005F00330066004E +:1EE1D800690066006F005F00690063001203300030003000300030003000300030002B +:2005F800222222229001F4020E82AF82AEB574FE5E441CF5B5EF13920392B4EFA2E19203F2 +:2006180092B3EFA2E4920392B222120602A2B0E433FF74024FF58222E5821392B2D2B413D6 +:20063800C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B2D2B413C2B492B29C +:20065800D2B413C2B492B2D2B413C2B492B2D2B400C2B42222E582A2B01392B2D2B4C2B490 +:20067800A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2CA +:20069800D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B4C2B4A2B01392B2D2B400C2B457 +:0406B800F582222283 +:2006BC0090E6007412F090E60174A3F090E6707480F000000090E60274E0F000000090E6B8 +:2006DC000374F9F000000090E6047480F000000090E60B7403F000000090E610E4F00000FE +:2006FC000090E61174A0F000000090E618E4F000000090E6047402F000000090E61274A273 +:20071C00F000000090E61374A2F000000090E61474E2F000000090E61574E2F0000000900D +:20073C00E6047404F000000090E6047406F000000090E6047408F000000090E604E4F00033 +:20075C00000090E60BE4F000000090E6497484F000000090E6497484F000000090E619E467 +:20077C00F000000090E6197410F000000090E6327480F000000090E6337404F0000000903D +:20079C00E61A740CF000000090E6247402F000000090E625E4F000000090E6347409F00047 +:2007BC00000090E63574FCF000000090E61B740CF000000090E6267402F000000090E62772 +:2007DC00E4F000000090E6367441F000000090E63774FCF000000000000090E6917480F0E0 +:0D07FC0000000090E6917480F000000022E3 +:2008090090E6A0E04401F022AF8274805FC423541FFE740F5F90E6834EF090E683E0442050 +:20082900F02290E680E0440AF09000FA120E8290E65D74FFF090E65F74FFF0AF9174EF5FED +:0A084900F59190E680E054F7F022EC +:060EAC00E478FFF6D8FD1A +:060E93007512007513004A +:2008530090E680E0FF30E7197514007515E17516127517E175181C7519E1751A6E751BE1FC +:20087300227514527515E17516647517E175186E7519E1751A1C751BE122C0E0C007C0D002 +:2008930075D000AF9174EF5FF59175A100D204D0D0D007D0E032C021C0E0C0F0C082C0837D +:2008B300C007C006C005C004C003C002C001C000C0D075D000AF9174EF5FF59175A1001284 +:2008D3000853D0D0D000D001D002D003D004D005D006D007D083D082D0F0D0E0D02132C076 +:2008F30021C0E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D000AF91BE +:2009130074EF5FF59175A100120853D0D0D000D001D002D003D004D005D006D007D083D09A +:2009330082D0F0D0E0D02132120853751C8D751D08758200120CFE751CA9751D087582107C +:20095300120CFE751CF2751D08758214120CFE90E65C7431F022AF828F06747F5EFF24F76A +:20097300500475820022BF010475820122530701E4BF000104F58222AF82BF010C90E6A169 +:20099300E0FE7D008E828D8322BF810C90E6A2E0FE7D008E828D83228F06747F5EFF700C45 +:2009B30090E6A0E0FE7D008E828D832290E6A3E0FE7D00EFC3137C002EFEEC3D8E82F583DF +:2009D30022C20490E6B8E0FF5307608F06BE00028028BF2002800DBF4002800EBF600280BA +:2009F30003020C93120809020C93120375E5826003020C93120809020C9390E6B8E0FF5363 +:200A13000780BF80028003020B9790E6B9E0FFBF0003020B0EBF06028035BF08028008BF5D +:200A33000A028017020B9190E740E512F090E68AE4F090E68B7401F0020C9390E740E5133A +:200A5300F090E68AE4F090E68B7401F0020C9390E6BBE0FFBF01028017BF02028038BF0312 +:200A7300028059BF0602801BBF0702803C020B08AE14AF1590E6B3EFF07F0090E6B4EEF078 +:200A9300020C93AE16AF1790E6B3EFF07F0090E6B4EEF0020C93AE18AF1990E6B3EFF07FD3 +:200AB3000090E6B4EEF0020C93AE1AAF1B90E6B3EFF07F0090E6B4EEF0020C9390E6BAE0A8 +:200AD300FF90E18EE0FEC3EF9E4006120809020C9390E6BAE075F002A4248FF58274E135FE +:200AF300F0F583E0FEA3E090E6B3F07F0090E6B4EEF0020C93120809020C9390E6B8E0FF08 +:200B130053071F8F06BE0002800ABE0102801BBF0266802C90E740E4F090E741F090E68A08 +:200B3300F090E68B7402F0020C9390E740E4F090E741F090E68AF090E68B7402F0020C937F +:200B530090E6BCE0F582120969E582602590E6BCE0F58212098BE0FF53070190E740EFF08A +:200B730090E741E4F090E68AF090E68B7402F0020C93120809020C93120809020C9312083C +:200B930009020C9390E6B9E0FF24F45003020C90EF240A83F582EF241083F583E47390DB8A +:200BB30058399090909090C990D20C0B0C0C0C0C0C0C0C0B0C0B90E6BAE0F512020C9390C1 +:200BD300E6BAE0F513020C9390E6B8E0FF53071F8F06BE00028005BF0247800A90E6BAE0D7 +:200BF300120809020C9390E6BAE0703090E6BCE0F582120969E582602390E6BCE0F58212DC +:200C1300098BAE82AF83E0FD5305FE8E828F83EDF090E6BCE0F5821208118064120809805E +:200C33005F120809805A90E6B8E0FF53071FBF004F90E6BAE0FFBF01028005BF02028040D8 +:200C5300120809803B90E6BAE0FF702C90E6BCE0F582120969E582601A90E6BCE0F582126F +:200C7300098BAE82AF83E0FD4305018E828F83EDF0800D1208098008120809800312080945 +:080C930090E6A0E04480F0228D +:200C9B00AF82BF03004005EF249C500122740F5FFEBE03028007740F5FFEBE0B45A2AF92E4 +:200CBB0005C2AFEF2400F582E43400F5837402F07E0074012FFCE43EFDEC2400F582ED343E +:200CDB0000F583E51DFDF074022FFFE43EFEEF2400F582EE3400F583AE1C7F00EEF0A205DC +:200CFB0092AF22E582FF2483500122EF5403600122A2AF9206C2AFEF2400F582E43401F53B +:200D1B00837402F07E0074012FFCE43EFDEC2400F582ED3401F583E51DF074022FFFE43EB9 +:200D3B00FEEF2400F582EE3401F583AE1CEEF0A20692AF22AF82BF80004005EF244B50015E +:200D5B0022EF5403600122A2AF9207C2AFEF2480F582E43400F5837402F07E0074012FFC14 +:200D7B00E43EFDEC2480F582ED3400F583E51DF074022FFFE43EFEEF2480F582EE3400F5C2 +:200D9B0083AE1CEEF0A20792AF22C2E8C2EA751C00751D01758243120C9B751C80751D00F1 +:200DBB00758253120C9B00000090E650E4F000000090E652E4F000000090E654E4F0000041 +:200DDB000090E656E4F000000090E65174FFF000000090E65374FFF000000090E65574FFC4 +:200DFB00F000000090E65774FFF000000090E658E4F090E65974FFF090E65AE4F090E65B6F +:200E1B0074FFF090E65CE4F090E65D74FFF090E65EE4F090E65F74FFF000000090E660E4DE +:200E3B00F000000090E66174FFF090E662E4F090E66374FFF090E665E4F090E668740BF089 +:130E5B00AF9174EF5FF591AF9174BF5FF591D2E8D2EA220C +:200E6E0022AF82120E6EDFFB2290FB50A3E582458370F922AE82AF83120E771EBEFF011F5B +:050E8E00EE4F70F4229C +:0D0E9F007581211205D6E5826003020E9CCC :00000001FF diff --git a/tools/fx2/src/.cvsignore b/tools/fx2/src/.cvsignore index 867b913d..885dad92 100644 --- a/tools/fx2/src/.cvsignore +++ b/tools/fx2/src/.cvsignore @@ -7,4 +7,5 @@ *.rel *.rst *.sym +*.lk dscr_*.a51 diff --git a/tools/fx2/src/Makefile b/tools/fx2/src/Makefile index 37e099c3..ceee3b19 100644 --- a/tools/fx2/src/Makefile +++ b/tools/fx2/src/Makefile @@ -1,6 +1,6 @@ -# $Id: Makefile 461 2012-04-09 21:17:54Z mueller $ +# $Id: Makefile 604 2014-11-16 22:33:09Z mueller $ # -# Copyright 2011-2012 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # Code was forked from ixo-jtag.svn.sourceforge.net on 2011-07-17 # # - original copyright and licence disclaimer -------------------------------- @@ -22,6 +22,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-16 604 2.0 add sdcc 3.x migration # 2012-04-09 461 1.5.1 fixed nexys3_jtag_3fifo_ic.ihx rule,used _2fifo code # 2012-02-11 457 1.5 re-organize VID/PID and descriptor handling # 2012-01-02 448 1.4 add support for sync fifo w/ int. clock (_ic) @@ -48,6 +49,8 @@ # (for instance because someone else did not follow the previous rule). # See also http://www.voti.nl/pids/pidfaq.html # +# Define default VID/PID ----------------------------------------------- +# ifndef RETRO_FX2_VID RETRO_FX2_VID = 16c0 endif @@ -57,15 +60,18 @@ endif # DEFVIDPID=-DUSE_VID=0x${RETRO_FX2_VID} -DUSE_PID=0x${RETRO_FX2_PID} # -# compiler and assembler flags +# defs for sdcc 2.9 to 3.x transition handling ------------------------- +# +include sdccdefs.mk +# +# compiler and assembler flags ----------------------------------------- # LIBDIR=lib LIB=libfx2.lib -CC=sdcc CFLAGS+=-mmcs51 --no-xinit-opt -I${LIBDIR} +CFLAGS+=${CC29COMPOPT} -AS=asx8051 ASFLAGS+=-plosgff LDFLAGS=--code-loc 0x0000 --code-size 0x1800 @@ -165,7 +171,7 @@ LIB_REL=$(LIBDIR)/$(LIB) # rules to compile all code # $(LIBDIR)/$(LIB) : - make -C $(LIBDIR) + make -C $(LIBDIR) $(MAKELIBOPT) eeprom.rel : eeprom.c eeprom.h main.rel : main.c hardware.h eeprom.h @@ -210,7 +216,7 @@ nexys3_jtag_3fifo_ic.ihx : $(COM_REL) dscr_nexys3_jtag_3fifo_ic.rel \ clean : make -C ${LIBDIR} clean - rm -f *.lst *.asm *.lib *.sym *.rel *.mem *.map *.rst *.lnk + rm -f *.lst *.asm *.lib *.sym *.rel *.mem *.map *.rst *.lnk *.lk rm -f dscr_*.a51 distclean : clean diff --git a/tools/fx2/src/README.txt b/tools/fx2/src/README.txt index 8685b701..b6731200 100644 --- a/tools/fx2/src/README.txt +++ b/tools/fx2/src/README.txt @@ -1,17 +1,71 @@ -# $Id: README.txt 395 2011-07-17 22:02:55Z mueller $ +# $Id: README.txt 604 2014-11-16 22:33:09Z mueller $ # The FX2 software is based on the Sourceforge project ixo-jtag http://sourceforge.net/projects/ixo-jtag/ -The usb_jtag sub project was checked out on 2011-07-17 (Rev 204) -from Sourceforge and take as the basis for the further developement. +The usb_jtag sub project was checked out on 2011-07-17 (Rev 204) from +Sourceforge and take as the basis for the further developement. The original README.txt is preserved under README_iso_jtag.txt. Only the hw_nexys.c branch is kept on the import. Change log: +2014-11-16 (Rev 604) + - ported to sdcc 3.3 + - all prior development was done with sdcc 2.x, latest sdcc 2.9 was bundled + with Ubuntu 12.04 LTS. + - now switching to sdcc 3.3 as bundled with Ubuntu 14.04 LTS. + - mayor changes: + 1. assembler now named sdas8051 (was asx8051) + 2. all special reserved keywords start now with a double underscore + at --> __at + bit --> __bit + interrupt --> __interrupt + sbit --> __sbit + sfr --> __sfr + xdata --> __xdata + _asm --> __asm + _endasm --> __endasm + _naked --> __naked + - in general sources stayed untouched in the sdcc 2.9 form, all keyword + mappings are done with the preprocessor and defs like "-Dat=__at" + + - make usage now + - default is now sdcc 3.x, in this case simply use + + make clean && make + + - on systems with sdcc 2.x use + + make clean && make SDCC29=1 + + - detected and fixed BUG inherted from ixo-jtag and GNU Radio in SYNCDELAY + The macro SYNCDELAY (defined in lib/syncdelay.h) inserts 'nop' needed + to resolve some timing issues in the FX2. The old implementation was + + #define SYNCDELAY _asm nop; nop; nop; _endasm + #define NOP _asm nop; _endasm + + This inserts into the assembler output a single line + nop; nop; nop; + Since ';' is the comment delimiter for the assember the 2nd and 3rd nop + are simply ignored. + + This wrong implementation was changed to + #define SYNCDELAY NOP; NOP; NOP + That created three lines in the assembler output + nop; + nop; + nop; + and generated the three desired nops in the binary. + + !! This was definitively broken from the very beginning. !! + !! The code ran alway. Reason is mosu likely that the SYNCDELAY !! + !! macros were only used in the setup phase and never is a !! + !! really time critical context. !! + 2011-07-17 (Rev 395) - Makefile: reorganized to support multiple target/fifo configs - renames: diff --git a/tools/fx2/src/dscr_gen.A51 b/tools/fx2/src/dscr_gen.A51 index 5f207520..37f81eda 100644 --- a/tools/fx2/src/dscr_gen.A51 +++ b/tools/fx2/src/dscr_gen.A51 @@ -1,7 +1,7 @@ ;;; -*- asm -*- -;;; $Id: dscr_gen.A51 457 2012-02-12 22:34:20Z mueller $ +;;; $Id: dscr_gen.A51 605 2014-11-18 22:34:44Z mueller $ ;;; -;;; Copyright 2011-2012 by Walter F.J. Mueller +;;; Copyright 2011-2014 by Walter F.J. Mueller ;;; Code was forked from ixo-jtag.svn.sourceforge.net on 2011-07-17 ;;; ;;;- original copyright and licence disclaimer --------------------------------- @@ -56,6 +56,7 @@ ;;; Revision History: ;;; ;;; Date Rev Version Comment +;;; 2014-11-18 605 2.2 BUGFIX: correct string 0 descriptor ;;; 2012-02-11 457 2.1 iVendor string now reflects firmware file name; ;;; iSerial string now 00000000; ;;; VID/PID now via USE_VID/USE_PID defines @@ -357,8 +358,6 @@ _string_descriptors_end: _str0:: str0: .db str0_end - str0 .db DSCR_STRING - .db 0 - .db 0 .db <0x0409 ; magic code for US English (LSB) .db >0x0409 ; magic code for US English (MSB) str0_end: diff --git a/tools/fx2/src/lib/Makefile b/tools/fx2/src/lib/Makefile index 143f9079..6b8cb7e8 100644 --- a/tools/fx2/src/lib/Makefile +++ b/tools/fx2/src/lib/Makefile @@ -1,23 +1,44 @@ -# $Id: Makefile 394 2011-07-17 17:03:19Z mueller $ +# $Id: Makefile 604 2014-11-16 22:33:09Z mueller $ + +# +# Copyright 2014- by Walter F.J. Mueller +# Code was forked from ixo-jtag.svn.sourceforge.net on 2011-07-17 +# +# - original copyright and licence disclaimer -------------------------------- +# - Copyright 2007 Kolja Waschk, ixo.de +# - This code is part of usbjtag. usbjtag is free software; #----------------------------------------------------------------------------- -# Makefile for FX2 library code -#----------------------------------------------------------------------------- -# Copyright (C) 2007 Kolja Waschk, ixo.de -#----------------------------------------------------------------------------- -# This code is part of usbjtag. usbjtag 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. usbjtag 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 in the file -# COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin -# St, Fifth Floor, Boston, MA 02110-1301 USA +# +# This program is free software; you may redistribute 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. +# +# 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 complete details. #----------------------------------------------------------------------------- -CC=sdcc + +#----------------------------------------------------------------------------- +# Makefile for FX2 library code +# +# Revision History in retro projects +# +# Date Rev Version Comment +# 2014-11-16 604 1.1 add sdcc 3.x migration support +# 2011-07-17 394 1.0 Initial version (from ixo-jtag/usb_jtag Rev 204) +# +#----------------------------------------------------------------------------- + +# +# defs for sdcc 2.9 to 3.x transition handling ------------------------- +# +include ../sdccdefs.mk + CFLAGS+=-mmcs51 --no-xinit-opt -I. +CFLAGS+=${CC29COMPOPT} + CPPFLAGS+= OBJS=delay.rel fx2utils.rel i2c.rel isr.rel timer.rel usb_common.rel AR=sdcclib diff --git a/tools/fx2/src/lib/fx2regs.h b/tools/fx2/src/lib/fx2regs.h index 6130cebc..74ca99b4 100644 --- a/tools/fx2/src/lib/fx2regs.h +++ b/tools/fx2/src/lib/fx2regs.h @@ -1,5 +1,5 @@ /* -*- c++ -*- */ -/* $Id: fx2regs.h 395 2011-07-17 22:02:55Z mueller $ */ +/* $Id: fx2regs.h 604 2014-11-16 22:33:09Z mueller $ */ /*----------------------------------------------------------------------------- * FX2 register definitions *----------------------------------------------------------------------------- @@ -20,6 +20,7 @@ */ /* +// original Cypress disclaimer //----------------------------------------------------------------------------- // File: FX2regs.h // Contents: EZ-USB FX2 register declarations and bit mask definitions. @@ -28,11 +29,19 @@ // $Date: 2006-09-13 14:30:04 -0700 (Wed, 13 Sep 2006) $ // $Revision: 3534 $ // -// // Copyright (c) 2000 Cypress Semiconductor, All rights reserved //----------------------------------------------------------------------------- */ +/* + * Revision History in retro projects + * + * Date Rev Version Comment + * 2014-11-16 604 1.1 add sdcc 3.x migration support + * 2011-07-17 394 1.0 Initial version (from ixo-jtag/usb_jtag Rev 204) + * + *----------------------------------------------------------------------------- + */ #ifndef FX2REGS_H /* Header Sentry */ #define FX2REGS_H @@ -59,10 +68,19 @@ // to cut off the end of the line, "_at_ 0x7B40;", which is not wanted. */ +/* + * Note on sdcc 3.x compatibility: + * Only the _AT_ macro is touched in the original Cypress sources. + * all other keyword mappings are done via pre-processor defines. + */ #ifdef ALLOCATE_EXTERN #define EXTERN +#ifdef SDCC3XCOMPAT +#define _AT_(a) __at a +#else #define _AT_(a) at a +#endif #else #define EXTERN extern #define _AT_ ;/ ## / diff --git a/tools/fx2/src/lib/syncdelay.h b/tools/fx2/src/lib/syncdelay.h index c61dd162..b7bdd956 100644 --- a/tools/fx2/src/lib/syncdelay.h +++ b/tools/fx2/src/lib/syncdelay.h @@ -1,22 +1,32 @@ /* -*- c++ -*- */ -/* $Id: syncdelay.h 395 2011-07-17 22:02:55Z mueller $ */ -/*----------------------------------------------------------------------------- - * Synchronization delay for FX2 access to specific registers - *----------------------------------------------------------------------------- - * Code taken from USRP2 firmware (GNU Radio Project), version 3.0.2, +/* $Id: syncdelay.h 604 2014-11-16 22:33:09Z mueller $ */ +/* + * Copyright 2014- by Walter F.J. Mueller + * Code was forked from USRP2 firmware (GNU Radio Project), version 3.0.2 + * + * - original copyright and licence disclaimers ------------------------------- * Copyright 2003 Free Software Foundation, Inc. + * This code is part of usbjtag. *----------------------------------------------------------------------------- - * This code is part of usbjtag. usbjtag 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. usbjtag 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 in the file - * COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA + * + * This program is free software; you may redistribute 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. + * + * 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 complete details. + * *----------------------------------------------------------------------------- + * + * Synchronization delay for FX2 access to specific registers + * + * Revision History: + * + * Date Rev Version Comment + * 2014-11-16 604 1.1 BUGFIX: handle triple nop properly + * 2011-07-17 394 1.0 Initial version (from ixo-jtag/usb_jtag Rev 204) */ #ifndef _SYNCDELAY_H_ @@ -58,8 +68,7 @@ /* * FIXME ensure that the peep hole optimizer isn't screwing us */ -#define SYNCDELAY _asm nop; nop; nop; _endasm +#define SYNCDELAY NOP; NOP; NOP #define NOP _asm nop; _endasm - #endif /* _SYNCDELAY_H_ */ diff --git a/tools/fx2/src/main.c b/tools/fx2/src/main.c index 81eabe3f..bc2a4cae 100644 --- a/tools/fx2/src/main.c +++ b/tools/fx2/src/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c 472 2013-01-06 14:39:10Z mueller $ */ +/* $Id: main.c 606 2014-11-24 07:08:51Z mueller $ */ /* * Copyright 2011-2013 by Walter F.J. Mueller * Code was forked from ixo-jtag.svn.sourceforge.net on 2011-07-17 @@ -355,6 +355,10 @@ void main(void) // EE and FF are active high. In nexys2 boards they are active low // All config regs should be set (even when power on defaults are // use, but this one especially.... + + // no SYNCHDELAY here because a subroutine call follows, slow enough + // !! if more regs will be touched here add SYNCHDELAYs !! + FIFOPINPOLAR = 0; usb_jtag_init(); diff --git a/tools/fx2/src/sdccdefs.mk b/tools/fx2/src/sdccdefs.mk new file mode 100644 index 00000000..4dc2f59b --- /dev/null +++ b/tools/fx2/src/sdccdefs.mk @@ -0,0 +1,31 @@ +# $Id: sdccdefs.mk 604 2014-11-16 22:33:09Z mueller $ +# +# Revision History: +# Date Rev Version Comment +# 2014-11-16 604 1.0 Initial version +#--- +# +# sdcc 2.9 to 3.x transition handling ---------------------------------- +# default is sdcc 3.x; if SDCC29 is specified sdcc 2.9 is used +# + +CC=sdcc + +ifdef SDCC29 +MAKELIBOPT=SDCC29=1 +AS=asx8051 +CC29COMPOPT= +else +MAKELIBOPT= +AS=sdas8051 +CC29COMPOPT+=-DSDCC3XCOMPAT=1 +CC29COMPOPT+=-Dat=__at +CC29COMPOPT+=-Dsfr=__sfr +CC29COMPOPT+=-Dsbit=__sbit +CC29COMPOPT+=-Dbit=__bit +CC29COMPOPT+=-Dxdata=__xdata +CC29COMPOPT+=-D_asm=__asm +CC29COMPOPT+=-D_endasm=__endasm +CC29COMPOPT+=-D_naked=__naked +CC29COMPOPT+=-Dinterrupt=__interrupt +endif diff --git a/tools/fx2/sys/README.txt b/tools/fx2/sys/README.txt index def721c4..db37b2ba 100644 --- a/tools/fx2/sys/README.txt +++ b/tools/fx2/sys/README.txt @@ -1,6 +1,19 @@ -# $Id: README.txt 446 2011-12-29 23:27:48Z mueller $ +# $Id: README.txt 604 2014-11-16 22:33:09Z mueller $ -to setup udev rules do +This directory contains udev rules which ensure that the Cypress FX2 on + - Digilent Nexys2 + - Digilent Nexys3 + - Digilent Atlys + +is read/write accessible for user land processes, either in + - original power on state (thus Digilent VID/PID) + - after custom firmware is loaded (thus VOTI VID/PID) + +!! The rules assume that eligible user accounts are in group plugdev. +!! Check with the 'groups' command whether your account is in group plugdev, +!! in not, add this group to your accounts groups list. + +To setup udev rules do sudo cp -a 99-retro-usb-permissions.rules /etc/udev/rules.d/ sudo chown root:root /etc/udev/rules.d/99-retro-usb-permissions.rules diff --git a/tools/make/generic_so_c.mk b/tools/make/generic_so_c.mk new file mode 100644 index 00000000..56c48198 --- /dev/null +++ b/tools/make/generic_so_c.mk @@ -0,0 +1,45 @@ +# $Id: generic_so_c.mk 600 2014-11-02 22:33:02Z mueller $ +# +# Revision History: +# Date Rev Version Comment +# 2014-11-02 600 1.0. Initial version (cloned from generic_so.mk) +#--- +# +# Build a sharable library and an archive +# --> from C sources only! +# --> with $(CC) rather than $(CXX) +# +# Before including, defined the following variables: +# SOPATH relative directory path of the library (def: $RETROBASE/tools/lib) +# SONAME name of the library +# SOMAJV major version number +# SOMINV minor version number +# +ifndef SOPATH +SOPATH = $(RETROBASE)/tools/lib +endif +# +SOFILE = lib$(SONAME).so +SOFILEV = lib$(SONAME).so.$(SOMAJV) +SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV) +AFILE = lib$(SONAME).a +# +.PHONY : libs +libs : $(SOPATH)/$(AFILE) $(SOPATH)/$(SOFILEVV) +# +# Build the sharable library +# +$(SOPATH)/$(SOFILEVV) : $(OBJ_all) + if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi + $(CC) -shared -Wl,-soname,$(SOFILEV) -o $(SOPATH)/$(SOFILEVV) \ + $(OBJ_all) $(LDLIBS) + (cd $(SOPATH); rm -f $(SOFILE) $(SOFILEV)) + (cd $(SOPATH); ln -s $(SOFILEVV) $(SOFILEV)) + (cd $(SOPATH); ln -s $(SOFILEV) $(SOFILE)) +# +# Build an archive +# +$(SOPATH)/$(AFILE) : $(OBJ_all) + if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi + ar -scruv $(SOPATH)/$(AFILE) $? +# diff --git a/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt b/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt index 4099ddb4..154cb397 100644 --- a/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt +++ b/tools/oskit/rsx11m-40_rk/README_rsx11m-40_rkset.txt @@ -1,4 +1,4 @@ -# $Id: README_rsx11m-40_rkset.txt 558 2014-06-01 22:20:51Z mueller $ +# $Id: README_rsx11m-40_rkset.txt 580 2014-08-10 15:47:10Z mueller $ Notes on oskit: RSX-11M V4.0 system on RK05 volumes @@ -78,6 +78,10 @@ Notes on oskit: RSX-11M V4.0 system on RK05 volumes Now you are at the MCR prompt and can exercise the system. - At end is important to shutdown properly with a 'run $shutup'. + You can also login on the 2nd DL11, possible accounts are + >hel 1,1 ; password root + >hel 200,201 ; password test + + At the end it is important to shutdown properly with a 'run $shutup'. The simululaor (or the rlink backend) can be stopped when the CPU has halted. diff --git a/tools/src/Makefile b/tools/src/Makefile index b5911827..336f4ab6 100644 --- a/tools/src/Makefile +++ b/tools/src/Makefile @@ -1,10 +1,11 @@ -# $Id: Makefile 530 2013-08-09 21:25:04Z mueller $ +# $Id: Makefile 601 2014-11-07 22:44:43Z mueller $ # # Top level makefile, using the recipe found in # http://www.lackof.org/taggart/hacking/make-example/ # # Revision History: # Date Rev Version Comment +# 2014-11-07 601 1.3 add tcshcpp # 2013-02-01 479 1.2.2 correct so names for *w11* libs # 2013-01-27 478 1.2.1 add librlw11(tpp) # 2011-03-20 372 1.1.1 renamed ..tcl -> ..tpp @@ -19,6 +20,7 @@ DIRS += librtcltools DIRS += librutiltpp DIRS += librlinktpp DIRS += librwxxtpp +DIRS += tclshcpp # BUILDDIRS = $(DIRS:%=build-%) CLEANDIRS = $(DIRS:%=clean-%) diff --git a/tools/src/checkpath_cpp.mk b/tools/src/checkpath_cpp.mk index 17afa4f4..c6469e73 100644 --- a/tools/src/checkpath_cpp.mk +++ b/tools/src/checkpath_cpp.mk @@ -1,7 +1,8 @@ -# $Id: checkpath_cpp.mk 504 2013-04-13 15:37:24Z mueller $ +# $Id: checkpath_cpp.mk 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-11-08 602 1.1 add default for TCLLIB # 2013-03-01 493 1.0.1 fix logic # 2013-02-01 479 1.0 Initial version # @@ -32,3 +33,9 @@ endif ifndef BOOSTLIB BOOSTLIB = /usr/lib endif +# +# define TCLLIB, if needed +# +ifndef TCLLIB +TCLLIB = /usr/lib +endif diff --git a/tools/src/librlink/Makefile b/tools/src/librlink/Makefile index 233cc4dc..6956b82d 100644 --- a/tools/src/librlink/Makefile +++ b/tools/src/librlink/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 529 2013-08-02 17:15:43Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment @@ -28,7 +28,8 @@ LDLIBS += -L${RETROBASE}/tools/lib -lrtools OBJ_all = RlinkAddrMap.o OBJ_all += RlinkCommand.o RlinkCommandExpect.o RlinkCommandList.o OBJ_all += RlinkConnect.o RlinkContext.o RlinkChannel.o -OBJ_all += RlinkCrc8.o RlinkPacketBuf.o +OBJ_all += RlinkCrc16.o +OBJ_all += RlinkPacketBuf.o RlinkPacketBufSnd.o RlinkPacketBufRcv.o OBJ_all += RlinkPort.o RlinkPortFactory.o OBJ_all += RlinkPortFifo.o RlinkPortTerm.o RlinkPortCuff.o OBJ_all += RtimerFd.o ReventFd.o ReventLoop.o diff --git a/tools/src/librlink/RlinkAddrMap.cpp b/tools/src/librlink/RlinkAddrMap.cpp index 80cf77ac..7d9e9868 100644 --- a/tools/src/librlink/RlinkAddrMap.cpp +++ b/tools/src/librlink/RlinkAddrMap.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkAddrMap.cpp 492 2013-02-24 22:14:47Z mueller $ +// $Id: RlinkAddrMap.cpp 603 2014-11-09 22:50:26Z mueller $ // // Copyright 2011-2013 by Walter F.J. Mueller // @@ -21,7 +21,7 @@ /*! \file - \version $Id: RlinkAddrMap.cpp 492 2013-02-24 22:14:47Z mueller $ + \version $Id: RlinkAddrMap.cpp 603 2014-11-09 22:50:26Z mueller $ \brief Implemenation of class RlinkAddrMap. */ @@ -170,7 +170,7 @@ void RlinkAddrMap::Print(std::ostream& os, int ind) const RosFill bl(ind); for (amap_cit_t it=fAddrMap.begin(); it!=fAddrMap.end(); it++) { os << bl << RosPrintf((it->second).c_str(), "-s",maxlen) - << " : " << RosPrintf(it->first, "$x0", 4) + << " : " << RosPrintf(it->first, "$x0", 6) << " " << RosPrintf(it->first, "o0", 6) << endl; } diff --git a/tools/src/librlink/RlinkCommand.cpp b/tools/src/librlink/RlinkCommand.cpp index 228546f2..ef0962a2 100644 --- a/tools/src/librlink/RlinkCommand.cpp +++ b/tools/src/librlink/RlinkCommand.cpp @@ -1,6 +1,6 @@ -// $Id: RlinkCommand.cpp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RlinkCommand.cpp 609 2014-12-07 19:35:25Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,8 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-06 609 1.2 new rlink v4 iface +// 2014-08-15 583 1.1 rb_mreq addr now 16 bit // 2013-05-06 495 1.0.2 add RlinkContext to Print() args // 2013-02-03 481 1.0.1 use Rexception // 2011-03-27 374 1.0 Initial version @@ -21,7 +23,7 @@ /*! \file - \version $Id: RlinkCommand.cpp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RlinkCommand.cpp 609 2014-12-07 19:35:25Z mueller $ \brief Implemenation of class RlinkCommand. */ @@ -54,39 +56,28 @@ const uint8_t RlinkCommand::kCmdRreg; const uint8_t RlinkCommand::kCmdRblk; const uint8_t RlinkCommand::kCmdWreg; const uint8_t RlinkCommand::kCmdWblk; -const uint8_t RlinkCommand::kCmdStat; +const uint8_t RlinkCommand::kCmdLabo; const uint8_t RlinkCommand::kCmdAttn; const uint8_t RlinkCommand::kCmdInit; const uint32_t RlinkCommand::kFlagInit; const uint32_t RlinkCommand::kFlagSend; const uint32_t RlinkCommand::kFlagDone; +const uint32_t RlinkCommand::kFlagLabo; const uint32_t RlinkCommand::kFlagPktBeg; const uint32_t RlinkCommand::kFlagPktEnd; -const uint32_t RlinkCommand::kFlagRecov; -const uint32_t RlinkCommand::kFlagResend; const uint32_t RlinkCommand::kFlagErrNak; -const uint32_t RlinkCommand::kFlagErrMiss; -const uint32_t RlinkCommand::kFlagErrCmd; -const uint32_t RlinkCommand::kFlagErrCrc; +const uint32_t RlinkCommand::kFlagErrDec; const uint32_t RlinkCommand::kFlagChkStat; const uint32_t RlinkCommand::kFlagChkData; -const uint32_t RlinkCommand::kFlagVol; const uint8_t RlinkCommand::kStat_M_Stat; const uint8_t RlinkCommand::kStat_V_Stat; const uint8_t RlinkCommand::kStat_B_Stat; const uint8_t RlinkCommand::kStat_M_Attn; -const uint8_t RlinkCommand::kStat_M_Cerr; -const uint8_t RlinkCommand::kStat_M_Derr; const uint8_t RlinkCommand::kStat_M_RbNak; const uint8_t RlinkCommand::kStat_M_RbErr; -const uint16_t RlinkCommand::kRbaddr_IInt; -const uint16_t RlinkCommand::kIInt_M_AnEna; -const uint16_t RlinkCommand::kIInt_M_ItoEna; -const uint16_t RlinkCommand::kIInt_M_ItoVal; - //------------------------------------------+----------------------------------- //! Default constructor @@ -97,7 +88,7 @@ RlinkCommand::RlinkCommand() fBlock(), fpBlockExt(0), fBlockExtSize(0), - fStatRequest(0), + fBlockDone(0), fStatus(0), fFlags(0), fRcvSize(0), @@ -114,7 +105,7 @@ RlinkCommand::RlinkCommand(const RlinkCommand& rhs) fBlock(rhs.fBlock), fpBlockExt(rhs.fpBlockExt), fBlockExtSize(rhs.fBlockExtSize), - fStatRequest(rhs.fStatRequest), + fBlockDone(rhs.fBlockDone), fStatus(rhs.fStatus), fFlags(rhs.fFlags), fRcvSize(rhs.fRcvSize), @@ -176,18 +167,17 @@ void RlinkCommand::SetCommand(uint8_t cmd, uint16_t addr, uint16_t data) { if (cmd > kCmdInit) throw Rexception("RlinkCommand::SetCommand()", "Bad args: invalid cmd"); - if (addr > 0xff) - throw Rexception("RlinkCommand::SetCommand()", "Bad args: invalid addr"); - fRequest = cmd; - fAddress = addr; - fData = data; + fRequest = cmd; + fAddress = addr; + fData = data; fpBlockExt = 0; fBlockExtSize = 0; - fStatus = 0; - fFlags = kFlagInit; - fRcvSize = 0; + fBlockDone = 0; + fStatus = 0; + fFlags = kFlagInit; + fRcvSize = 0; delete fpExpect; - fpExpect = 0; + fpExpect = 0; return; } @@ -196,8 +186,6 @@ void RlinkCommand::SetCommand(uint8_t cmd, uint16_t addr, uint16_t data) void RlinkCommand::SetAddress(uint16_t addr) { - if (addr > 0xff) - throw Rexception("RlinkCommand::SetAddress()", "Bad args: invalid addr"); fAddress = addr; return; } @@ -207,12 +195,13 @@ void RlinkCommand::SetAddress(uint16_t addr) void RlinkCommand::SetBlockWrite(const std::vector& block) { - if (block.size() == 0 || block.size() > 256) + if (block.size() == 0 || block.size() > 65535) throw Rexception("RlinkCommand::SetBlockWrite()", "Bad args: invalid block size"); fBlock = block; fpBlockExt = 0; fBlockExtSize = 0; + fBlockDone = 0; return; } @@ -221,13 +210,14 @@ void RlinkCommand::SetBlockWrite(const std::vector& block) void RlinkCommand::SetBlockRead(size_t size) { - if (size == 0 || size > 256) + if (size == 0 || size > 65535) throw Rexception("RlinkCommand::SetBlockRead()", "Bad args: invalid block size"); fBlock.clear(); fBlock.resize(size); fpBlockExt = 0; fBlockExtSize = 0; + fBlockDone = 0; return; } @@ -239,11 +229,12 @@ void RlinkCommand::SetBlockExt(uint16_t* pblock, size_t size) if (pblock == 0) throw Rexception("RlinkCommand::SetBlockExt()", "Bad args: pblock is null"); - if (size == 0 || size > 256) + if (size == 0 || size > 65535) throw Rexception("RlinkCommand::SetBlockExt()", "Bad args: invalid block size"); fpBlockExt = pblock; fBlockExtSize = size; + fBlockDone = 0; return; } @@ -269,12 +260,12 @@ void RlinkCommand::Print(std::ostream& os, const RlinkContext& cntx, // separator + command mnemonic, code and flags // separator: ++ first in packet // -- non-first in packet - // -= non-first in packet (marked volatile) + // ?? FIXME: separator for labo canceled commands const char* sep = "??"; if (TestFlagAny(kFlagPktBeg)) { sep = "++"; } else { - sep = TestFlagAny(kFlagVol) ? "-=" : "--"; + sep = "--"; } os << sep << " " << CommandName(ccode) @@ -296,12 +287,12 @@ void RlinkCommand::Print(std::ostream& os, const RlinkContext& cntx, // data field (scalar) if (ccode== kCmdRreg || ccode==kCmdWreg || - ccode== kCmdStat || ccode==kCmdAttn || + ccode== kCmdLabo || ccode==kCmdAttn || ccode== kCmdInit) { os << " d=" << RosPrintBvi(fData, dbase); if (fpExpect && - (ccode==kCmdRreg || ccode==kCmdStat || ccode==kCmdAttn)) { + (ccode==kCmdRreg || ccode==kCmdLabo || ccode==kCmdAttn)) { if (TestFlagAny(kFlagChkData)) { os << "#"; os << " D=" << RosPrintBvi(fpExpect->DataValue(), dbase); @@ -322,11 +313,6 @@ void RlinkCommand::Print(std::ostream& os, const RlinkContext& cntx, os << " n=" << RosPrintf(BlockSize(), "d", 3); } - // ccmd field - if (ccode == kCmdStat) { - os << " c=" << RosPrintBvi(fStatRequest, 8); - } - // status field os << " s=" << RosPrintBvi(fStatus, sbase); uint8_t scval = fpExpect ? fpExpect->StatusValue() : cntx.StatusValue(); @@ -349,11 +335,9 @@ void RlinkCommand::Print(std::ostream& os, const RlinkContext& cntx, } else { os << " OK"; } - if (TestFlagAny(kFlagRecov|kFlagResend)) os << " WARN: retried"; } else if (TestFlagAny(kFlagSend)) { os << " FAIL: " - << Rtools::Flags2String(fFlags&(kFlagErrNak|kFlagErrMiss| - kFlagErrCmd|kFlagErrCrc), + << Rtools::Flags2String(fFlags&(kFlagErrNak|kFlagErrDec), FlagNames(),','); } else { os << " PEND"; @@ -429,10 +413,10 @@ void RlinkCommand::Dump(std::ostream& os, int ind, const char* text) const << " " << CommandName(Command()) << endl; os << bl << " fAddress: " << RosPrintBvi(fAddress,0) << endl; os << bl << " fData: " << RosPrintBvi(fData,0) << endl; - os << bl << " fBlock.size: " << RosPrintf(fBlock.size(),"d",3) << endl; + os << bl << " fBlock.size: " << RosPrintf(fBlock.size(),"d",4) << endl; os << bl << " fpBlockExt: " << fpBlockExt << endl; - os << bl << " fBlockExtSize: " << RosPrintf(fBlockExtSize,"d",3) << endl; - os << bl << " fStatRequest: " << RosPrintBvi(fStatRequest,0) << endl; + os << bl << " fBlockExtSize: " << RosPrintf(fBlockExtSize,"d",4) << endl; + os << bl << " fBlockDone: " << RosPrintf(fBlockDone,"d",4) << endl; os << bl << " fStatus: " << RosPrintBvi(fStatus,0) << endl; os << bl << " fFlags: " << RosPrintBvi(fFlags,16,24) << " " << Rtools::Flags2String(fFlags, FlagNames()) << endl; @@ -457,7 +441,7 @@ void RlinkCommand::Dump(std::ostream& os, int ind, const char* text) const const char* RlinkCommand::CommandName(uint8_t cmd) { static const char* cmdname[8] = {"rreg","rblk","wreg","wblk", - "stat","attn","init","????"}; + "labo","attn","init","????"}; return cmdname[cmd&0x7]; } @@ -471,14 +455,11 @@ const Retro::RflagName* RlinkCommand::FlagNames() static Retro::RflagName fnam[] = { {kFlagChkData, "ChkData"}, {kFlagChkStat, "ChkStat"}, - {kFlagErrCrc, "ErrCrc"}, - {kFlagErrCmd, "ErrCmd"}, - {kFlagErrMiss, "ErrMiss"}, + {kFlagErrDec, "ErrDec"}, {kFlagErrNak, "ErrNak"}, - {kFlagResend, "Resend"}, - {kFlagRecov, "Recov"}, {kFlagPktEnd, "PktEnd"}, {kFlagPktBeg, "PktBeg"}, + {kFlagLabo, "Labo"}, {kFlagDone, "Done"}, {kFlagSend, "Send"}, {kFlagInit, "Init"}, @@ -499,7 +480,7 @@ RlinkCommand& RlinkCommand::operator=(const RlinkCommand& rhs) fBlock = rhs.fBlock; fpBlockExt = rhs.fpBlockExt; fBlockExtSize = rhs.fBlockExtSize; - fStatRequest = rhs.fStatRequest; + fBlockDone = rhs.fBlockDone; fStatus = rhs.fStatus; fFlags = rhs.fFlags; fRcvSize = rhs.fRcvSize; diff --git a/tools/src/librlink/RlinkCommand.hpp b/tools/src/librlink/RlinkCommand.hpp index ba75057c..ed75fec7 100644 --- a/tools/src/librlink/RlinkCommand.hpp +++ b/tools/src/librlink/RlinkCommand.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkCommand.hpp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RlinkCommand.hpp 609 2014-12-07 19:35:25Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-06 609 1.2 new rlink v4 iface // 2013-05-06 495 1.0.1 add RlinkContext to Print() args; drop oper<<() // 2011-03-27 374 1.0 Initial version // 2011-01-09 354 0.1 First draft @@ -21,7 +22,7 @@ /*! \file - \version $Id: RlinkCommand.hpp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RlinkCommand.hpp 609 2014-12-07 19:35:25Z mueller $ \brief Declaration of class RlinkCommand. */ @@ -47,7 +48,7 @@ namespace Retro { public: RlinkCommand(); RlinkCommand(const RlinkCommand& rhs); - ~RlinkCommand(); + ~RlinkCommand(); void CmdRreg(uint16_t addr); void CmdRblk(uint16_t addr, size_t size); @@ -55,7 +56,7 @@ namespace Retro { void CmdWreg(uint16_t addr, uint16_t data); void CmdWblk(uint16_t addr, const std::vector& block); void CmdWblk(uint16_t addr, const uint16_t* pblock, size_t size); - void CmdStat(); + void CmdLabo(); void CmdAttn(); void CmdInit(uint16_t addr, uint16_t data); @@ -66,7 +67,7 @@ namespace Retro { void SetBlockWrite(const std::vector& block); void SetBlockRead(size_t size) ; void SetBlockExt(uint16_t* pblock, size_t size); - void SetStatRequest(uint8_t ccmd); + void SetBlockDone(uint16_t dcnt); void SetStatus(uint8_t stat); void SetFlagBit(uint32_t mask); void ClearFlagBit(uint32_t mask); @@ -83,7 +84,7 @@ namespace Retro { uint16_t* BlockPointer(); const uint16_t* BlockPointer() const; size_t BlockSize() const; - uint8_t StatRequest() const; + size_t BlockDone() const; uint8_t Status() const; uint32_t Flags() const; bool TestFlagAny(uint32_t mask) const; @@ -106,43 +107,31 @@ namespace Retro { static const uint8_t kCmdRblk = 1; //!< command code read block static const uint8_t kCmdWreg = 2; //!< command code write register static const uint8_t kCmdWblk = 3; //!< command code write block - static const uint8_t kCmdStat = 4; //!< command code get status + static const uint8_t kCmdLabo = 4; //!< command code list abort static const uint8_t kCmdAttn = 5; //!< command code get attention static const uint8_t kCmdInit = 6; //!< command code send initialize static const uint32_t kFlagInit = 1u<<0; //!< cmd,addr,data setup static const uint32_t kFlagSend = 1u<<1; //!< command send static const uint32_t kFlagDone = 1u<<2; //!< command done + static const uint32_t kFlagLabo = 1u<<3; //!< command labo'ed static const uint32_t kFlagPktBeg = 1u<<4; //!< command first in packet static const uint32_t kFlagPktEnd = 1u<<5; //!< command last in packet - static const uint32_t kFlagRecov = 1u<<6; //!< command stat recovered - static const uint32_t kFlagResend = 1u<<7; //!< command resend recovered static const uint32_t kFlagErrNak = 1u<<8; //!< error: nak abort - static const uint32_t kFlagErrMiss= 1u<<9; //!< error: missing data - static const uint32_t kFlagErrCmd = 1u<<10; //!< error: cmd or nblk check - static const uint32_t kFlagErrCrc = 1u<<11; //!< error: crc check + static const uint32_t kFlagErrDec = 1u<<9; //!< error: decode error static const uint32_t kFlagChkStat= 1u<<12; //!< stat expect check failed static const uint32_t kFlagChkData= 1u<<13; //!< data expect check failed - static const uint32_t kFlagVol = 1u<<16; //!< volatile - - static const uint8_t kStat_M_Stat = 0xe0; //!< stat: external stat bits - static const uint8_t kStat_V_Stat = 5; - static const uint8_t kStat_B_Stat = 0x07; - static const uint8_t kStat_M_Attn = kBBit04;//!< stat: attn flags set - static const uint8_t kStat_M_Cerr = kBBit03;//!< stat: attn flags set - static const uint8_t kStat_M_Derr = kBBit02;//!< stat: attn flags set + static const uint8_t kStat_M_Stat = 0xf0; //!< stat: external stat bits + static const uint8_t kStat_V_Stat = 4; + static const uint8_t kStat_B_Stat = 0x0f; + static const uint8_t kStat_M_Attn = kBBit03;//!< stat: attn flags set static const uint8_t kStat_M_RbNak = kBBit01;//!< stat: attn flags set static const uint8_t kStat_M_RbErr = kBBit00;//!< stat: attn flags set - static const uint16_t kRbaddr_IInt = 0xff; //!< iint: rbus address - static const uint16_t kIInt_M_AnEna = kWBit15;//!< iint: attn notify - static const uint16_t kIInt_M_ItoEna= kWBit14;//!< iint: attn/idle timeout - static const uint16_t kIInt_M_ItoVal= 0x00ff; //!< iint: attn/idle timeout - protected: void SetCmdSimple(uint8_t cmd, uint16_t addr, uint16_t data); @@ -153,7 +142,7 @@ namespace Retro { std::vector fBlock; //!< data vector for blk commands uint16_t* fpBlockExt; //!< external data for blk commands size_t fBlockExtSize; //!< transfer size if data external - uint8_t fStatRequest; //!< stat command ccmd return field + size_t fBlockDone; //!< valid transfer count uint8_t fStatus; //!< rlink command status uint32_t fFlags; //!< state bits size_t fRcvSize; //!< receive size for command diff --git a/tools/src/librlink/RlinkCommand.ipp b/tools/src/librlink/RlinkCommand.ipp index a2cd7c3a..c5a7d2d6 100644 --- a/tools/src/librlink/RlinkCommand.ipp +++ b/tools/src/librlink/RlinkCommand.ipp @@ -1,6 +1,6 @@ -// $Id: RlinkCommand.ipp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RlinkCommand.ipp 600 2014-11-02 22:33:02Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-02 600 1.2 new rlink v4 iface // 2013-05-06 495 1.0.1 add RlinkContext to Print() args; drop oper<<() // 2011-03-27 374 1.0 Initial version // 2011-01-15 355 0.1 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: RlinkCommand.ipp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RlinkCommand.ipp 600 2014-11-02 22:33:02Z mueller $ \brief Implemenation (inline) of class RlinkCommand. */ @@ -48,9 +49,9 @@ inline void RlinkCommand::CmdWreg(uint16_t addr, uint16_t data) //------------------------------------------+----------------------------------- //! FIXME_docs -inline void RlinkCommand::CmdStat() +inline void RlinkCommand::CmdLabo() { - SetCommand(kCmdStat); + SetCommand(kCmdLabo); return; } @@ -93,9 +94,9 @@ inline void RlinkCommand::SetData(uint16_t data) //------------------------------------------+----------------------------------- //! FIXME_docs -inline void RlinkCommand::SetStatRequest(uint8_t ccmd) +inline void RlinkCommand::SetBlockDone(uint16_t dcnt) { - fStatRequest = ccmd; + fBlockDone = dcnt; return; } @@ -218,9 +219,9 @@ inline size_t RlinkCommand::BlockSize() const //------------------------------------------+----------------------------------- //! FIXME_docs -inline uint8_t RlinkCommand::StatRequest() const +inline size_t RlinkCommand::BlockDone() const { - return fStatRequest; + return fBlockDone; } //------------------------------------------+----------------------------------- diff --git a/tools/src/librlink/RlinkCommandList.cpp b/tools/src/librlink/RlinkCommandList.cpp index 78e99011..013e9388 100644 --- a/tools/src/librlink/RlinkCommandList.cpp +++ b/tools/src/librlink/RlinkCommandList.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkCommandList.cpp 576 2014-08-02 12:24:28Z mueller $ +// $Id: RlinkCommandList.cpp 606 2014-11-24 07:08:51Z mueller $ // // Copyright 2011-2014 by Walter F.J. Mueller // @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 1.2 new rlink v4 iface // 2014-08-02 576 1.1 rename LastExpect->SetLastExpect // 2013-05-06 495 1.0.3 add RlinkContext to Print() args // 2013-02-03 481 1.0.2 use Rexception @@ -23,7 +24,7 @@ /*! \file - \version $Id: RlinkCommandList.cpp 576 2014-08-02 12:24:28Z mueller $ + \version $Id: RlinkCommandList.cpp 606 2014-11-24 07:08:51Z mueller $ \brief Implemenation of class RlinkCommandList. */ @@ -52,7 +53,8 @@ namespace Retro { //! Default constructor RlinkCommandList::RlinkCommandList() - : fList() + : fList(), + fLaboIndex(-1) { fList.reserve(16); // should prevent most re-alloc's } @@ -168,10 +170,10 @@ size_t RlinkCommandList::AddWblk(uint16_t addr, const uint16_t* block, //------------------------------------------+----------------------------------- //! FIXME_docs -size_t RlinkCommandList::AddStat() +size_t RlinkCommandList::AddLabo() { RlinkCommand* pcmd = new RlinkCommand(); - pcmd->CmdStat(); + pcmd->CmdLabo(); return AddCommand(pcmd); } @@ -198,19 +200,6 @@ size_t RlinkCommandList::AddInit(uint16_t addr, uint16_t data) //------------------------------------------+----------------------------------- //! FIXME_docs -void RlinkCommandList::LastVolatile() -{ - size_t ncmd = fList.size(); - if (ncmd == 0) - throw Rexception("RlinkCommandList::LastVolatile()", - "Bad state: list empty"); - fList[ncmd-1]->SetFlagBit(RlinkCommand::kFlagVol); - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - void RlinkCommandList::SetLastExpect(RlinkCommandExpect* pexp) { size_t ncmd = fList.size(); @@ -226,8 +215,9 @@ void RlinkCommandList::SetLastExpect(RlinkCommandExpect* pexp) void RlinkCommandList::Clear() { - + foreach_ (RlinkCommand* pcmd, fList) { delete pcmd; } fList.clear(); + fLaboIndex = -1; return; } @@ -252,6 +242,7 @@ void RlinkCommandList::Dump(std::ostream& os, int ind, const char* text) const RosFill bl(ind); os << bl << (text?text:"--") << "RlinkCommandList @ " << this << endl; + os << bl << " fLaboIndex: " << fLaboIndex << endl; for (size_t i=0; i // @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 1.2 new rlink v4 iface // 2014-08-02 576 1.1 rename LastExpect->SetLastExpect // 2013-05-06 495 1.0.1 add RlinkContext to Print() args; drop oper<<() // 2011-03-05 366 1.0 Initial version @@ -22,7 +23,7 @@ /*! \file - \version $Id: RlinkCommandList.hpp 576 2014-08-02 12:24:28Z mueller $ + \version $Id: RlinkCommandList.hpp 606 2014-11-24 07:08:51Z mueller $ \brief Declaration of class RlinkCommandList. */ @@ -57,13 +58,17 @@ namespace Retro { size_t AddWreg(uint16_t addr, uint16_t data); size_t AddWblk(uint16_t addr, std::vector block); size_t AddWblk(uint16_t addr, const uint16_t* block, size_t size); - size_t AddStat(); + size_t AddLabo(); size_t AddAttn(); size_t AddInit(uint16_t addr, uint16_t data); - void LastVolatile(); // deprecated !! void SetLastExpect(RlinkCommandExpect* exp); + void ClearLaboIndex(); + void SetLaboIndex(int ind); + int LaboIndex() const; + bool LaboActive() const; + void Clear(); size_t Size() const; @@ -78,7 +83,8 @@ namespace Retro { const RlinkCommand& operator[](size_t ind) const; protected: - std::vector fList; //!< vector of commands + std::vector fList; //!< vector of commands + int fLaboIndex; //!< index of active labo (-1 if no) }; } // end namespace Retro diff --git a/tools/src/librlink/RlinkCommandList.ipp b/tools/src/librlink/RlinkCommandList.ipp index c96f54d0..31cd7c3f 100644 --- a/tools/src/librlink/RlinkCommandList.ipp +++ b/tools/src/librlink/RlinkCommandList.ipp @@ -1,6 +1,6 @@ -// $Id: RlinkCommandList.ipp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RlinkCommandList.ipp 606 2014-11-24 07:08:51Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 1.2 new rlink v4 iface // 2013-05-06 495 1.0.1 add RlinkContext to Print() args; drop oper<<() // 2011-03-05 366 1.0 Initial version // 2011-01-15 355 0.1 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: RlinkCommandList.ipp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RlinkCommandList.ipp 606 2014-11-24 07:08:51Z mueller $ \brief Implemenation (inline) of class RlinkCommandList. */ @@ -31,6 +32,40 @@ namespace Retro { //------------------------------------------+----------------------------------- //! FIXME_docs +inline void RlinkCommandList::SetLaboIndex(int ind) +{ + fLaboIndex = ind; + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkCommandList::ClearLaboIndex() +{ + fLaboIndex = -1; + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline int RlinkCommandList::LaboIndex() const +{ + return fLaboIndex; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline bool RlinkCommandList::LaboActive() const +{ + return fLaboIndex >= 0; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + inline size_t RlinkCommandList::Size() const { return fList.size(); diff --git a/tools/src/librlink/RlinkConnect.cpp b/tools/src/librlink/RlinkConnect.cpp index fc3d5d01..de9f3d0c 100644 --- a/tools/src/librlink/RlinkConnect.cpp +++ b/tools/src/librlink/RlinkConnect.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkConnect.cpp 575 2014-07-27 20:55:41Z mueller $ +// $Id: RlinkConnect.cpp 611 2014-12-10 23:23:58Z mueller $ // // Copyright 2011-2014 by Walter F.J. Mueller // @@ -13,6 +13,9 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-10 611 2.0 re-organize for rlink v4 +// 2014-08-26 587 1.5 start accept rlink v4 protocol (partially...) +// 2014-08-15 583 1.4 rb_mreq addr now 16 bit // 2014-07-27 575 1.3.3 ExecPart(): increase packet tout from 5 to 15 sec // 2013-04-21 509 1.3.2 add SndAttn() method // 2013-03-01 493 1.3.1 add Server(Active..|SignalAttn)() methods @@ -29,7 +32,7 @@ /*! \file - \version $Id: RlinkConnect.cpp 575 2014-07-27 20:55:41Z mueller $ + \version $Id: RlinkConnect.cpp 611 2014-12-10 23:23:58Z mueller $ \brief Implemenation of RlinkConnect. */ @@ -58,49 +61,70 @@ using namespace std; // all method definitions in namespace Retro namespace Retro { +//------------------------------------------+----------------------------------- +// constants definitions + +const uint16_t RlinkConnect::kRbaddr_RLCNTL; +const uint16_t RlinkConnect::kRbaddr_RLSTAT; +const uint16_t RlinkConnect::kRbaddr_RLID1; +const uint16_t RlinkConnect::kRbaddr_RLID0; + +const uint16_t RlinkConnect::kRLCNTL_M_AnEna; +const uint16_t RlinkConnect::kRLCNTL_M_AtoEna; +const uint16_t RlinkConnect::kRLCNTL_M_AtoVal; + +const uint16_t RlinkConnect::kRLSTAT_V_LCmd; +const uint16_t RlinkConnect::kRLSTAT_B_LCmd; +const uint16_t RlinkConnect::kRLSTAT_M_BAbo; +const uint16_t RlinkConnect::kRLSTAT_M_RBSize; + +const uint16_t RlinkConnect::kSBCNTL_V_RLMON; +const uint16_t RlinkConnect::kSBCNTL_V_RLBMON; +const uint16_t RlinkConnect::kSBCNTL_V_RBMON; + //------------------------------------------+----------------------------------- //! Default constructor RlinkConnect::RlinkConnect() : fpPort(), fpServ(0), - fTxPkt(), - fRxPkt(), + fSndPkt(), + fRcvPkt(), fContext(), fAddrMap(), fStats(), fLogOpts(), fspLog(new RlogFile(&cout, "")), - fConnectMutex() + fConnectMutex(), + fAttnNotiPatt(0), + fTsLastAttnNoti(-1) { for (size_t i=0; i<8; i++) fSeqNumber[i] = 0; // Statistic setup fStats.Define(kStatNExec, "NExec", "Exec() calls"); - fStats.Define(kStatNSplitVol, "NSplitVol", "clist splits: Volatile"); fStats.Define(kStatNExecPart, "NExecPart", "ExecPart() calls"); fStats.Define(kStatNCmd, "NCmd", "commands executed"); fStats.Define(kStatNRreg, "NRreg", "rreg commands"); fStats.Define(kStatNRblk, "NRblk", "rblk commands"); fStats.Define(kStatNWreg, "NWreg", "wreg commands"); fStats.Define(kStatNWblk, "NWblk", "wblk commands"); - fStats.Define(kStatNStat, "NStat", "stat commands"); + fStats.Define(kStatNLabo, "NLabo", "labo commands"); fStats.Define(kStatNAttn, "NAttn", "attn commands"); fStats.Define(kStatNInit, "NInit", "init commands"); fStats.Define(kStatNRblkWord, "NRblkWord", "words rcvd with rblk"); fStats.Define(kStatNWblkWord, "NWblkWord", "words send with wblk"); fStats.Define(kStatNTxPktByt, "NTxPktByt", "Tx packet bytes send"); - fStats.Define(kStatNTxEsc, "NTxEsc", "Tx escapes"); fStats.Define(kStatNRxPktByt, "NRxPktByt", "Rx packet bytes rcvd"); - fStats.Define(kStatNRxEsc, "NRxEsc", "Rx escapes"); - fStats.Define(kStatNRxAttn, "NRxAttn", "Rx ATTN commas seen"); - fStats.Define(kStatNRxIdle, "NRxIdle", "Rx IDLE commas seen"); - fStats.Define(kStatNRxDrop, "NRxDrop", "Rx bytes droped"); fStats.Define(kStatNExpData, "NExpData", "Expect() for data defined"); fStats.Define(kStatNExpStat, "NExpStat", "Expect() for stat defined"); fStats.Define(kStatNChkData, "NChkData", "expect data failed"); fStats.Define(kStatNChkStat, "NChkStat", "expect stat failed"); fStats.Define(kStatNSndOob, "NSndOob", "SndOob() calls"); + fStats.Define(kStatNErrMiss, "NErrMiss", "decode: missing data"); + fStats.Define(kStatNErrCmd, "NErrCmd", "decode: command mismatch"); + fStats.Define(kStatNErrLen, "NErrLen", "decode: length mismatch"); + fStats.Define(kStatNErrCrc, "NErrCrc", "decode: crc mismatch"); } //------------------------------------------+----------------------------------- @@ -137,7 +161,7 @@ void RlinkConnect::Close() if (fpPort->Url().FindOpt("keep")) { RerrMsg emsg; - fTxPkt.SndKeep(fpPort.get(), emsg); + fSndPkt.SndKeep(fpPort.get(), emsg); } fpPort.reset(); @@ -146,7 +170,11 @@ void RlinkConnect::Close() } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active. +/*! + \returns \c true if server active. + */ + bool RlinkConnect::ServerActive() const { @@ -154,7 +182,10 @@ bool RlinkConnect::ServerActive() const } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active and caller is inside server thread. +/*! + \returns \c true if server active and method is called from server thread. + */ bool RlinkConnect::ServerActiveInside() const { @@ -162,7 +193,11 @@ bool RlinkConnect::ServerActiveInside() const } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active and caller is outside server thread. +/*! + \returns \c true if server active and method is called from a thread + other than the server thread. + */ bool RlinkConnect::ServerActiveOutside() const { @@ -172,15 +207,6 @@ bool RlinkConnect::ServerActiveOutside() const //------------------------------------------+----------------------------------- //! FIXME_docs -void RlinkConnect::ServerSignalAttn() -{ - if (fpServ) fpServ->SignalAttn(); - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - void RlinkConnect::lock() { fConnectMutex.lock(); @@ -219,7 +245,8 @@ bool RlinkConnect::Exec(RlinkCommandList& clist, RlinkContext& cntx, fStats.Inc(kStatNExec); - size_t ibeg = 0; + clist.ClearLaboIndex(); + size_t size = clist.Size(); for (size_t i=0; iiend || iend>=clist.Size()) - throw Rexception("RlinkConnect::ExecPart()", - "Bad args: ibeg or iend invalid"); - if (!IsOpen()) - throw Rexception("RlinkConnect::ExecPart()","Bad state: port not open"); + If a positive \a timeout is specified the method waits this long for a + valid and non-zero attention notify. - fStats.Inc(kStatNExecPart); + \param timeout maximal time to wait for input in sec. Must be >= 0. + A zero \a timeout can be used to only harvest pending + notifies without waiting for new ones. + \param[out] apat cummulative attention pattern + \param[out] emsg contains error description (mainly from port layer) - size_t nrcvtot = 0; - fTxPkt.Init(); + \returns wait time, or a negative value indicating an error: + - =0. if there was already a received and not yet harvested notify + - >0 the wait time till the nofity was received + - -1. indicates timeout (\a apat will be 0) + - -2. indicates port IO error (\a emsg will contain information) - for (size_t i=ibeg; i<=iend; i++) { - RlinkCommand& cmd = clist[i]; - uint8_t ccode = cmd.Command(); - size_t ndata = cmd.BlockSize(); - uint16_t* pdata = cmd.BlockPointer(); + \throws Rexception if called outside of an active server - fStats.Inc(kStatNCmd); + \pre ServerActiveOutside() must be \c false. - cmd.SetSeqNumber(fSeqNumber[ccode]++); - cmd.ClearFlagBit(RlinkCommand::kFlagPktBeg | RlinkCommand::kFlagPktEnd); + */ - fTxPkt.PutWithCrc(cmd.Request()); - - switch(ccode) { - case RlinkCommand::kCmdRreg: - fStats.Inc(kStatNRreg); - cmd.SetRcvSize(1+2+1+1); // rcv: cmd+data+stat+crc - fTxPkt.PutWithCrc((uint8_t)cmd.Address()); - break; - - case RlinkCommand::kCmdRblk: - fStats.Inc(kStatNRblk); - fStats.Inc(kStatNRblkWord, (double) ndata); - cmd.SetRcvSize(1+1+2*ndata+1+1); // rcv: cmd+nblk+n*data+stat+crc - fTxPkt.PutWithCrc((uint8_t)cmd.Address()); - fTxPkt.PutWithCrc((uint8_t)(ndata-1)); - break; - - case RlinkCommand::kCmdWreg: - fStats.Inc(kStatNWreg); - cmd.SetRcvSize(1+1+1); // rcv: cmd+stat+crc - fTxPkt.PutWithCrc((uint8_t)cmd.Address()); - fTxPkt.PutWithCrc(cmd.Data()); - break; - - case RlinkCommand::kCmdWblk: - fStats.Inc(kStatNWblk); - fStats.Inc(kStatNWblkWord, (double) ndata); - cmd.SetRcvSize(1+1+1); // rcv: cmd+stat+crc - fTxPkt.PutWithCrc((uint8_t)cmd.Address()); - fTxPkt.PutWithCrc((uint8_t)(ndata-1)); - fTxPkt.PutCrc(); - for (size_t j=0; j0) fStats.Inc(kStatNExpData); - if (expect.StatusIsChecked()) fStats.Inc(kStatNExpStat); - - if (ccode==RlinkCommand::kCmdRreg || ccode==RlinkCommand::kCmdStat || - ccode==RlinkCommand::kCmdAttn) { - if (!expect.DataCheck(cmd.Data())) { - fStats.Inc(kStatNChkData); - cmd.SetFlagBit(RlinkCommand::kFlagChkData); - } - } else if (ccode==RlinkCommand::kCmdRblk) { - size_t nerr = expect.BlockCheck(cmd.BlockPointer(), cmd.BlockSize()); - if (nerr != 0) { - fStats.Inc(kStatNChkData); - cmd.SetFlagBit(RlinkCommand::kFlagChkData); - } - } - if (!expect.StatusCheck(cmd.Status())) { - fStats.Inc(kStatNChkStat); - cmd.SetFlagBit(RlinkCommand::kFlagChkStat); - } - - } else { // no expect, use context - if (!cntx.StatusCheck(cmd.Status())) { - fStats.Inc(kStatNChkStat); - cmd.SetFlagBit(RlinkCommand::kFlagChkStat); - } - } - - } - - // FIXME_code: add proper error handling... - if (ncmd != iend-ibeg+1) { - if (etxt == 0) etxt = "not all commands processed"; - emsg.Init("RlinkConnect::ExecPart", etxt); - return false; - } - - return true; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -double RlinkConnect::WaitAttn(double timeout, RerrMsg& emsg) +double RlinkConnect::WaitAttn(double timeout, uint16_t& apat, RerrMsg& emsg) { if (ServerActiveOutside()) throw Rexception("RlinkConnect::WaitAttn()", - "not allowed outside avtice server"); + "not allowed outside active server"); - double rval = fRxPkt.WaitAttn(fpPort.get(), timeout, emsg); - fStats.Inc(kStatNRxAttn , double(fRxPkt.Nattn())); - fStats.Inc(kStatNRxIdle , double(fRxPkt.Nidle())); - fStats.Inc(kStatNRxDrop , double(fRxPkt.Ndrop())); - return rval; -} + apat = 0; -//------------------------------------------+----------------------------------- -//! FIXME_docs + boost::lock_guard lock(*this); -int RlinkConnect::PollAttn(RerrMsg& emsg) -{ - if (ServerActiveOutside()) - throw Rexception("RlinkConnect::PollAttn()", - "not allowed outside avtice server"); - - int rval = fRxPkt.PollAttn(fpPort.get(), emsg); - fStats.Inc(kStatNRxAttn , double(fRxPkt.Nattn())); - fStats.Inc(kStatNRxIdle , double(fRxPkt.Nidle())); - fStats.Inc(kStatNRxDrop , double(fRxPkt.Ndrop())); - return rval; + // harvest pending notifiers + if (fAttnNotiPatt != 0) { + apat = fAttnNotiPatt; + fAttnNotiPatt = 0; + return 0.; + } + + // quit if poll only (zero timeout) + if (timeout == 0.) return -1.; + + // wait for new notifier + double tnow = Rtools::TimeOfDayAsDouble(); + double tend = tnow + timeout; + double tbeg = tnow; + + while (tnow < tend) { + int irc = fRcvPkt.ReadData(fpPort.get(), tend-tnow, emsg); + if (irc == RlinkPort::kTout) return -1.; + if (irc == RlinkPort::kErr) return -2.; + tnow = Rtools::TimeOfDayAsDouble(); + while (fRcvPkt.ProcessData()) { + int irc = fRcvPkt.PacketState(); + if (irc == RlinkPacketBufRcv::kPktPend) break; + if (irc == RlinkPacketBufRcv::kPktAttn) { + ProcessAttnNotify(); + if (fAttnNotiPatt != 0) { + apat = fAttnNotiPatt; + fAttnNotiPatt = 0; + return tnow - tbeg; + } + } else { + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "WaitAttn: dropped spurious packet"; + fRcvPkt.AcceptPacket(); + } + + } // while (fRcvPkt.ProcessData()) + } // while (tnow < tend) + + return -1; } //------------------------------------------+----------------------------------- @@ -578,7 +426,7 @@ bool RlinkConnect::SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg) { boost::lock_guard lock(*this); fStats.Inc(kStatNSndOob); - return fTxPkt.SndOob(fpPort.get(), addr, data, emsg); + return fSndPkt.SndOob(fpPort.get(), addr, data, emsg); } //------------------------------------------+----------------------------------- @@ -587,7 +435,7 @@ bool RlinkConnect::SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg) bool RlinkConnect::SndAttn(RerrMsg& emsg) { boost::lock_guard lock(*this); - return fTxPkt.SndAttn(fpPort.get(), emsg); + return fSndPkt.SndAttn(fpPort.get(), emsg); } //------------------------------------------+----------------------------------- @@ -659,8 +507,8 @@ void RlinkConnect::Dump(std::ostream& os, int ind, const char* text) const for (size_t i=0; i<8; i++) os << RosPrintBvi(fSeqNumber[i],16) << " "; os << endl; - fTxPkt.Dump(os, ind+2, "fTxPkt: "); - fRxPkt.Dump(os, ind+2, "fRxPkt: "); + fSndPkt.Dump(os, ind+2, "fSndPkt: "); + fRcvPkt.Dump(os, ind+2, "fRcvPkt: "); fContext.Dump(os, ind+2, "fContext: "); fAddrMap.Dump(os, ind+2, "fAddrMap: "); fStats.Dump(os, ind+2, "fStats: "); @@ -671,7 +519,489 @@ void RlinkConnect::Dump(std::ostream& os, int ind, const char* text) const os << bl << " .dumplevel " << fLogOpts.dumplevel << endl; os << bl << " .tracelevel " << fLogOpts.tracelevel << endl; fspLog->Dump(os, ind+2, "fspLog: "); + os << bl << " fAttnNotiPatt: " << RosPrintBvi(fAttnNotiPatt,16) << endl; + //FIXME_code: fTsLastAttnNoti not yet in Dump (get formatter...) + return; } +//------------------------------------------+----------------------------------- +//! Handle unsolicited data from port. +/*! + Called by RlinkServer to process unsolicited input data. Will read all + pending data from input port and process it with ProcessUnsolicitedData(). + + \throws Rexception if not called from inside of an active server + + \pre ServerActiveInside() must be \c true. + */ + +void RlinkConnect::HandleUnsolicitedData() +{ + if (!ServerActiveInside()) + throw Rexception("RlinkConnect::HandleUnsolicitedData()", + "only allowed inside active server"); + + boost::lock_guard lock(*this); + RerrMsg emsg; + int irc = fRcvPkt.ReadData(fpPort.get(), 0., emsg); + if (irc == 0) return; + if (irc < 0) { + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "HandleUnsolicitedData: IO error: " << emsg; + } + ProcessUnsolicitedData(); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkConnect::ExecPart(RlinkCommandList& clist, size_t ibeg, size_t iend, + RerrMsg& emsg, RlinkContext& cntx) +{ + if (ibeg>iend || iend>=clist.Size()) + throw Rexception("RlinkConnect::ExecPart()", + "Bad args: ibeg or iend invalid"); + if (!IsOpen()) + throw Rexception("RlinkConnect::ExecPart()","Bad state: port not open"); + + fStats.Inc(kStatNExecPart); + EncodeRequest(clist, ibeg, iend); + + // FIXME_code: handle send fail properly; + if (!fSndPkt.SndPacket(fpPort.get(), emsg)) return false; + fStats.Inc(kStatNTxPktByt, double(fSndPkt.PktSize())); + + // FIXME_code: handle recoveries + // FIXME_code: use proper value for timeout + bool ok = ReadResponse(15., emsg); + if (!ok) Rexception("RlinkConnect::ExecPart()","faulty response"); + + int ncmd = DecodeResponse(clist, ibeg, iend, cntx); + if (ncmd != int(iend-ibeg+1)) { + clist.Dump(cout); + throw Rexception("RlinkConnect::ExecPart()","incomplete response"); + } + + AcceptResponse(); + + return true; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkConnect::EncodeRequest(RlinkCommandList& clist, size_t ibeg, + size_t iend) +{ + fSndPkt.Init(); + + for (size_t i=ibeg; i<=iend; i++) { + RlinkCommand& cmd = clist[i]; + uint8_t ccode = cmd.Command(); + size_t ndata = cmd.BlockSize(); + uint16_t* pdata = cmd.BlockPointer(); + + fStats.Inc(kStatNCmd); + + cmd.SetSeqNumber(fSeqNumber[ccode]++); + cmd.ClearFlagBit(RlinkCommand::kFlagPktBeg | RlinkCommand::kFlagPktEnd); + + fSndPkt.PutWithCrc(cmd.Request()); + + switch (ccode) { + case RlinkCommand::kCmdRreg: // rreg command --------------- + fStats.Inc(kStatNRreg); + cmd.SetRcvSize(1+2+1+2); // rcv: cmd+data+stat+crc + fSndPkt.PutWithCrc(cmd.Address()); + break; + + case RlinkCommand::kCmdRblk: // rblk command --------------- + fStats.Inc(kStatNRblk); + fStats.Inc(kStatNRblkWord, (double) ndata); + cmd.SetRcvSize(1+2+2*ndata+2+1+2); // rcv: cmd+cnt+n*data+dcnt+stat+crc + fSndPkt.PutWithCrc(cmd.Address()); + fSndPkt.PutWithCrc((uint16_t)ndata); + break; + + case RlinkCommand::kCmdWreg: // wreg command --------------- + fStats.Inc(kStatNWreg); + cmd.SetRcvSize(1+1+2); // rcv: cmd+stat+crc + fSndPkt.PutWithCrc(cmd.Address()); + fSndPkt.PutWithCrc(cmd.Data()); + break; + + case RlinkCommand::kCmdWblk: // wblk command --------------- + fStats.Inc(kStatNWblk); + fStats.Inc(kStatNWblkWord, (double) ndata); + cmd.SetRcvSize(1+2+1+2); // rcv: cmd+dcnt+stat+crc + fSndPkt.PutWithCrc(cmd.Address()); + fSndPkt.PutWithCrc((uint16_t)ndata); + fSndPkt.PutCrc(); + fSndPkt.PutWithCrc(pdata, ndata); + break; + + case RlinkCommand::kCmdLabo: // labo command --------------- + fStats.Inc(kStatNLabo); + cmd.SetRcvSize(1+1+1+2); // rcv: cmd+babo+stat+crc + break; + case RlinkCommand::kCmdAttn: // attn command --------------- + fStats.Inc(kStatNAttn); + cmd.SetRcvSize(1+2+1+2); // rcv: cmd+data+stat+crc + break; + + case RlinkCommand::kCmdInit: // init command --------------- + fStats.Inc(kStatNInit); + cmd.SetRcvSize(1+1+2); // rcv: cmd+stat+crc + fSndPkt.PutWithCrc(cmd.Address()); + fSndPkt.PutWithCrc(cmd.Data()); + break; + + default: + throw Rexception("RlinkConnect::Exec()", "BugCheck: invalid command"); + } // switch (ccode) + + fSndPkt.PutCrc(); + cmd.SetFlagBit(RlinkCommand::kFlagSend); + } // for (size_t i=ibeg; i<=iend; i++) + + // FIXME_code: do we still need kFlagPktBeg,kFlagPktEnd ? + clist[ibeg].SetFlagBit(RlinkCommand::kFlagPktBeg); + clist[iend].SetFlagBit(RlinkCommand::kFlagPktEnd); + + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +int RlinkConnect::DecodeResponse(RlinkCommandList& clist, size_t ibeg, + size_t iend, RlinkContext& cntx) +{ + size_t ncmd = 0; + + for (size_t i=ibeg; i<=iend; i++) { + RlinkCommand& cmd = clist[i]; + uint8_t ccode = cmd.Command(); + uint16_t rdata; + uint8_t rdata8; + + // handle commands after an active labo + if (clist.LaboActive()) { + ncmd += 1; + cmd.SetFlagBit(RlinkCommand::kFlagDone|RlinkCommand::kFlagLabo); + continue; + } + + // FIXME_code: handle NAK properly !! + + if (!fRcvPkt.CheckSize(cmd.RcvSize())) { // not enough data for cmd + cmd.SetFlagBit(RlinkCommand::kFlagErrDec); + fStats.Inc(kStatNErrMiss); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeResponse: not enough data for cmd"; + return -1; + } + + fRcvPkt.GetWithCrc(rdata8); + if (rdata8 != cmd.Request()) { // command mismatch + cmd.SetFlagBit(RlinkCommand::kFlagErrDec); + fStats.Inc(kStatNErrCmd); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeResponse: command mismatch"; + return -1; + } + + switch (ccode) { + case RlinkCommand::kCmdRreg: // rreg command --------------- + fRcvPkt.GetWithCrc(rdata); + cmd.SetData(rdata); + break; + + case RlinkCommand::kCmdRblk: // rblk command --------------- + fRcvPkt.GetWithCrc(rdata); + if (rdata != (uint16_t)cmd.BlockSize()) { // length mismatch + cmd.SetFlagBit(RlinkCommand::kFlagErrDec); + fStats.Inc(kStatNErrLen); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeResponse: rblk length mismatch"; + return -1; + } + fRcvPkt.GetWithCrc(cmd.BlockPointer(), cmd.BlockSize()); + fRcvPkt.GetWithCrc(rdata); + cmd.SetBlockDone(rdata); + break; + + case RlinkCommand::kCmdWreg: // wreg command --------------- + break; + + case RlinkCommand::kCmdWblk: // wblk command --------------- + fRcvPkt.GetWithCrc(rdata); + cmd.SetBlockDone(rdata); + break; + + case RlinkCommand::kCmdLabo: // labo command --------------- + fRcvPkt.GetWithCrc(rdata8); + cmd.SetData((uint16_t)rdata8); + break; + + case RlinkCommand::kCmdAttn: // attn command --------------- + fRcvPkt.GetWithCrc(rdata); + cmd.SetData(rdata); + break; + + case RlinkCommand::kCmdInit: // init command --------------- + break; + } // switch (ccode) + + // crc handling + fRcvPkt.GetWithCrc(rdata8); + cmd.SetStatus(rdata8); + if (!fRcvPkt.CheckCrc()) { // crc mismatch + cmd.SetFlagBit(RlinkCommand::kFlagErrDec); + fStats.Inc(kStatNErrCrc); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeResponse: crc mismatch"; + return -1; + } + + ncmd += 1; + cmd.SetFlagBit(RlinkCommand::kFlagDone); + + // handle active labo command, here we know that crc is ok + if (ccode==RlinkCommand::kCmdLabo && cmd.Data()) { // labo active ? + clist.SetLaboIndex(i); // set index + } + + // expect handling + if (cmd.Expect()) { // expect object attached ? + RlinkCommandExpect& expect = *cmd.Expect(); + if (expect.DataIsChecked() || + expect.BlockValue().size()>0) fStats.Inc(kStatNExpData); + if (expect.StatusIsChecked()) fStats.Inc(kStatNExpStat); + + if (ccode==RlinkCommand::kCmdRreg || + ccode==RlinkCommand::kCmdLabo || + ccode==RlinkCommand::kCmdAttn) { + if (!expect.DataCheck(cmd.Data())) { + fStats.Inc(kStatNChkData); + cmd.SetFlagBit(RlinkCommand::kFlagChkData); + } + } else if (ccode==RlinkCommand::kCmdRblk) { + size_t nerr = expect.BlockCheck(cmd.BlockPointer(), cmd.BlockSize()); + if (nerr != 0) { + fStats.Inc(kStatNChkData); + cmd.SetFlagBit(RlinkCommand::kFlagChkData); + } + } + if (!expect.StatusCheck(cmd.Status())) { + fStats.Inc(kStatNChkStat); + cmd.SetFlagBit(RlinkCommand::kFlagChkStat); + } + + } else { // no expect, use context + if (!cntx.StatusCheck(cmd.Status())) { + fStats.Inc(kStatNChkStat); + cmd.SetFlagBit(RlinkCommand::kFlagChkStat); + } + } // if (cmd.Expect()) + + } // for (size_t i=ibeg; i<=iend; i++) + + // FIXME_code: check that all data is consumed !! + + return ncmd; +} + +//------------------------------------------+----------------------------------- +//! Decodes an attention notify packet. +/*! + \param[out] apat attention pattern, can be zero + \returns \c true if decode without errors, \c false otherwise + */ + +bool RlinkConnect::DecodeAttnNotify(uint16_t& apat) +{ + apat = 0; + + if (!fRcvPkt.CheckSize(2+2)) { // not enough data for data+crc + fStats.Inc(kStatNErrMiss); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeAttnNotify: not enough data for data+crc"; + return false; + } + + fRcvPkt.GetWithCrc(apat); + + if (!fRcvPkt.CheckCrc()) { // crc mismatch + fStats.Inc(kStatNErrCrc); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "DecodeAttnNotify: crc mismatch"; + return false; + } + + // FIXME_code: check for extra data + + return true; +} + +//------------------------------------------+----------------------------------- +//! Read data from port until complete response packet seen. +/*! + Any spurious data or corrupt packages, e.g. with framing errors, + are logged and discarded. + + If an attention notify packet is detected it will handled with + ProcessAttnNotify(). + + The method returns \c true if a complete response packet is received. + The caller will usually use DecodeResponse() and must accept the packet + with AcceptResponse() afterwards. + + The method returns \c false if + - no valid response packet is seen within the time given by \a timeout + - an IO error occurred + . + An appropriate log message is generated, any partial input packet discarded. + + \param timeout maximal time to wait for input in sec. Must be > 0. + \param[out] emsg contains error description (mainly from port layer) + + \returns \c true if complete response packet received + + \pre a previous response must have been accepted with AcceptResponse(). + */ + +bool RlinkConnect::ReadResponse(double timeout, RerrMsg& emsg) +{ + double tnow = Rtools::TimeOfDayAsDouble(); + double tend = tnow + timeout; + + while (tnow < tend) { + int irc = fRcvPkt.ReadData(fpPort.get(), tend-tnow, emsg); + if (irc <= 0) { + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "ReadResponse: IO error or timeout: " << emsg; + return false; + } + + while (fRcvPkt.ProcessData()) { + int irc = fRcvPkt.PacketState(); + if (irc == RlinkPacketBufRcv::kPktPend) break; + if (irc == RlinkPacketBufRcv::kPktAttn) { + ProcessAttnNotify(); + } else if (irc == RlinkPacketBufRcv::kPktResp) { + return true; + } else { + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "ReadResponse: dropped spurious packet"; + fRcvPkt.AcceptPacket(); + } + } //while (fRcvPkt.ProcessData()) + + tnow = Rtools::TimeOfDayAsDouble(); + + } // while (tnow < tend) + + { + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "ReadResponse: timeout"; + } + fRcvPkt.AcceptPacket(); + + return false; +} + +//------------------------------------------+----------------------------------- +//! Accept response packet received with ReadResponse(). +/*! + The packet buffer is cleared, and any still buffered input data is processed + with ProcessUnsolicitedData(). + */ + +void RlinkConnect::AcceptResponse() +{ + fRcvPkt.AcceptPacket(); + ProcessUnsolicitedData(); + return; +} + +//------------------------------------------+----------------------------------- +//! Process data still pending in the input buffer. +/*! + If an attention notify packet is detected it will handled with + ProcessAttnNotify(). If a response or corrupted packet is seen + it will be logged and discarded. + */ + +void RlinkConnect::ProcessUnsolicitedData() +{ + while (fRcvPkt.ProcessData()) { + int irc = fRcvPkt.PacketState(); + if (irc == RlinkPacketBufRcv::kPktPend) break; + if (irc == RlinkPacketBufRcv::kPktAttn) { + ProcessAttnNotify(); + } else { + fRcvPkt.AcceptPacket(); + RlogMsg lmsg(*fspLog, 'E'); + lmsg << "ProcessUnsolicitedData: dropped spurious packet"; + } + } + return; +} + +//------------------------------------------+----------------------------------- +//! Process attention notify packets. +/*! + The packets is decoded with DecodeAttnNotify(). If the packet is valid and + contains a non-zero attention pattern the pattern is ored to the attention + notify pattern which can later be inquired with HarvestAttnNotifies(). + Corrupt packets are logged and discarded. Notifies with a zero pattern + are silently ignored. + */ + +void RlinkConnect::ProcessAttnNotify() +{ + uint16_t apat; + bool ok = DecodeAttnNotify(apat); + fRcvPkt.AcceptPacket(); + + if (ok) { + if (apat) { + if (ServerActive()) { // if server active + fpServ->SignalAttnNotify(apat); // handle in RlinkServer + } else { // otherwise + fAttnNotiPatt |= apat; // handle in RlinkConnect + } + } else { + RlogMsg lmsg(*fspLog, 'W'); + lmsg << "ProcessAttnNotify: zero attn notify received"; + } + } + + if (ok && fLogOpts.printlevel == 3) { + RlogMsg lmsg(*fspLog, 'I'); + lmsg << "ATTN notify apat = " << RosPrintf(apat,"x0",4) + << " lams ="; + if (apat) { + char sep = ' '; + for (int i=15; i>=0; i--) { + if (apat & (uint16_t(1)< 0.) + lmsg << " dt=" << RosPrintf(now-fTsLastAttnNoti,"f",8,6); + fTsLastAttnNoti = now; + } + return; +} + + } // end namespace Retro diff --git a/tools/src/librlink/RlinkConnect.hpp b/tools/src/librlink/RlinkConnect.hpp index 903fbf5f..f8ff3aaa 100644 --- a/tools/src/librlink/RlinkConnect.hpp +++ b/tools/src/librlink/RlinkConnect.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkConnect.hpp 509 2013-04-21 20:46:20Z mueller $ +// $Id: RlinkConnect.hpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-10 611 2.0 re-organize for rlink v4 // 2013-04-21 509 1.3.3 add SndAttn() method // 2013-03-05 495 1.3.2 add Exec() without emsg (will send emsg to LogFile) // 2013-03-01 493 1.3.1 add Server(Active..|SignalAttn)() methods @@ -31,7 +32,7 @@ /*! \file - \version $Id: RlinkConnect.hpp 509 2013-04-21 20:46:20Z mueller $ + \version $Id: RlinkConnect.hpp 611 2014-12-10 23:23:58Z mueller $ \brief Declaration of class \c RlinkConnect. */ @@ -54,15 +55,18 @@ #include "RlinkPort.hpp" #include "RlinkCommandList.hpp" -#include "RlinkPacketBuf.hpp" +#include "RlinkPacketBufSnd.hpp" +#include "RlinkPacketBufRcv.hpp" #include "RlinkAddrMap.hpp" #include "RlinkContext.hpp" +#include "librtools/Rbits.hpp" + namespace Retro { class RlinkServer; // forw decl to avoid circular incl - class RlinkConnect : private boost::noncopyable { + class RlinkConnect : public Rbits, private boost::noncopyable { public: struct LogOpts { uint32_t baseaddr; @@ -93,7 +97,6 @@ namespace Retro { bool ServerActive() const; bool ServerActiveInside() const; bool ServerActiveOutside() const; - void ServerSignalAttn(); // provide boost Lockable interface void lock(); @@ -106,8 +109,7 @@ namespace Retro { bool Exec(RlinkCommandList& clist); bool Exec(RlinkCommandList& clist, RlinkContext& cntx); - double WaitAttn(double timeout, RerrMsg& emsg); - int PollAttn(RerrMsg& emsg); + double WaitAttn(double timeout, uint16_t& apat, RerrMsg& emsg); bool SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg); bool SndAttn(RerrMsg& emsg); @@ -118,6 +120,8 @@ namespace Retro { const RlinkAddrMap& AddrMap() const; const Rstats& Stats() const; + const Rstats& SndStats() const; + const Rstats& RcvStats() const; void SetLogOpts(const LogOpts& opts); const LogOpts& GetLogOpts() const; @@ -131,33 +135,52 @@ namespace Retro { void Print(std::ostream& os) const; void Dump(std::ostream& os, int ind=0, const char* text=0) const; + void HandleUnsolicitedData(); + + // some constants (also defined in cpp) + static const uint16_t kRbaddr_RLCNTL = 0xffff; //!< rlink core reg RLCNTL + static const uint16_t kRbaddr_RLSTAT = 0xfffe; //!< rlink core reg RLSTAT + static const uint16_t kRbaddr_RLID1 = 0xfffd; //!< rlink core reg RLID1 + static const uint16_t kRbaddr_RLID0 = 0xfffc; //!< rlink core reg RLID0 + + static const uint16_t kRLCNTL_M_AnEna = kWBit15;//!< RLCNTL: an enable + static const uint16_t kRLCNTL_M_AtoEna= kWBit14;//!< RLCNTL: ato enable + static const uint16_t kRLCNTL_M_AtoVal= 0x00ff; //!< RLCNTL: ato value + + static const uint16_t kRLSTAT_V_LCmd = 8; //!< RLSTAT: lcmd + static const uint16_t kRLSTAT_B_LCmd = 0x00ff; //!< RLSTAT: lcmd + static const uint16_t kRLSTAT_M_BAbo = kWBit07;//!< RLSTAT: babo + static const uint16_t kRLSTAT_M_RBSize= 0x0007; //!< RLSTAT: rbuf size + + static const uint16_t kSBCNTL_V_RLMON = 15; //!< SBCNTL: rlmon enable bit + static const uint16_t kSBCNTL_V_RLBMON= 14; //!< SBCNTL: rlbmon enable bit + static const uint16_t kSBCNTL_V_RBMON = 13; //!< SBCNTL: rbmon enable bit + // statistics counter indices enum stats { - kStatNExec = 0, - kStatNSplitVol, - kStatNExecPart, - kStatNCmd, - kStatNRreg, - kStatNRblk, - kStatNWreg, - kStatNWblk, - kStatNStat, - kStatNAttn, - kStatNInit, - kStatNRblkWord, - kStatNWblkWord, - kStatNTxPktByt, - kStatNTxEsc, - kStatNRxPktByt, - kStatNRxEsc, - kStatNRxAttn, - kStatNRxIdle, - kStatNRxDrop, - kStatNExpData, - kStatNExpStat, - kStatNChkData, - kStatNChkStat, - kStatNSndOob, + kStatNExec = 0, //!< Exec() calls + kStatNExecPart, //!< ExecPart() calls + kStatNCmd, //!< commands executed + kStatNRreg, //!< rreg commands + kStatNRblk, //!< rblk commands + kStatNWreg, //!< wreg commands + kStatNWblk, //!< wblk commands + kStatNLabo, //!< labo commands + kStatNAttn, //!< attn commands + kStatNInit, //!< init commands + kStatNRblkWord, //!< words rcvd with rblk + kStatNWblkWord, //!< words send with wblk + kStatNTxPktByt, //!< Tx packet bytes send + kStatNRxPktByt, //!< Rx packet bytes rcvd + kStatNExpData, //!< Expect() for data defined + kStatNExpStat, //!< Expect() for stat defined" + kStatNChkData, //!< expect data failed + kStatNChkStat, //!< expect stat failed + kStatNSndOob, //!< SndOob() calls + kStatNErrMiss, //!< decode: missing data + kStatNErrCmd, //!< decode: command mismatch + kStatNErrLen, //!< decode: length mismatch + kStatNErrCrc, //!< decode: crc mismatch kDimStat }; @@ -165,18 +188,30 @@ namespace Retro { bool ExecPart(RlinkCommandList& clist, size_t ibeg, size_t iend, RerrMsg& emsg, RlinkContext& cntx); + void EncodeRequest(RlinkCommandList& clist, size_t ibeg, + size_t iend); + int DecodeResponse(RlinkCommandList& clist, size_t ibeg, + size_t iend, RlinkContext& cntx); + bool DecodeAttnNotify(uint16_t& apat); + bool ReadResponse(double timeout, RerrMsg& emsg); + void AcceptResponse(); + void ProcessUnsolicitedData(); + void ProcessAttnNotify(); + protected: boost::scoped_ptr fpPort; //!< ptr to port RlinkServer* fpServ; //!< ptr to server (optional) uint8_t fSeqNumber[8]; //!< command sequence number - RlinkPacketBuf fTxPkt; //!< transmit packet buffer - RlinkPacketBuf fRxPkt; //!< receive packet buffer + RlinkPacketBufSnd fSndPkt; //!< send packet buffer + RlinkPacketBufRcv fRcvPkt; //!< receive packet buffer RlinkContext fContext; //!< default context RlinkAddrMap fAddrMap; //!< name<->address mapping Rstats fStats; //!< statistics LogOpts fLogOpts; //!< log options boost::shared_ptr fspLog; //!< log file ptr boost::recursive_mutex fConnectMutex; //!< mutex to lock whole connect + uint16_t fAttnNotiPatt; //!< attn notifier pattern + double fTsLastAttnNoti; //!< time stamp last attn notify }; } // end namespace Retro diff --git a/tools/src/librlink/RlinkConnect.ipp b/tools/src/librlink/RlinkConnect.ipp index 5ee6eae0..cde292a5 100644 --- a/tools/src/librlink/RlinkConnect.ipp +++ b/tools/src/librlink/RlinkConnect.ipp @@ -1,4 +1,4 @@ -// $Id: RlinkConnect.ipp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RlinkConnect.ipp 604 2014-11-16 22:33:09Z mueller $ // // Copyright 2011-2013 by Walter F.J. Mueller // @@ -24,7 +24,7 @@ /*! \file - \version $Id: RlinkConnect.ipp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RlinkConnect.ipp 604 2014-11-16 22:33:09Z mueller $ \brief Implemenation (inline) of RlinkConnect. */ @@ -137,6 +137,22 @@ inline const Rstats& RlinkConnect::Stats() const //------------------------------------------+----------------------------------- //! FIXME_docs +inline const Rstats& RlinkConnect::SndStats() const +{ + return fSndPkt.Stats(); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline const Rstats& RlinkConnect::RcvStats() const +{ + return fRcvPkt.Stats(); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + inline const RlinkConnect::LogOpts& RlinkConnect::GetLogOpts() const { return fLogOpts; diff --git a/tools/src/librlink/RlinkCrc16.cpp b/tools/src/librlink/RlinkCrc16.cpp new file mode 100644 index 00000000..cccd3b62 --- /dev/null +++ b/tools/src/librlink/RlinkCrc16.cpp @@ -0,0 +1,76 @@ +// $Id: RlinkCrc16.cpp 602 2014-11-08 21:42:47Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-08 602 1.0 Initial version +// --------------------------------------------------------------------------- + +/*! + \file + \version $Id: RlinkCrc16.cpp 602 2014-11-08 21:42:47Z mueller $ + \brief Implemenation of class RlinkCrc16. + */ + +#include "RlinkCrc16.hpp" + +using namespace std; + +/*! + \class Retro::RlinkCrc16 + \brief FIXME_docs +*/ + +// all method definitions in namespace Retro +namespace Retro { + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +const uint16_t RlinkCrc16::fCrc16Table[256] = +{ + 0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, + 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935, + 4657, 528, 12915, 8786, 21173, 17044, 29431, 25302, + 37689, 33560, 45947, 41818, 54205, 50076, 62463, 58334, + 9314, 13379, 1056, 5121, 25830, 29895, 17572, 21637, + 42346, 46411, 34088, 38153, 58862, 62927, 50604, 54669, + 13907, 9842, 5649, 1584, 30423, 26358, 22165, 18100, + 46939, 42874, 38681, 34616, 63455, 59390, 55197, 51132, + 18628, 22757, 26758, 30887, 2112, 6241, 10242, 14371, + 51660, 55789, 59790, 63919, 35144, 39273, 43274, 47403, + 23285, 19156, 31415, 27286, 6769, 2640, 14899, 10770, + 56317, 52188, 64447, 60318, 39801, 35672, 47931, 43802, + 27814, 31879, 19684, 23749, 11298, 15363, 3168, 7233, + 60846, 64911, 52716, 56781, 44330, 48395, 36200, 40265, + 32407, 28342, 24277, 20212, 15891, 11826, 7761, 3696, + 65439, 61374, 57309, 53244, 48923, 44858, 40793, 36728, + 37256, 33193, 45514, 41451, 53516, 49453, 61774, 57711, + 4224, 161, 12482, 8419, 20484, 16421, 28742, 24679, + 33721, 37784, 41979, 46042, 49981, 54044, 58239, 62302, + 689, 4752, 8947, 13010, 16949, 21012, 25207, 29270, + 46570, 42443, 38312, 34185, 62830, 58703, 54572, 50445, + 13538, 9411, 5280, 1153, 29798, 25671, 21540, 17413, + 42971, 47098, 34713, 38840, 59231, 63358, 50973, 55100, + 9939, 14066, 1681, 5808, 26199, 30326, 17941, 22068, + 55628, 51565, 63758, 59695, 39368, 35305, 47498, 43435, + 22596, 18533, 30726, 26663, 6336, 2273, 14466, 10403, + 52093, 56156, 60223, 64286, 35833, 39896, 43963, 48026, + 19061, 23124, 27191, 31254, 2801, 6864, 10931, 14994, + 64814, 60687, 56684, 52557, 48554, 44427, 40424, 36297, + 31782, 27655, 23652, 19525, 15522, 11395, 7392, 3265, + 61215, 65342, 53085, 57212, 44955, 49082, 36825, 40952, + 28183, 32310, 20053, 24180, 11923, 16050, 3793, 7920 +}; + +} // end namespace Retro diff --git a/tools/src/librlink/RlinkCrc8.hpp b/tools/src/librlink/RlinkCrc16.hpp similarity index 56% rename from tools/src/librlink/RlinkCrc8.hpp rename to tools/src/librlink/RlinkCrc16.hpp index 4f909fa4..5b0df632 100644 --- a/tools/src/librlink/RlinkCrc8.hpp +++ b/tools/src/librlink/RlinkCrc16.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkCrc8.hpp 486 2013-02-10 22:34:43Z mueller $ +// $Id: RlinkCrc16.hpp 602 2014-11-08 21:42:47Z mueller $ // -// Copyright 2011- by Walter F.J. Mueller +// Copyright 2014- by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,42 +13,41 @@ // // Revision History: // Date Rev Version Comment -// 2011-02-27 365 1.0 Initial version -// 2011-01-15 355 0.1 First draft +// 2014-11-08 602 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RlinkCrc8.hpp 486 2013-02-10 22:34:43Z mueller $ - \brief Declaration of class \c RlinkCrc8. + \version $Id: RlinkCrc16.hpp 602 2014-11-08 21:42:47Z mueller $ + \brief Declaration of class \c RlinkCrc16. */ -#ifndef included_Retro_RlinkCrc8 -#define included_Retro_RlinkCrc8 1 +#ifndef included_Retro_RlinkCrc16 +#define included_Retro_RlinkCrc16 1 #include #include namespace Retro { - class RlinkCrc8 { + class RlinkCrc16 { public: - RlinkCrc8(); - ~RlinkCrc8(); + RlinkCrc16(); + ~RlinkCrc16(); void Clear(); void AddData(uint8_t data); - uint8_t Crc() const; + uint16_t Crc() const; protected: - uint8_t fCrc; //!< current crc value - static const uint8_t fCrc8Table[256]; // doxed in cpp + uint16_t fCrc; //!< current crc value + static const uint16_t fCrc16Table[256]; // doxed in cpp }; } // end namespace Retro -#include "RlinkCrc8.ipp" +#include "RlinkCrc16.ipp" #endif diff --git a/tools/src/librlink/RlinkCrc8.ipp b/tools/src/librlink/RlinkCrc16.ipp similarity index 70% rename from tools/src/librlink/RlinkCrc8.ipp rename to tools/src/librlink/RlinkCrc16.ipp index bfca72f6..6f093095 100644 --- a/tools/src/librlink/RlinkCrc8.ipp +++ b/tools/src/librlink/RlinkCrc16.ipp @@ -1,6 +1,6 @@ -// $Id: RlinkCrc8.ipp 488 2013-02-16 18:49:47Z mueller $ +// $Id: RlinkCrc16.ipp 602 2014-11-08 21:42:47Z mueller $ // -// Copyright 2011- by Walter F.J. Mueller +// Copyright 2014- by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,14 +13,13 @@ // // Revision History: // Date Rev Version Comment -// 2011-02-27 365 1.0 Initial version -// 2011-01-15 355 0.1 First draft +// 2014-11-08 602 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RlinkCrc8.ipp 488 2013-02-16 18:49:47Z mueller $ - \brief Implemenation (inline) of class RlinkCrc8. + \version $Id: RlinkCrc16.ipp 602 2014-11-08 21:42:47Z mueller $ + \brief Implemenation (inline) of class RlinkCrc16. */ // all method definitions in namespace Retro @@ -29,20 +28,20 @@ namespace Retro { //------------------------------------------+----------------------------------- //! Default constructor -inline RlinkCrc8::RlinkCrc8() +inline RlinkCrc16::RlinkCrc16() : fCrc(0) {} //------------------------------------------+----------------------------------- //! Destructor -inline RlinkCrc8::~RlinkCrc8() +inline RlinkCrc16::~RlinkCrc16() {} //------------------------------------------+----------------------------------- //! FIXME_docs -inline void RlinkCrc8::Clear() +inline void RlinkCrc16::Clear() { fCrc = 0; return; @@ -51,16 +50,17 @@ inline void RlinkCrc8::Clear() //------------------------------------------+----------------------------------- //! FIXME_docs -inline void RlinkCrc8::AddData(uint8_t data) +inline void RlinkCrc16::AddData(uint8_t data) { - fCrc = fCrc8Table[fCrc ^ data]; + uint8_t tmp = ((uint8_t)(fCrc>>8)) ^ data; + fCrc = (fCrc<<8) ^ fCrc16Table[tmp]; return; } //------------------------------------------+----------------------------------- //! FIXME_docs -inline uint8_t RlinkCrc8::Crc() const +inline uint16_t RlinkCrc16::Crc() const { return fCrc; } diff --git a/tools/src/librlink/RlinkCrc8.cpp b/tools/src/librlink/RlinkCrc8.cpp deleted file mode 100644 index a82fa4e1..00000000 --- a/tools/src/librlink/RlinkCrc8.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// $Id: RlinkCrc8.cpp 488 2013-02-16 18:49:47Z mueller $ -// -// Copyright 2011- by Walter F.J. Mueller -// -// This program is free software; you may redistribute 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. -// -// 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 complete details. -// -// Revision History: -// Date Rev Version Comment -// 2011-09-17 410 1.1 use now a6 polynomial for crc8 -// 2011-02-27 365 1.0 Initial version -// 2011-01-15 355 0.1 First draft -// --------------------------------------------------------------------------- - -/*! - \file - \version $Id: RlinkCrc8.cpp 488 2013-02-16 18:49:47Z mueller $ - \brief Implemenation of class RlinkCrc8. - */ - -#include "RlinkCrc8.hpp" - -using namespace std; - -/*! - \class Retro::RlinkCrc8 - \brief FIXME_docs -*/ - -// all method definitions in namespace Retro -namespace Retro { - -//------------------------------------------+----------------------------------- -//! FIXME_docs -// from gen_crc8_tbl - -const uint8_t RlinkCrc8::fCrc8Table[256] = -{ - 0, 77, 154, 215, 121, 52, 227, 174, // from gen_crc8_tbl - 242, 191, 104, 37, 139, 198, 17, 92, - 169, 228, 51, 126, 208, 157, 74, 7, - 91, 22, 193, 140, 34, 111, 184, 245, - 31, 82, 133, 200, 102, 43, 252, 177, - 237, 160, 119, 58, 148, 217, 14, 67, - 182, 251, 44, 97, 207, 130, 85, 24, - 68, 9, 222, 147, 61, 112, 167, 234, - 62, 115, 164, 233, 71, 10, 221, 144, - 204, 129, 86, 27, 181, 248, 47, 98, - 151, 218, 13, 64, 238, 163, 116, 57, - 101, 40, 255, 178, 28, 81, 134, 203, - 33, 108, 187, 246, 88, 21, 194, 143, - 211, 158, 73, 4, 170, 231, 48, 125, - 136, 197, 18, 95, 241, 188, 107, 38, - 122, 55, 224, 173, 3, 78, 153, 212, - 124, 49, 230, 171, 5, 72, 159, 210, - 142, 195, 20, 89, 247, 186, 109, 32, - 213, 152, 79, 2, 172, 225, 54, 123, - 39, 106, 189, 240, 94, 19, 196, 137, - 99, 46, 249, 180, 26, 87, 128, 205, - 145, 220, 11, 70, 232, 165, 114, 63, - 202, 135, 80, 29, 179, 254, 41, 100, - 56, 117, 162, 239, 65, 12, 219, 150, - 66, 15, 216, 149, 59, 118, 161, 236, - 176, 253, 42, 103, 201, 132, 83, 30, - 235, 166, 113, 60, 146, 223, 8, 69, - 25, 84, 131, 206, 96, 45, 250, 183, - 93, 16, 199, 138, 36, 105, 190, 243, - 175, 226, 53, 120, 214, 155, 76, 1, - 244, 185, 110, 35, 141, 192, 23, 90, - 6, 75, 156, 209, 127, 50, 229, 168 -}; - -} // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBuf.cpp b/tools/src/librlink/RlinkPacketBuf.cpp index 0056ba46..d5814e11 100644 --- a/tools/src/librlink/RlinkPacketBuf.cpp +++ b/tools/src/librlink/RlinkPacketBuf.cpp @@ -1,6 +1,6 @@ -// $Id: RlinkPacketBuf.cpp 509 2013-04-21 20:46:20Z mueller $ +// $Id: RlinkPacketBuf.cpp 606 2014-11-24 07:08:51Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 2.0 re-organize for rlink v4 // 2013-04-21 509 1.0.4 add SndAttn() method // 2013-02-03 481 1.0.3 use Rexception // 2013-01-13 474 1.0.2 add PollAttn() method @@ -23,21 +24,15 @@ /*! \file - \version $Id: RlinkPacketBuf.cpp 509 2013-04-21 20:46:20Z mueller $ + \version $Id: RlinkPacketBuf.cpp 606 2014-11-24 07:08:51Z mueller $ \brief Implemenation of class RlinkPacketBuf. */ -#include - -// debug -#include - #include "RlinkPacketBuf.hpp" #include "librtools/RosFill.hpp" #include "librtools/RosPrintf.hpp" #include "librtools/RosPrintBvi.hpp" -#include "librtools/Rexception.hpp" using namespace std; @@ -56,33 +51,34 @@ const uint32_t RlinkPacketBuf::kFlagSopSeen; const uint32_t RlinkPacketBuf::kFlagEopSeen; const uint32_t RlinkPacketBuf::kFlagNakSeen; const uint32_t RlinkPacketBuf::kFlagAttnSeen; -const uint32_t RlinkPacketBuf::kFlagTout; -const uint32_t RlinkPacketBuf::kFlagDatDrop; -const uint32_t RlinkPacketBuf::kFlagDatMiss; +const uint32_t RlinkPacketBuf::kFlagErrTout; +const uint32_t RlinkPacketBuf::kFlagErrIO; +const uint32_t RlinkPacketBuf::kFlagErrFrame; +const uint32_t RlinkPacketBuf::kFlagErrClobber; -const uint8_t RlinkPacketBuf::kCPREF; -const uint8_t RlinkPacketBuf::kNCOMM; -const uint8_t RlinkPacketBuf::kCommaIdle; -const uint8_t RlinkPacketBuf::kCommaSop; -const uint8_t RlinkPacketBuf::kCommaEop; -const uint8_t RlinkPacketBuf::kCommaNak; -const uint8_t RlinkPacketBuf::kCommaAttn; const uint8_t RlinkPacketBuf::kSymEsc; +const uint8_t RlinkPacketBuf::kSymFill; +const uint8_t RlinkPacketBuf::kSymXon; +const uint8_t RlinkPacketBuf::kSymXoff; +const uint8_t RlinkPacketBuf::kSymEdPref; +const uint8_t RlinkPacketBuf::kEcSop; +const uint8_t RlinkPacketBuf::kEcEop; +const uint8_t RlinkPacketBuf::kEcNak; +const uint8_t RlinkPacketBuf::kEcAttn; +const uint8_t RlinkPacketBuf::kEcXon; +const uint8_t RlinkPacketBuf::kEcXoff; +const uint8_t RlinkPacketBuf::kEcFill; +const uint8_t RlinkPacketBuf::kEcEsc; +const uint8_t RlinkPacketBuf::kEcClobber; //------------------------------------------+----------------------------------- //! Default constructor RlinkPacketBuf::RlinkPacketBuf() : fPktBuf(), - fRawBuf(), - fRawBufSize(0), fCrc(), fFlags(0), - fNdone(0), - fNesc(0), - fNattn(0), - fNidle(0), - fNdrop(0) + fStats() {} //------------------------------------------+----------------------------------- @@ -94,272 +90,13 @@ RlinkPacketBuf::~RlinkPacketBuf() //------------------------------------------+----------------------------------- //! FIXME_docs -void RlinkPacketBuf::Init() -{ - fPktBuf.clear(); - fRawBufSize = 0; - fCrc.Clear(); - fFlags = 0; - fNdone = 0; - fNesc = 0; - fNattn = 0; - fNidle = 0; - fNdrop = 0; - - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::SndPacket(RlinkPort* port, RerrMsg& emsg) -{ - fRawBuf.reserve(2*fPktBuf.size()+2); // max. size of raw data - fRawBuf.clear(); - - fRawBuf.push_back(kCommaSop); - - size_t ni = fPktBuf.size(); - uint8_t* pi = fPktBuf.data(); - for (size_t i=0; i= kCPREF && c <= kCPREF+kNCOMM)) { - fRawBuf.push_back(kSymEsc); - fRawBuf.push_back(((~kCPREF) & 0xf0) | (c & 0x0f)); - fNesc += 1; - } else { - fRawBuf.push_back(c); - } - } - - fRawBuf.push_back(kCommaEop); - - return SndRaw(port, emsg); - -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::RcvPacket(RlinkPort* port, size_t nrcv, float timeout, - RerrMsg& emsg) -{ - fPktBuf.clear(); - - bool escseen = false; // in esc - bool sopseen = false; // sop seen - bool eopseen = false; // eop seen - bool nakseen = false; // nak seen - - while (!(eopseen|nakseen)) { // try till eop or nak received - size_t nread = nrcv - fPktBuf.size(); - // FIXME_code: if the 'enough data' handling below correct ? - if (nread < 0) return true; - - if (!sopseen) nread += 1; - if (!eopseen) nread += 1; - - size_t sizeold = fRawBufSize; - int irc = RcvRaw(port, nread, timeout, emsg); - - if (irc <= 0) { - if (irc == RlinkPort::kTout) { - SetFlagBit(kFlagTout); - return true; - } else { - return false; - } - } - - uint8_t* pi = fRawBuf.data()+sizeold; - for (int i=0; i 0.) { - size_t sizeold = fRawBufSize; - int irc = RcvRaw(port, 1, trest, emsg); - - if (irc <= 0) { - if (irc == RlinkPort::kTout) { - SetFlagBit(kFlagTout); - return -1.; - } else { - return -2.; - } - } - - gettimeofday(&tval, 0); - double tend = double(tval.tv_sec) + 1.e-6*double(tval.tv_usec); - trest -= (tend-tbeg); - - uint8_t c = fRawBuf[sizeold]; - - if (c == kCommaAttn) { - fNattn += 1; - SetFlagBit(kFlagAttnSeen); - break; - } else if (c == kCommaIdle) { - fNidle += 1; - } else { - fNdrop += 1; - } - - tbeg = tend; - } - - return timeout - trest; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -int RlinkPacketBuf::PollAttn(RlinkPort* port, RerrMsg& emsg) -{ - Init(); - - int irc = RcvRaw(port, 128, 0., emsg); - - if (irc <= 0) { - if (irc == RlinkPort::kTout) { - SetFlagBit(kFlagTout); - return 0; - } else { - return -2; - } - } - - for (size_t i=0; i<(size_t)irc; i++) { - uint8_t c = fRawBuf[i]; - if (c == kCommaAttn) { - fNattn += 1; - SetFlagBit(kFlagAttnSeen); - break; - } else if (c == kCommaIdle) { - fNidle += 1; - } else { - fNdrop += 1; - } - } - - return fNattn; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::SndOob(RlinkPort* port, uint16_t addr, uint16_t data, - RerrMsg& emsg) -{ - Init(); - - fRawBuf.clear(); - fRawBuf.push_back(kSymEsc); // ESC - fRawBuf.push_back(kSymEsc); // ESC - fRawBuf.push_back((uint8_t)addr); // ADDR - fRawBuf.push_back((uint8_t)(data & 0x00ff)); // DL - fRawBuf.push_back((uint8_t)((data>>8) & 0x00ff)); // DH - // write a filler char (just 0) to ensure that the 8b->9b stage in the - // receiver (byte2cdata) is always out if the escape state... - fRawBuf.push_back(0); // filler - - return SndRaw(port, emsg); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::SndKeep(RlinkPort* port, RerrMsg& emsg) -{ - Init(); - - fRawBuf.clear(); - fRawBuf.push_back(kSymEsc); // ESC - fRawBuf.push_back(kSymEsc); // ESC - - return SndRaw(port, emsg); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::SndAttn(RlinkPort* port, RerrMsg& emsg) -{ - Init(); - - fRawBuf.clear(); - fRawBuf.push_back(kCommaAttn); // Attn - - return SndRaw(port, emsg); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - void RlinkPacketBuf::Dump(std::ostream& os, int ind, const char* text) const { RosFill bl(ind); os << bl << (text?text:"--") << "RlinkPacketBuf @ " << this << endl; os << bl << " fCrc: " << RosPrintBvi(fCrc.Crc(), 0) << endl; os << bl << " fFlags: " << RosPrintBvi(fFlags, 0) << endl; - os << bl << " fNdone: " << RosPrintf(fNdone,"d",4) << endl; - os << bl << " fNesc: " << RosPrintf(fNesc,"d",4) << endl; - os << bl << " fNattn: " << RosPrintf(fNattn,"d",4) << endl; - os << bl << " fNidle: " << RosPrintf(fNidle,"d",4) << endl; - os << bl << " fNdrop: " << RosPrintf(fNdrop,"d",4) << endl; + fStats.Dump(os, ind+2, "fStats: "); os << bl << " fPktBuf(size): " << RosPrintf(fPktBuf.size(),"d",4); size_t ncol = max(1, (80-ind-4-6)/(2+1)); @@ -369,55 +106,7 @@ void RlinkPacketBuf::Dump(std::ostream& os, int ind, const char* text) const } os << endl; - os << bl << " fRawBuf(size): " << RosPrintf(fRawBufSize,"d",4); - for (size_t i=0; i< fRawBufSize; i++) { - if (i%ncol == 0) os << "\n" << bl << " " << RosPrintf(i,"d",4) << ": "; - os << RosPrintBvi(fRawBuf[i],16) << " "; - } - os << endl; - return; } -//------------------------------------------+----------------------------------- -//! FIXME_docs - -bool RlinkPacketBuf::SndRaw(RlinkPort* port, RerrMsg& emsg) -{ - if (port==0 || !port->IsOpen()) - throw Rexception("RlinkPacketBuf::SndRaw()", "Bad state: port not open"); - - fRawBufSize = fRawBuf.size(); - int irc = port->Write(fRawBuf.data(), fRawBuf.size(), emsg); - if (irc < 0) return false; - if ((size_t)irc != fRawBuf.size()) { - emsg.Init("RlinkPacketBuf::SndRaw()", "failed to write all data"); - return false; - } - - return true; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -int RlinkPacketBuf::RcvRaw(RlinkPort* port, size_t size, float timeout, - RerrMsg& emsg) -{ - if (port==0 || !port->IsOpen()) - throw Rexception("RlinkPacketBuf::RcvRaw()", "Bad state: port not open"); - - if (fRawBuf.size() < fRawBufSize+size) fRawBuf.resize(fRawBufSize+size); - int irc = port->Read(fRawBuf.data()+fRawBufSize, size, timeout, emsg); - if (irc == RlinkPort::kEof) { - emsg.Init("RlinkPacketBuf::RcvRaw()", "eof on read"); - } - - if (irc > 0) { - fRawBufSize += irc; - } - - return irc; -} - } // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBuf.hpp b/tools/src/librlink/RlinkPacketBuf.hpp index 1f5af53b..5ccb36a6 100644 --- a/tools/src/librlink/RlinkPacketBuf.hpp +++ b/tools/src/librlink/RlinkPacketBuf.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkPacketBuf.hpp 509 2013-04-21 20:46:20Z mueller $ +// $Id: RlinkPacketBuf.hpp 606 2014-11-24 07:08:51Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 2.0 re-organize for rlink v4 // 2013-04-21 509 1.0.2 add SndAttn() method // 2013-01-13 474 1.0.1 add PollAttn() method // 2011-04-02 375 1.0 Initial version @@ -22,7 +23,7 @@ /*! \file - \version $Id: RlinkPacketBuf.hpp 509 2013-04-21 20:46:20Z mueller $ + \version $Id: RlinkPacketBuf.hpp 606 2014-11-24 07:08:51Z mueller $ \brief Declaration of class RlinkPacketBuf. */ @@ -30,91 +31,67 @@ #define included_Retro_RlinkPacketBuf 1 #include +#include #include -#include "RlinkPort.hpp" -#include "RlinkCrc8.hpp" +#include "boost/utility.hpp" + +#include "librtools/Rstats.hpp" + +#include "RlinkCrc16.hpp" namespace Retro { - class RlinkPacketBuf { + class RlinkPacketBuf : private boost::noncopyable { public: RlinkPacketBuf(); - ~RlinkPacketBuf(); - - void Init(); - - void PutWithCrc(uint8_t data); - void PutWithCrc(uint16_t data); - void PutCrc(); - - bool SndPacket(RlinkPort* port, RerrMsg& emsg); - bool RcvPacket(RlinkPort* port, size_t nrcv, float timeout, - RerrMsg& emsg); - - double WaitAttn(RlinkPort* port, double timeout, RerrMsg& emsg); - int PollAttn(RlinkPort* port, RerrMsg& emsg); - bool SndOob(RlinkPort* port, uint16_t addr, uint16_t data, - RerrMsg& emsg); - bool SndKeep(RlinkPort* port, RerrMsg& emsg); - bool SndAttn(RlinkPort* port, RerrMsg& emsg); + ~RlinkPacketBuf(); - bool CheckSize(size_t nbyte) const; - uint8_t Get8WithCrc(); - uint16_t Get16WithCrc(); - bool CheckCrc(); - size_t PktSize() const; - size_t RawSize() const; uint32_t Flags() const; bool TestFlag(uint32_t mask) const; - size_t Nesc() const; - size_t Nattn() const; - size_t Nidle() const; - size_t Ndrop() const; + + const Rstats& Stats() const; void Dump(std::ostream& os, int ind=0, const char* text=0) const; // flag bits (also defined in cpp) - static const uint32_t kFlagSopSeen = 1<<0; //!< sop was seen - static const uint32_t kFlagEopSeen = 1<<1; //!< eop was seen - static const uint32_t kFlagNakSeen = 1<<2; //!< nak was seen - static const uint32_t kFlagAttnSeen = 1<<3; //!< attn was seen - static const uint32_t kFlagTout = 1<<16; //!< timeout on read - static const uint32_t kFlagDatDrop = 1<<17; //!< data before sop dropped - static const uint32_t kFlagDatMiss = 1<<18; //!< eop before expected data + static const uint32_t kFlagSopSeen = 1<<0; //!< sop was seen + static const uint32_t kFlagEopSeen = 1<<1; //!< eop was seen + static const uint32_t kFlagNakSeen = 1<<2; //!< nak was seen + static const uint32_t kFlagAttnSeen = 1<<3; //!< attn was seen + static const uint32_t kFlagErrTout = 1<<16; //!< err: timeout on read + static const uint32_t kFlagErrIO = 1<<17; //!< err: IO error on read + static const uint32_t kFlagErrFrame = 1<<18; //!< err: frame error + static const uint32_t kFlagErrClobber = 1<<19; //!< err: clobbered esc // some constants (also defined in cpp) - static const uint8_t kCPREF = 0x80; //!< VHDL def for comma prefix - static const uint8_t kNCOMM = 0x04; //!< VHDL def for number of commas - static const uint8_t kCommaIdle = kCPREF+0; //!< IDLE comma - static const uint8_t kCommaSop = kCPREF+1; //!< SOP comma - static const uint8_t kCommaEop = kCPREF+2; //!< EOP comma - static const uint8_t kCommaNak = kCPREF+3; //!< NAK comma - static const uint8_t kCommaAttn = kCPREF+4; //!< ATTN comma - static const uint8_t kSymEsc = kCPREF+0x0f; //!< ESC symbol + static const uint8_t kSymEsc = 0xCA; //!< VHDL def escape 1100 1010 + static const uint8_t kSymFill = 0xD5; //!< VHDL def fill 1101 0101 + static const uint8_t kSymXon = 0x11; //!< VHDL def xon 0001 0001 + static const uint8_t kSymXoff = 0x13; //!< VHDL def xoff 0001 0011 + static const uint8_t kSymEdPref = 0x40; //!< VHDL def ed_pref 0100 0000 + static const uint8_t kEcSop = 0x00; //!< VHDL def ec_sop 000 + static const uint8_t kEcEop = 0x01; //!< VHDL def ec_eop 001 + static const uint8_t kEcNak = 0x02; //!< VHDL def ec_nak 010 + static const uint8_t kEcAttn = 0x03; //!< VHDL def ec_attn 011 + static const uint8_t kEcXon = 0x04; //!< VHDL def ec_xon 100 + static const uint8_t kEcXoff = 0x05; //!< VHDL def ec_xoff 101 + static const uint8_t kEcFill = 0x06; //!< VHDL def ec_fill 110 + static const uint8_t kEcEsc = 0x07; //!< VHDL def ec_esc 111 + static const uint8_t kEcClobber = 0xff; //!< invalid Ecode protected: - bool SndRaw(RlinkPort* port, RerrMsg& emsg); - int RcvRaw(RlinkPort* port, size_t size, float timeout, - RerrMsg& emsg); - void SetFlagBit(uint32_t mask); void ClearFlagBit(uint32_t mask); protected: std::vector fPktBuf; //!< packet buffer - std::vector fRawBuf; //!< raw data buffer - size_t fRawBufSize; //!< # of valid bytes in RawBuf - RlinkCrc8 fCrc; //!< crc accumulator + RlinkCrc16 fCrc; //!< crc accumulator uint32_t fFlags; //!< request/response flags - size_t fNdone; //!< number of input bytes processed - size_t fNesc; //!< number of escapes handled - size_t fNattn; //!< number of ATTN commas seen - size_t fNidle; //!< number of IDLE commas seen - size_t fNdrop; //!< number of dropped input bytes + Rstats fStats; //!< statistics }; } // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBuf.ipp b/tools/src/librlink/RlinkPacketBuf.ipp index 30fa0b2b..f093973a 100644 --- a/tools/src/librlink/RlinkPacketBuf.ipp +++ b/tools/src/librlink/RlinkPacketBuf.ipp @@ -1,6 +1,6 @@ -// $Id: RlinkPacketBuf.ipp 488 2013-02-16 18:49:47Z mueller $ +// $Id: RlinkPacketBuf.ipp 604 2014-11-16 22:33:09Z mueller $ // -// Copyright 2011- by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,13 +13,14 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-15 604 2.0 re-organize for rlink v4 // 2011-04-02 375 1.0 Initial version // 2011-03-05 366 0.1 First draft // --------------------------------------------------------------------------- /*! \file - \version $Id: RlinkPacketBuf.ipp 488 2013-02-16 18:49:47Z mueller $ + \version $Id: RlinkPacketBuf.ipp 604 2014-11-16 22:33:09Z mueller $ \brief Implemenation (inline) of class RlinkPacketBuf. */ @@ -29,74 +30,6 @@ namespace Retro { //------------------------------------------+----------------------------------- //! FIXME_docs -inline void RlinkPacketBuf::PutWithCrc(uint8_t data) -{ - fPktBuf.push_back(data); - fCrc.AddData(data); - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline void RlinkPacketBuf::PutWithCrc(uint16_t data) -{ - PutWithCrc((uint8_t)( data & 0xff)); // lsb first - PutWithCrc((uint8_t)((data>>8) & 0xff)); - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline void RlinkPacketBuf::PutCrc() -{ - fPktBuf.push_back(fCrc.Crc()); - return; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline bool RlinkPacketBuf::CheckSize(size_t nbyte) const -{ - return fPktBuf.size()-fNdone >= nbyte; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline uint8_t RlinkPacketBuf::Get8WithCrc() -{ - uint8_t data = fPktBuf[fNdone++]; - fCrc.AddData(data); - return data; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline uint16_t RlinkPacketBuf::Get16WithCrc() -{ - uint8_t datl = fPktBuf[fNdone++]; - uint8_t dath = fPktBuf[fNdone++]; - fCrc.AddData(datl); - fCrc.AddData(dath); - return (uint16_t)datl | ((uint16_t)dath << 8); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline bool RlinkPacketBuf::CheckCrc() -{ - uint8_t data = fPktBuf[fNdone++]; - return data == fCrc.Crc(); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - inline size_t RlinkPacketBuf::PktSize() const { return fPktBuf.size(); @@ -105,14 +38,6 @@ inline size_t RlinkPacketBuf::PktSize() const //------------------------------------------+----------------------------------- //! FIXME_docs -inline size_t RlinkPacketBuf::RawSize() const -{ - return fRawBuf.size(); -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - inline void RlinkPacketBuf::SetFlagBit(uint32_t mask) { fFlags |= mask; @@ -138,33 +63,9 @@ inline bool RlinkPacketBuf::TestFlag(uint32_t mask) const //------------------------------------------+----------------------------------- //! FIXME_docs -inline size_t RlinkPacketBuf::Nesc() const +inline const Rstats& RlinkPacketBuf::Stats() const { - return fNesc; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline size_t RlinkPacketBuf::Nattn() const -{ - return fNattn; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline size_t RlinkPacketBuf::Nidle() const -{ - return fNidle; -} - -//------------------------------------------+----------------------------------- -//! FIXME_docs - -inline size_t RlinkPacketBuf::Ndrop() const -{ - return fNdrop; + return fStats; } //------------------------------------------+----------------------------------- diff --git a/tools/src/librlink/RlinkPacketBufRcv.cpp b/tools/src/librlink/RlinkPacketBufRcv.cpp new file mode 100644 index 00000000..cb5ccc96 --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufRcv.cpp @@ -0,0 +1,350 @@ +// $Id: RlinkPacketBufRcv.cpp 607 2014-11-30 20:02:48Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-30 607 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + +/*! + \file + \version $Id: RlinkPacketBufRcv.cpp 607 2014-11-30 20:02:48Z mueller $ + \brief Implemenation of class RlinkPacketBuf. + */ + +#include + +#include "RlinkPacketBufRcv.hpp" + +#include "librtools/RosFill.hpp" +#include "librtools/RosPrintf.hpp" +#include "librtools/RosPrintBvi.hpp" +#include "librtools/Rexception.hpp" + +using namespace std; + +/*! + \class Retro::RlinkPacketBufRcv + \brief FIXME_docs +*/ + +// all method definitions in namespace Retro +namespace Retro { + +//------------------------------------------+----------------------------------- +//! Default constructor + +RlinkPacketBufRcv::RlinkPacketBufRcv() + : fRawBufSize(0), + fRawBufDone(0), + fRcvState(kRcvIdle), + fNDone(0), + fEscSeen(false), + fNakIndex(-1), + fDropData() +{ + // Statistic setup + fStats.Define(kStatNRxDrop, "NRxDrop", "Rx bytes dropped"); + fStats.Define(kStatNRxSop, "NRxSop", "Rx SOP commas seen"); + fStats.Define(kStatNRxEop, "NRxEop", "Rx EOP commas seen"); + fStats.Define(kStatNRxNak, "NRxNak", "Rx NAK commas seen"); + fStats.Define(kStatNRxAttn, "NRxAttn", "Rx ATTN commas seen"); + fStats.Define(kStatNRxEsc, "NRxEsc", "Rx data escapes"); + fStats.Define(kStatNRxClobber,"NRxClobber","Rx clobbered escapes"); +} + +//------------------------------------------+----------------------------------- +//! Destructor + +RlinkPacketBufRcv::~RlinkPacketBufRcv() +{} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +int RlinkPacketBufRcv::ReadData(RlinkPort* port, double timeout, RerrMsg& emsg) +{ + if (port == 0) + throw Rexception("RlinkPacketBufRcv::ReadData()", + "Bad state: port not open"); + if (fRawBufDone != fRawBufSize) + throw Rexception("RlinkPacketBufRcv::ReadData()", + "Bad state: called while data pending in buffer"); + + fRawBufDone = 0; + fRawBufSize = 0; + + int irc = port->Read(fRawBuf, sizeof(fRawBuf), timeout, emsg); + + if (timeout == 0 && irc == RlinkPort::kTout) return 0; + + if (irc < 0) { + if (irc == RlinkPort::kTout) { + SetFlagBit(kFlagErrTout); + } else { + SetFlagBit(kFlagErrIO); + if (irc == RlinkPort::kEof) { + emsg.Init("RlinkPacketBuf::ReadData()", "eof on read"); + } + } + } else { + fRawBufSize = size_t(irc); + } + + return irc; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufRcv::ProcessData() +{ + if (fRawBufDone ==fRawBufSize) return false; + + while (fRawBufDone < fRawBufSize) { + switch (fRcvState) { + case kRcvIdle: + ProcessDataIdle(); + break; + + case kRcvFill: + ProcessDataFill(); + break; + + default: + return true; + } + } + return true; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufRcv::AcceptPacket() +{ + fPktBuf.clear(); + fCrc.Clear(); + fFlags = 0; + fRcvState = kRcvIdle; + fNDone = 0; + fNakIndex = -1; + fDropData.clear(); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufRcv::FlushRaw() +{ + fRawBufSize = 0; + fRawBufDone = 0; + fEscSeen = false; + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +RlinkPacketBufRcv::pkt_state RlinkPacketBufRcv::PacketState() +{ + if (fRcvState==kRcvIdle || fRcvState==kRcvFill) return kPktPend; + if (fRcvState==kRcvDone) return TestFlag(kFlagSopSeen) ? kPktResp : kPktAttn; + return kPktError; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufRcv::GetWithCrc(uint16_t* pdata, size_t count) +{ + uint16_t* pend = pdata + count; + while (pdata < pend) GetWithCrc(*pdata++); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufRcv::Dump(std::ostream& os, int ind, const char* text) const +{ + RosFill bl(ind); + os << bl << (text?text:"--") << "RlinkPacketBufRcv @ " << this << endl; + os << bl << " fRawBufSize: " << RosPrintf(fRawBufSize,"d",4) << endl; + os << bl << " fRawBufDone: " << RosPrintf(fRawBufDone,"d",4) << endl; + if (fRawBufDone > 0) { + os << bl << " fRawBuf[last]: " + << RosPrintBvi(fRawBuf[fRawBufDone-1],16) << endl; + } + os << bl << " fRcvState: " << RosPrintf(fRcvState,"d",4) << endl; + os << bl << " fNDone: " << RosPrintf(fNDone,"d",4) << endl; + os << bl << " fEscSeen: " << RosPrintf(fEscSeen) << endl; + os << bl << " fNakIndex: " << RosPrintf(fNakIndex,"d",4) << endl; + + os << bl << " fDropData(size): " << RosPrintf(fDropData.size(),"d",4); + size_t ncol = max(1, (80-ind-4-6)/(2+1)); + for (size_t i=0; i set eop and return + fRcvState = kRcvDone; + return; + + case kEcNak: // NAK seen + if (TestFlag(kFlagAttnSeen|kFlagNakSeen)) { // NAK after ATTN or NAK + SetFlagBit(kFlagErrFrame); // -> set frame error and return + fRcvState = kRcvError; + return; + } // else 1st NAK + SetFlagBit(kFlagNakSeen); // -> set flag and index; continue + fNakIndex = fPktBuf.size(); + break; + + // data escapes seen: add escaped char and continue + case kEcXon: fPktBuf.push_back(kSymXon); break; + case kEcXoff: fPktBuf.push_back(kSymXoff); break; + case kEcFill: fPktBuf.push_back(kSymFill); break; + case kEcEsc: fPktBuf.push_back(kSymEsc); break; + + case kEcClobber: // Clobber(ed) escape seen + SetFlagBit(kFlagErrClobber); // -> set clobber error and return + fRcvState = kRcvError; + return; + + default: // unexpected escape (SOP,ATTN) + SetFlagBit(kFlagErrFrame); // -> set frame error and return + fRcvState = kRcvError; + return; + } + } // if (fEscSeen) + + // handle plain data (till next escape) + uint8_t* pi = fRawBuf+fRawBufDone; + uint8_t* pend = fRawBuf+fRawBufSize; + + while (pi < pend) { + uint8_t c = *pi++; + if (c == kSymEsc) { + fEscSeen = true; + break; + } + fPktBuf.push_back(c); + } + fRawBufDone = pi - fRawBuf; + + } // while (fRawBufDone < fRawBufSize) + + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +uint8_t RlinkPacketBufRcv::GetEcode() +{ + if (!fEscSeen || fRawBufDone >= fRawBufSize) + throw Rexception("RlinkPacketBufRcv::GetEcode()", "Bad state"); + + fEscSeen = false; + + uint8_t c = fRawBuf[fRawBufDone++]; + uint8_t ec = c & 0x7; + if ((c & 0xC0) != kSymEdPref || (((~c)>>3)&0x7) != ec) ec = kEcClobber; + + switch (ec) { + case kEcSop: fStats.Inc(kStatNRxSop); break; // SOP comma seen + case kEcEop: fStats.Inc(kStatNRxEop); break; // EOP comma seen + case kEcNak: fStats.Inc(kStatNRxNak); break; // NAK comma seen + case kEcAttn: fStats.Inc(kStatNRxAttn); break; // ATTN comma seen + case kEcClobber: fStats.Inc(kStatNRxClobber); break; // clobbered esc seen + default: fStats.Inc(kStatNRxEsc); break; // escaped data seen + } + + return ec; +} + +} // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBufRcv.hpp b/tools/src/librlink/RlinkPacketBufRcv.hpp new file mode 100644 index 00000000..cd03133d --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufRcv.hpp @@ -0,0 +1,102 @@ +// $Id: RlinkPacketBufRcv.hpp 607 2014-11-30 20:02:48Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-30 607 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + + +/*! + \file + \version $Id: RlinkPacketBufRcv.hpp 607 2014-11-30 20:02:48Z mueller $ + \brief Declaration of class RlinkPacketBuf. +*/ + +#ifndef included_Retro_RlinkPacketBufRcv +#define included_Retro_RlinkPacketBufRcv 1 + +#include "RlinkPacketBuf.hpp" +#include "RlinkPort.hpp" + +namespace Retro { + + class RlinkPacketBufRcv: public RlinkPacketBuf { + public: + + RlinkPacketBufRcv(); + ~RlinkPacketBufRcv(); + + int ReadData(RlinkPort* port, double timeout, RerrMsg& emsg); + bool ProcessData(); + void AcceptPacket(); + void FlushRaw(); + + enum pkt_state { + kPktPend=0, // fDropData; //!< dropped data buffer + }; + +} // end namespace Retro + +#include "RlinkPacketBufRcv.ipp" + +#endif diff --git a/tools/src/librlink/RlinkPacketBufRcv.ipp b/tools/src/librlink/RlinkPacketBufRcv.ipp new file mode 100644 index 00000000..34127a28 --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufRcv.ipp @@ -0,0 +1,77 @@ +// $Id: RlinkPacketBufRcv.ipp 606 2014-11-24 07:08:51Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-23 606 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + +/*! + \file + \version $Id: RlinkPacketBufRcv.ipp 606 2014-11-24 07:08:51Z mueller $ + \brief Implemenation (inline) of class RlinkPacketBuf. +*/ + +// all method definitions in namespace Retro +namespace Retro { + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline bool RlinkPacketBufRcv::CheckSize(size_t nbyte) const +{ + return fPktBuf.size()-fNDone >= nbyte; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufRcv::GetWithCrc(uint8_t& data) +{ + data = fPktBuf[fNDone++]; + fCrc.AddData(data); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufRcv::GetWithCrc(uint16_t& data) +{ + uint8_t datl = fPktBuf[fNDone++]; + uint8_t dath = fPktBuf[fNDone++]; + fCrc.AddData(datl); + fCrc.AddData(dath); + data = uint16_t(datl) | (uint16_t(dath) << 8); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline bool RlinkPacketBufRcv::CheckCrc() +{ + uint8_t datl = fPktBuf[fNDone++]; + uint8_t dath = fPktBuf[fNDone++]; + uint16_t data = uint16_t(datl) | (uint16_t(dath) << 8); + return data == fCrc.Crc(); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline int RlinkPacketBufRcv::NakIndex() const +{ + return fNakIndex; +} + +} // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBufSnd.cpp b/tools/src/librlink/RlinkPacketBufSnd.cpp new file mode 100644 index 00000000..4a6c0aba --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufSnd.cpp @@ -0,0 +1,227 @@ +// $Id: RlinkPacketBufSnd.cpp 606 2014-11-24 07:08:51Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-15 604 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + +/*! + \file + \version $Id: RlinkPacketBufSnd.cpp 606 2014-11-24 07:08:51Z mueller $ + \brief Implemenation of class RlinkPacketBuf. + */ + +#include + +#include "RlinkPacketBufSnd.hpp" + +#include "librtools/RosFill.hpp" +#include "librtools/RosPrintf.hpp" +#include "librtools/RosPrintBvi.hpp" +#include "librtools/Rexception.hpp" + +using namespace std; + +/*! + \class Retro::RlinkPacketBufSnd + \brief FIXME_docs +*/ + +// all method definitions in namespace Retro +namespace Retro { + +//------------------------------------------+----------------------------------- +//! Default constructor + +RlinkPacketBufSnd::RlinkPacketBufSnd() + : fRawBuf() +{ + // Statistic setup + fStats.Define(kStatNTxEsc, "NTxEsc", "Tx data escapes"); +} + +//------------------------------------------+----------------------------------- +//! Destructor + +RlinkPacketBufSnd::~RlinkPacketBufSnd() +{} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufSnd::Init() +{ + fPktBuf.clear(); + fRawBuf.clear(); + fCrc.Clear(); + fFlags = 0; + + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufSnd::PutWithCrc(const uint16_t* pdata, size_t count) +{ + const uint16_t* pend = pdata + count; + while (pdata < pend) PutWithCrc(*pdata++); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndPacket(RlinkPort* port, RerrMsg& emsg) +{ + size_t nesc = 0; + + fRawBuf.reserve(2*fPktBuf.size()+4); // max. size of raw data + fRawBuf.clear(); + + PutRawEsc(kEcSop); // + + size_t ni = fPktBuf.size(); + uint8_t* pi = fPktBuf.data(); + for (size_t i=0; i + fStats.Inc(kStatNTxEsc , double(nesc)); + + return SndRaw(port, emsg); + +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndOob(RlinkPort* port, uint16_t addr, uint16_t data, + RerrMsg& emsg) +{ + Init(); + + fRawBuf.clear(); + fRawBuf.push_back(kSymEsc); // ESC + fRawBuf.push_back(kSymEsc); // ESC + fRawBuf.push_back(uint8_t( addr & 0x000f)); // ADDR ( 3: 0) + fRawBuf.push_back(uint8_t((addr>>4) & 0x000f)); // ADDR ( 7: 4) + fRawBuf.push_back(uint8_t( data & 0x000f)); // DATA ( 3: 0) + fRawBuf.push_back(uint8_t((data>>4) & 0x000f)); // DATA ( 7: 4) + fRawBuf.push_back(uint8_t((data>>8) & 0x000f)); // DATA (11: 8) + fRawBuf.push_back(uint8_t((data>>12) & 0x000f)); // DATA (15:12) + + return SndRaw(port, emsg); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndKeep(RlinkPort* port, RerrMsg& emsg) +{ + Init(); + + fRawBuf.clear(); + fRawBuf.push_back(kSymEsc); // ESC + fRawBuf.push_back(kSymEsc); // ESC + + return SndRaw(port, emsg); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndAttn(RlinkPort* port, RerrMsg& emsg) +{ + Init(); + + fRawBuf.clear(); + PutRawEsc(kEcAttn); // + return SndRaw(port, emsg); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndNak(RlinkPort* port, RerrMsg& emsg) +{ + Init(); + + fRawBuf.clear(); + PutRawEsc(kEcNak); // + return SndRaw(port, emsg); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +bool RlinkPacketBufSnd::SndUnJam(RlinkPort* port, RerrMsg& emsg) +{ + Init(); + + fRawBuf.clear(); + PutRawEsc(kEcEop); // + return SndRaw(port, emsg); +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +void RlinkPacketBufSnd::Dump(std::ostream& os, int ind, const char* text) const +{ + RosFill bl(ind); + os << bl << (text?text:"--") << "RlinkPacketBufSnd @ " << this << endl; + + size_t rawbufsize = fRawBuf.size(); + os << bl << " fRawBuf(size): " << RosPrintf(rawbufsize,"d",4); + size_t ncol = max(1, (80-ind-4-6)/(2+1)); + for (size_t i=0; iIsOpen()) + throw Rexception("RlinkPacketBufSnd::SndRaw()", "Bad state: port not open"); + + size_t rawbufsize = fRawBuf.size(); + int irc = port->Write(fRawBuf.data(), rawbufsize, emsg); + if (irc < 0) return false; + if ((size_t)irc != rawbufsize) { + emsg.Init("RlinkPacketBufSnd::SndRaw()", "failed to write all data"); + return false; + } + + return true; +} + +} // end namespace Retro diff --git a/tools/src/librlink/RlinkPacketBufSnd.hpp b/tools/src/librlink/RlinkPacketBufSnd.hpp new file mode 100644 index 00000000..c2f8c418 --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufSnd.hpp @@ -0,0 +1,78 @@ +// $Id: RlinkPacketBufSnd.hpp 606 2014-11-24 07:08:51Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-14 604 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + + +/*! + \file + \version $Id: RlinkPacketBufSnd.hpp 606 2014-11-24 07:08:51Z mueller $ + \brief Declaration of class RlinkPacketBufSnd. +*/ + +#ifndef included_Retro_RlinkPacketBufSnd +#define included_Retro_RlinkPacketBufSnd + +#include "RlinkPacketBuf.hpp" +#include "RlinkPort.hpp" + +namespace Retro { + + class RlinkPacketBufSnd : public RlinkPacketBuf { + public: + + RlinkPacketBufSnd(); + ~RlinkPacketBufSnd(); + + void Init(); + + void PutWithCrc(uint8_t data); + void PutWithCrc(uint16_t data); + void PutWithCrc(const uint16_t* pdata, size_t count); + void PutCrc(); + + void PutRawEsc(uint8_t ec); + + bool SndPacket(RlinkPort* port, RerrMsg& emsg); + bool SndOob(RlinkPort* port, uint16_t addr, uint16_t data, + RerrMsg& emsg); + bool SndKeep(RlinkPort* port, RerrMsg& emsg); + bool SndAttn(RlinkPort* port, RerrMsg& emsg); + bool SndNak(RlinkPort* port, RerrMsg& emsg); + bool SndUnJam(RlinkPort* port, RerrMsg& emsg); + + size_t RawSize() const; + + void Dump(std::ostream& os, int ind=0, const char* text=0) const; + + // statistics counter indices + enum stats { + kStatNTxEsc = 0 + }; + + protected: + bool SndRaw(RlinkPort* port, RerrMsg& emsg); + + protected: + std::vector fRawBuf; //!< raw data buffer + }; + +} // end namespace Retro + +#include "RlinkPacketBufSnd.ipp" + +#endif diff --git a/tools/src/librlink/RlinkPacketBufSnd.ipp b/tools/src/librlink/RlinkPacketBufSnd.ipp new file mode 100644 index 00000000..88f15f82 --- /dev/null +++ b/tools/src/librlink/RlinkPacketBufSnd.ipp @@ -0,0 +1,85 @@ +// $Id: RlinkPacketBufSnd.ipp 606 2014-11-24 07:08:51Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-08 602 1.0 Initial version +// 2014-11-02 600 0.1 First draft (re-organize PacketBuf for rlink v4) +// --------------------------------------------------------------------------- + +/*! + \file + \version $Id: RlinkPacketBufSnd.ipp 606 2014-11-24 07:08:51Z mueller $ + \brief Implemenation (inline) of class RlinkPacketBuf. +*/ + +// all method definitions in namespace Retro +namespace Retro { + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufSnd::PutWithCrc(uint8_t data) +{ + fPktBuf.push_back(data); + fCrc.AddData(data); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufSnd::PutWithCrc(uint16_t data) +{ + uint8_t datl = data & 0xff; + uint8_t dath = (data>>8) & 0xff; + fPktBuf.push_back(datl); + fPktBuf.push_back(dath); + fCrc.AddData(datl); + fCrc.AddData(dath); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufSnd::PutCrc() +{ + uint16_t data = fCrc.Crc(); + uint8_t datl = data & 0xff; + uint8_t dath = (data>>8) & 0xff; + fPktBuf.push_back(datl); + fPktBuf.push_back(dath); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline void RlinkPacketBufSnd::PutRawEsc(uint8_t ec) +{ + fRawBuf.push_back(kSymEsc); + uint8_t ed = kSymEdPref | ((~ec)&0x7)<<3 | ec; + fRawBuf.push_back(ed); + return; +} + +//------------------------------------------+----------------------------------- +//! FIXME_docs + +inline size_t RlinkPacketBufSnd::RawSize() const +{ + return fRawBuf.size(); +} + +} // end namespace Retro diff --git a/tools/src/librlink/RlinkPort.cpp b/tools/src/librlink/RlinkPort.cpp index f12e2efe..d4f4d502 100644 --- a/tools/src/librlink/RlinkPort.cpp +++ b/tools/src/librlink/RlinkPort.cpp @@ -1,6 +1,6 @@ -// $Id: RlinkPort.cpp 492 2013-02-24 22:14:47Z mueller $ +// $Id: RlinkPort.cpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,10 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-10 611 1.2.4 add time stamps for Read/Write for logs +// 2014-11-29 607 1.2.3 BUGFIX: fix time handling on RawRead() +// 2014-11-23 606 1.2.2 use Rtools::TimeOfDayAsDouble() +// 2014-08-22 584 1.2.1 use nullptr // 2013-02-23 492 1.2 use RparseUrl // 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces // 2013-02-10 485 1.0.5 add static const defs @@ -26,14 +30,13 @@ /*! \file - \version $Id: RlinkPort.cpp 492 2013-02-24 22:14:47Z mueller $ + \version $Id: RlinkPort.cpp 611 2014-12-10 23:23:58Z mueller $ \brief Implemenation of RlinkPort. */ #include #include #include -#include #include @@ -42,6 +45,7 @@ #include "librtools/RosPrintBvi.hpp" #include "librtools/Rexception.hpp" #include "librtools/RlogMsg.hpp" +#include "librtools/Rtools.hpp" #include "RlinkPort.hpp" @@ -72,6 +76,8 @@ RlinkPort::RlinkPort() fFdWrite(-1), fspLog(), fTraceLevel(0), + fTsLastRead(-1.), + fTsLastWrite(-1.), fStats() { fStats.Define(kStatNPortWrite, "NPortWrite", "Port::Write() calls"); @@ -115,7 +121,7 @@ int RlinkPort::Read(uint8_t* buf, size_t size, double timeout, RerrMsg& emsg) if (!IsOpen()) throw Rexception("RlinkPort::Read()","Bad state: port not open"); if (buf == 0) - throw Rexception("RlinkPort::Read()","Bad args: buf==NULL"); + throw Rexception("RlinkPort::Read()","Bad args: buf==nullptr"); if (size == 0) throw Rexception("RlinkPort::Read()","Bad args: size==0"); @@ -126,7 +132,7 @@ int RlinkPort::Read(uint8_t* buf, size_t size, double timeout, RerrMsg& emsg) int irc = -1; while (irc < 0) { - irc = read(fFdRead, (void*) buf, size); + irc = ::read(fFdRead, (void*) buf, size); if (irc < 0 && errno != EINTR) { emsg.InitErrno("RlinkPort::Read()", "read() failed : ", errno); if (fspLog && fTraceLevel>0) fspLog->Write(emsg.Message(), 'E'); @@ -137,6 +143,12 @@ int RlinkPort::Read(uint8_t* buf, size_t size, double timeout, RerrMsg& emsg) if (fspLog && fTraceLevel>0) { RlogMsg lmsg(*fspLog, 'I'); lmsg << "port read nchar=" << RosPrintf(irc,"d",4); + double now = Rtools::TimeOfDayAsDouble(); + if (fTsLastRead > 0.) + lmsg << " dt_rd=" << RosPrintf(now-fTsLastRead,"f",8,6); + if (fTsLastWrite > 0.) + lmsg << " dt_wr=" << RosPrintf(now-fTsLastWrite,"f",8,6); + fTsLastRead = now; if (fTraceLevel>1) { size_t ncol = (80-5-6)/(2+1); for (int i=0; i0) { RlogMsg lmsg(*fspLog, 'I'); lmsg << "port write nchar=" << RosPrintf(size,"d",4); + double now = Rtools::TimeOfDayAsDouble(); + if (fTsLastRead > 0.) + lmsg << " dt_rd=" << RosPrintf(now-fTsLastRead,"f",8,6); + if (fTsLastWrite > 0.) + lmsg << " dt_wr=" << RosPrintf(now-fTsLastWrite,"f",8,6); + fTsLastWrite = now; if (fTraceLevel>1) { size_t ncol = (80-5-6)/(2+1); for (size_t i=0; i0) fspLog->Write(emsg.Message(), 'E'); @@ -216,7 +234,7 @@ bool RlinkPort::PollRead(double timeout) int irc = -1; while (irc < 0) { - irc = poll(fds, 1, ito); + irc = ::poll(fds, 1, ito); if (irc < 0 && errno != EINTR) throw Rexception("RlinkPort::PollRead()","poll() failed: rc<0: ", errno); } @@ -242,21 +260,17 @@ int RlinkPort::RawRead(uint8_t* buf, size_t size, bool exactsize, fStats.Inc(kStatNPortRawRead); tused = 0.; - struct timeval tval; - gettimeofday(&tval, 0); - double tbeg = double(tval.tv_sec) + 1.e-6*double(tval.tv_usec); - double trest = timeout; + double tnow = Rtools::TimeOfDayAsDouble(); + double tend = tnow + timeout; + double tbeg = tnow; size_t ndone = 0; - while (trest>0. && ndone= 0) { - close(fd); + ::close(fd); fd = -1; } return; diff --git a/tools/src/librlink/RlinkPort.hpp b/tools/src/librlink/RlinkPort.hpp index bf4f4dd4..308c66fe 100644 --- a/tools/src/librlink/RlinkPort.hpp +++ b/tools/src/librlink/RlinkPort.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkPort.hpp 513 2013-05-01 14:02:06Z mueller $ +// $Id: RlinkPort.hpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-10 611 1.2.2 add time stamps for Read/Write for logs // 2013-05-01 513 1.2.1 fTraceLevel now uint32_t // 2013-02-23 492 1.2 use RparseUrl // 2013-02-22 491 1.1 use new RlogFile/RlogMsg interfaces @@ -26,7 +27,7 @@ /*! \file - \version $Id: RlinkPort.hpp 513 2013-05-01 14:02:06Z mueller $ + \version $Id: RlinkPort.hpp 611 2014-12-10 23:23:58Z mueller $ \brief Declaration of class RlinkPort. */ @@ -78,9 +79,9 @@ namespace Retro { virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const; // some constants (also defined in cpp) - static const int kEof = 0; // fspLog; //!< log file ptr uint32_t fTraceLevel; //!< trace level + double fTsLastRead; //!< time stamp last write + double fTsLastWrite; //!< time stamp last write Rstats fStats; //!< statistics }; diff --git a/tools/src/librlink/RlinkPortCuff.cpp b/tools/src/librlink/RlinkPortCuff.cpp index a1e0c121..ed8d6262 100644 --- a/tools/src/librlink/RlinkPortCuff.cpp +++ b/tools/src/librlink/RlinkPortCuff.cpp @@ -1,6 +1,6 @@ -// $Id: RlinkPortCuff.cpp 524 2013-06-30 19:10:30Z mueller $ +// $Id: RlinkPortCuff.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2012-2013 by Walter F.J. Mueller +// Copyright 2012-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.1.2 use nullptr // 2013-05-17 521 1.1.1 use Rtools::String2Long // 2013-02-23 492 1.1 use RparseUrl // 2013-02-10 485 1.0.3 add static const defs @@ -23,7 +24,7 @@ /*! \file - \version $Id: RlinkPortCuff.cpp 524 2013-06-30 19:10:30Z mueller $ + \version $Id: RlinkPortCuff.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RlinkPortCuff. */ @@ -293,7 +294,7 @@ void RlinkPortCuff::Cleanup() libusb_free_device_list(fpUsbDevList, 1); fpUsbDevList = 0; } - libusb_set_pollfd_notifiers(fpUsbContext, NULL, NULL, NULL); + libusb_set_pollfd_notifiers(fpUsbContext, nullptr, nullptr, nullptr); libusb_exit(fpUsbContext); fpUsbContext = 0; } @@ -449,7 +450,7 @@ void RlinkPortCuff::DriverEventUSB() tv.tv_sec = 0; tv.tv_usec = 0; int irc = libusb_handle_events_timeout(fpUsbContext, &tv); - //setting the timeval pointer to NULL should work, but doesn't (in 1.0.6) + //setting the timeval pointer to nullptr should work, but doesn't (in 1.0.6) //rc = libusb_handle_events_timeout(pUsbContext, 0); if (irc) BadUSBCall("RlinkPortCuff::DriverEventUSB()", "libusb_handle_events_timeout()", irc); diff --git a/tools/src/librlink/RlinkPortFifo.cpp b/tools/src/librlink/RlinkPortFifo.cpp index 25915994..206c0d9c 100644 --- a/tools/src/librlink/RlinkPortFifo.cpp +++ b/tools/src/librlink/RlinkPortFifo.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkPortFifo.cpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: RlinkPortFifo.cpp 607 2014-11-30 20:02:48Z mueller $ // // Copyright 2011-2013 y Walter F.J. Mueller // @@ -20,7 +20,7 @@ /*! \file - \version $Id: RlinkPortFifo.cpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: RlinkPortFifo.cpp 607 2014-11-30 20:02:48Z mueller $ \brief Implemenation of RlinkPortFifo. */ @@ -102,7 +102,7 @@ int RlinkPortFifo::OpenFifo(const std::string& name, bool snd, RerrMsg& emsg) } } else { mode_t mode = S_IRUSR | S_IWUSR; // user read and write allowed - irc = mkfifo(name.c_str(), mode); + irc = ::mkfifo(name.c_str(), mode); if (irc != 0) { emsg.InitErrno("RlinkPortFifo::OpenFifo()", string("mkfifo() for '") + name + "' failed: ", @@ -111,7 +111,7 @@ int RlinkPortFifo::OpenFifo(const std::string& name, bool snd, RerrMsg& emsg) } } - irc = open(name.c_str(), snd ? O_WRONLY : O_RDONLY); + irc = ::open(name.c_str(), snd ? O_WRONLY : O_RDONLY); if (irc < 0) { emsg.InitErrno("RlinkPortFifo::OpenFifo()", string("open() for '") + name + "' failed: ", diff --git a/tools/src/librlink/RlinkPortTerm.cpp b/tools/src/librlink/RlinkPortTerm.cpp index 7ba6dafb..9c3cb64e 100644 --- a/tools/src/librlink/RlinkPortTerm.cpp +++ b/tools/src/librlink/RlinkPortTerm.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkPortTerm.cpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: RlinkPortTerm.cpp 607 2014-11-30 20:02:48Z mueller $ // // Copyright 2011-2013 by Walter F.J. Mueller // @@ -25,7 +25,7 @@ /*! \file - \version $Id: RlinkPortTerm.cpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: RlinkPortTerm.cpp 607 2014-11-30 20:02:48Z mueller $ \brief Implemenation of RlinkPortTerm. */ @@ -137,11 +137,11 @@ bool RlinkPortTerm::Open(const std::string& url, RerrMsg& emsg) return false; } - if (tcgetattr(fd, &fTiosOld) != 0) { + if (::tcgetattr(fd, &fTiosOld) != 0) { emsg.InitErrno("RlinkPortTerm::Open()", string("tcgetattr() for '") + fUrl.Path() + "' failed: ", errno); - close(fd); + ::close(fd); return false; } @@ -171,7 +171,7 @@ bool RlinkPortTerm::Open(const std::string& url, RerrMsg& emsg) fTiosNew.c_lflag = 0; - if (cfsetspeed(&fTiosNew, speed) != 0) { + if (::cfsetspeed(&fTiosNew, speed) != 0) { emsg.InitErrno("RlinkPortTerm::Open()", string("cfsetspeed() for '") + baud + "' failed: ", errno); @@ -195,11 +195,11 @@ bool RlinkPortTerm::Open(const std::string& url, RerrMsg& emsg) fTiosNew.c_cc[VSTOP] = kc_xoff; // setup XOFF -> ^S } - if (tcsetattr(fd, TCSANOW, &fTiosNew) != 0) { + if (::tcsetattr(fd, TCSANOW, &fTiosNew) != 0) { emsg.InitErrno("RlinkPortTerm::Open()", string("tcsetattr() for '") + fUrl.Path() + "' failed: ", errno); - close(fd); + ::close(fd); return false; } @@ -208,11 +208,11 @@ bool RlinkPortTerm::Open(const std::string& url, RerrMsg& emsg) // and verified. struct termios tios; - if (tcgetattr(fd, &tios) != 0) { + if (::tcgetattr(fd, &tios) != 0) { emsg.InitErrno("RlinkPortTerm::Open()", string("2nd tcgetattr() for '") + fUrl.Path() + "' failed: ", errno); - close(fd); + ::close(fd); return false; } @@ -221,8 +221,8 @@ bool RlinkPortTerm::Open(const std::string& url, RerrMsg& emsg) if (tios.c_oflag != fTiosNew.c_oflag) pmsg = "c_oflag"; if (tios.c_cflag != fTiosNew.c_cflag) pmsg = "c_cflag"; if (tios.c_lflag != fTiosNew.c_lflag) pmsg = "c_lflag"; - if (cfgetispeed(&tios) != speed) pmsg = "ispeed"; - if (cfgetospeed(&tios) != speed) pmsg = "ospeed"; + if (::cfgetispeed(&tios) != speed) pmsg = "ispeed"; + if (::cfgetospeed(&tios) != speed) pmsg = "ospeed"; for (int i=0; i= 0) { - tcflush(fFdWrite, TCIOFLUSH); - tcsetattr(fFdWrite, TCSANOW, &fTiosOld); + ::tcflush(fFdWrite, TCIOFLUSH); + ::tcsetattr(fFdWrite, TCSANOW, &fTiosOld); } RlinkPort::Close(); diff --git a/tools/src/librlink/RlinkServer.cpp b/tools/src/librlink/RlinkServer.cpp index 06250c23..30a6b480 100644 --- a/tools/src/librlink/RlinkServer.cpp +++ b/tools/src/librlink/RlinkServer.cpp @@ -1,6 +1,6 @@ -// $Id: RlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ +// $Id: RlinkServer.cpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-11 611 2.0 re-organize for rlink v4 // 2013-05-01 513 1.0.2 fTraceLevel now uint32_t // 2013-04-21 509 1.0.1 add Resume(), reorganize server start handling // 2013-03-06 495 1.0 Initial version @@ -21,7 +22,7 @@ /*! \file - \version $Id: RlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ + \version $Id: RlinkServer.cpp 611 2014-12-10 23:23:58Z mueller $ \brief Implemenation of RlinkServer. */ @@ -58,8 +59,8 @@ RlinkServer::RlinkServer() fWakeupEvent(), fELoop(this), fServerThread(), - fAttnSeen(false), fAttnPatt(0), + fAttnNotiPatt(0), fTraceLevel(0), fStats() { @@ -261,16 +262,25 @@ void RlinkServer::Wakeup() //------------------------------------------+----------------------------------- //! FIXME_docs -void RlinkServer::SignalAttn() +void RlinkServer::SignalAttnNotify(uint16_t apat) { - boost::lock_guard lock(*fspConn); - fAttnSeen = true; + // only called under lock !! + if (apat & fAttnNotiPatt) { + RlogMsg lmsg(LogFile(), 'W'); + lmsg << "SignalAttnNotify: redundant notify: " + << " have=" << RosPrintBvi(fAttnNotiPatt,16) + << " apat=" << RosPrintBvi(apat,16); + } + fAttnNotiPatt |= apat; Wakeup(); return; } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active. +/*! + \returns \c true if server active. + */ bool RlinkServer::IsActive() const { @@ -278,7 +288,10 @@ bool RlinkServer::IsActive() const } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active and caller is inside server thread. +/*! + \returns \c true if server active and method is called from server thread. + */ bool RlinkServer::IsActiveInside() const { @@ -286,7 +299,11 @@ bool RlinkServer::IsActiveInside() const } //------------------------------------------+----------------------------------- -//! FIXME_docs +//! Indicates whether server is active and caller is outside server thread. +/*! + \returns \c true if server active and method is called from a thread + other than the server thread. + */ bool RlinkServer::IsActiveOutside() const { @@ -330,8 +347,8 @@ void RlinkServer::Dump(std::ostream& os, int ind, const char* text) const os << bl << " fActnList.size: " << fActnList.size() << endl; fELoop.Dump(os, ind+2, "fELoop"); os << bl << " fServerThread: " << fServerThread.get_id() << endl; - os << bl << " fAttnSeen: " << fAttnSeen << endl; os << bl << " fAttnPatt: " << RosPrintBvi(fAttnPatt,16) << endl; + os << bl << " fAttnNotiPatt: " << RosPrintBvi(fAttnNotiPatt,16) << endl; fStats.Dump(os, ind+2, "fStats: "); return; } @@ -349,10 +366,10 @@ void RlinkServer::StartOrResume(bool resume) "Bad state: RlinkConnect not open"); boost::lock_guard lock(Connect()); - // enable attn comma send + // enable attn notify send RlinkCommandList clist; if (!resume) clist.AddAttn(); - clist.AddInit(RlinkCommand::kRbaddr_IInt, RlinkCommand::kIInt_M_AnEna); + clist.AddWreg(RlinkConnect::kRbaddr_RLCNTL, RlinkConnect::kRLCNTL_M_AnEna); Exec(clist); // setup poll handler for Rlink traffic @@ -381,8 +398,17 @@ void RlinkServer::StartOrResume(bool resume) void RlinkServer::CallAttnHandler() { - if (fAttnSeen) { + // FIXME_code: this is still V3 logic + // notifier pattern is ignored, only that one was received is used + if (fAttnNotiPatt) { boost::lock_guard lock(*fspConn); + uint16_t onoti = fAttnNotiPatt; + + // Clear fAttnNotiPatt before clist is issued ! This avoids a race + // in case the attn read is followed immediately by a notify which + // is signaled during Exec(). + fAttnNotiPatt = 0; + RlinkCommandList clist; clist.AddAttn(); fStats.Inc(kStatNAttnRead); @@ -390,10 +416,17 @@ void RlinkServer::CallAttnHandler() // FIXME_code: handle errors: bool ok = uint16_t nattn = clist[0].Data(); fAttnPatt |= nattn; + + if (onoti & (~nattn)) { // bits in notify not in attn ? + RlogMsg lmsg(LogFile(), 'W'); + lmsg << "CallAttnHandler: missing lams in attn: " + << " attn=" << RosPrintBvi(nattn,16) + << " noti=" << RosPrintBvi(onoti,16); + } + for (size_t i=0; i<16; i++) { if (nattn & (uint16_t(1)< lock(*fspConn); - RerrMsg emsg; - int irc = fspConn->PollAttn(emsg); - if (irc > 0) { - fAttnSeen = true; - } - + fspConn->HandleUnsolicitedData(); return 0; } diff --git a/tools/src/librlink/RlinkServer.hpp b/tools/src/librlink/RlinkServer.hpp index a6a6d8c0..94e85714 100644 --- a/tools/src/librlink/RlinkServer.hpp +++ b/tools/src/librlink/RlinkServer.hpp @@ -1,6 +1,6 @@ -// $Id: RlinkServer.hpp 513 2013-05-01 14:02:06Z mueller $ +// $Id: RlinkServer.hpp 607 2014-11-30 20:02:48Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-30 607 2.0 re-organize for rlink v4 // 2013-05-01 513 1.0.2 fTraceLevel now uint32_t // 2013-04-21 509 1.0.1 add Resume(), reorganize server start handling // 2013-03-06 495 1.0 Initial version @@ -21,7 +22,7 @@ /*! \file - \version $Id: RlinkServer.hpp 513 2013-05-01 14:02:06Z mueller $ + \version $Id: RlinkServer.hpp 607 2014-11-30 20:02:48Z mueller $ \brief Declaration of class \c RlinkServer. */ @@ -94,7 +95,7 @@ namespace Retro { void Stop(); void Resume(); void Wakeup(); - void SignalAttn(); + void SignalAttnNotify(uint16_t apat); bool IsActive() const; bool IsActiveInside() const; @@ -110,27 +111,27 @@ namespace Retro { // statistics counter indices enum stats { - kStatNEloopWait = 0, - kStatNEloopPoll, - kStatNWakeupEvt, - kStatNRlinkEvt, - kStatNAttnRead, - kStatNAttn00, - kStatNAttn01, - kStatNAttn02, - kStatNAttn03, - kStatNAttn04, - kStatNAttn05, - kStatNAttn06, - kStatNAttn07, - kStatNAttn08, - kStatNAttn09, - kStatNAttn10, - kStatNAttn11, - kStatNAttn12, - kStatNAttn13, - kStatNAttn14, - kStatNAttn15, + kStatNEloopWait = 0, //!< event loop turns (wait) + kStatNEloopPoll, //!< event loop turns (poll) + kStatNWakeupEvt, //!< Wakeup events + kStatNRlinkEvt, //!< Rlink data events + kStatNAttnRead, //!< Attn read commands + kStatNAttn00, //!< Attn bit 0 set + kStatNAttn01, //!< Attn bit 1 set + kStatNAttn02, //!< Attn bit 2 set + kStatNAttn03, //!< Attn bit 3 set + kStatNAttn04, //!< Attn bit 4 set + kStatNAttn05, //!< Attn bit 5 set + kStatNAttn06, //!< Attn bit 6 set + kStatNAttn07, //!< Attn bit 7 set + kStatNAttn08, //!< Attn bit 8 set + kStatNAttn09, //!< Attn bit 9 set + kStatNAttn10, //!< Attn bit 10 set + kStatNAttn11, //!< Attn bit 11 set + kStatNAttn12, //!< Attn bit 12 set + kStatNAttn13, //!< Attn bit 13 set + kStatNAttn14, //!< Attn bit 14 set + kStatNAttn15, //!< Attn bit 15 set kDimStat }; @@ -168,8 +169,8 @@ namespace Retro { ReventFd fWakeupEvent; RlinkServerEventLoop fELoop; boost::thread fServerThread; - bool fAttnSeen; - uint16_t fAttnPatt; + uint16_t fAttnPatt; //!< current attn pattern + uint16_t fAttnNotiPatt; //!< attn notifier pattern uint32_t fTraceLevel; //!< trace level Rstats fStats; //!< statistics }; diff --git a/tools/src/librlink/RlinkServer.ipp b/tools/src/librlink/RlinkServer.ipp index 506f6de3..75661b74 100644 --- a/tools/src/librlink/RlinkServer.ipp +++ b/tools/src/librlink/RlinkServer.ipp @@ -1,6 +1,6 @@ -// $Id: RlinkServer.ipp 513 2013-05-01 14:02:06Z mueller $ +// $Id: RlinkServer.ipp 610 2014-12-09 22:44:43Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-30 607 2.0 re-organize for rlink v4 // 2013-05-01 513 1.0.1 fTraceLevel now uint32_t // 2013-03-06 495 1.0 Initial version // 2013-01-12 474 0.5 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: RlinkServer.ipp 513 2013-05-01 14:02:06Z mueller $ + \version $Id: RlinkServer.ipp 610 2014-12-09 22:44:43Z mueller $ \brief Implemenation (inline) of RlinkServer. */ @@ -96,7 +97,7 @@ inline const Rstats& RlinkServer::Stats() const inline bool RlinkServer::AttnPending() const { - return fAttnSeen || fAttnPatt; + return fAttnNotiPatt | fAttnPatt; } //------------------------------------------+----------------------------------- diff --git a/tools/src/librlinktpp/Makefile b/tools/src/librlinktpp/Makefile index 58af2ed3..acbb5fe3 100644 --- a/tools/src/librlinktpp/Makefile +++ b/tools/src/librlinktpp/Makefile @@ -1,8 +1,9 @@ -# $Id: Makefile 529 2013-08-02 17:15:43Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment -# 2013-02-01 479 1.1.32 use checkpath_cpp.mk +# 2014-11-08 602 1.1.4 add TCLLIB/TCLLIBNAME to LDLIBS +# 2013-02-01 479 1.1.3 use checkpath_cpp.mk # 2013-01-27 478 1.1.2 add RtclRlinkPort # 2012-12-24 464 1.1.1 add TCLINC # 2011-07-31 401 1.1 rename realclean->distclean @@ -22,7 +23,8 @@ SOMINV = 0 include ../checkpath_cpp.mk # INCLFLAGS = -I${RETROBASE}/tools/src -I${TCLINC} -I${BOOSTINC} -LDLIBS = -L${RETROBASE}/tools/lib -lrtools -lrtcltools -lrlink +LDLIBS = -L$(TCLLIB) -l$(TCLLIBNAME) +LDLIBS += -L${RETROBASE}/tools/lib -lrtools -lrtcltools -lrlink # # Object files to be included # diff --git a/tools/src/librlinktpp/Rlinktpp_Init.cpp b/tools/src/librlinktpp/Rlinktpp_Init.cpp index 805848c7..a9e41f9d 100644 --- a/tools/src/librlinktpp/Rlinktpp_Init.cpp +++ b/tools/src/librlinktpp/Rlinktpp_Init.cpp @@ -1,6 +1,6 @@ -// $Id: Rlinktpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $ +// $Id: Rlinktpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.6 use nullptr // 2013-02-10 485 1.0.5 remove Tcl_InitStubs() // 2013-01-27 478 1.0.4 add rlinkport // 2013-01-12 474 1.0.3 add rlinkserver @@ -24,7 +25,7 @@ /*! \file - \version $Id: Rlinktpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $ + \version $Id: Rlinktpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of Rlinktpp_Init . */ @@ -61,7 +62,7 @@ extern "C" int Rlinktpp_Init(Tcl_Interp* interp) } catch (exception& e) { Tcl_AppendResult(interp, "-E: exception caught in Rlinktpp_Init: '", - e.what(), "'", NULL); + e.what(), "'", nullptr); } return TCL_ERROR; } diff --git a/tools/src/librlinktpp/RtclAttnShuttle.cpp b/tools/src/librlinktpp/RtclAttnShuttle.cpp index 3cf8a5fe..902c538a 100644 --- a/tools/src/librlinktpp/RtclAttnShuttle.cpp +++ b/tools/src/librlinktpp/RtclAttnShuttle.cpp @@ -1,6 +1,6 @@ -// $Id: RtclAttnShuttle.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclAttnShuttle.cpp 602 2014-11-08 21:42:47Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,8 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-08 602 1.0.3 cast int first to ptrdiff_t, than to ClientData +// 2014-08-22 584 1.0.2 use nullptr // 2013-05-20 521 1.0.1 Setup proper Tcl channel options // 2013-03-01 493 1.0 Initial version // 2013-01-12 475 0.5 First draft @@ -20,7 +22,7 @@ /*! \file - \version $Id: RtclAttnShuttle.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclAttnShuttle.cpp 602 2014-11-08 21:42:47Z mueller $ \brief Implemenation of class RtclAttnShuttle. */ @@ -83,11 +85,13 @@ void RtclAttnShuttle::Add(RlinkServer* pserv, Tcl_Interp* interp) fpServ = pserv; // connect to Tcl - fShuttleChn = Tcl_MakeFileChannel((ClientData)fFdPipeRead, TCL_READABLE); + // cast first to ptrdiff_t to promote to proper int size + fShuttleChn = Tcl_MakeFileChannel((ClientData)(ptrdiff_t)fFdPipeRead, + TCL_READABLE); - Tcl_SetChannelOption(NULL, fShuttleChn, "-buffersize", "64"); - Tcl_SetChannelOption(NULL, fShuttleChn, "-encoding", "binary"); - Tcl_SetChannelOption(NULL, fShuttleChn, "-translation", "binary"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-buffersize", "64"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-encoding", "binary"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-translation", "binary"); Tcl_CreateChannelHandler(fShuttleChn, TCL_READABLE, (Tcl_FileProc*) ThunkTclChannelHandler, @@ -141,7 +145,8 @@ void RtclAttnShuttle::TclChannelHandler(int mask) Tcl_ReadRaw(fShuttleChn, (char*) &apat, sizeof(apat)); // FIXME_code: handle return code - Tcl_SetVar2Ex(fpInterp, "Rlink_attnbits", NULL, Tcl_NewIntObj((int)apat), 0); + Tcl_SetVar2Ex(fpInterp, "Rlink_attnbits", nullptr, + Tcl_NewIntObj((int)apat), 0); // FIXME_code: handle return code Tcl_EvalObjEx(fpInterp, fpScript, TCL_EVAL_GLOBAL); diff --git a/tools/src/librlinktpp/RtclRlinkConnect.cpp b/tools/src/librlinktpp/RtclRlinkConnect.cpp index 21390e5e..9e46183b 100644 --- a/tools/src/librlinktpp/RtclRlinkConnect.cpp +++ b/tools/src/librlinktpp/RtclRlinkConnect.cpp @@ -1,4 +1,4 @@ -// $Id: RtclRlinkConnect.cpp 576 2014-08-02 12:24:28Z mueller $ +// $Id: RtclRlinkConnect.cpp 609 2014-12-07 19:35:25Z mueller $ // // Copyright 2011-2014 by Walter F.J. Mueller // @@ -13,7 +13,10 @@ // // Revision History: // Date Rev Version Comment -// 2014-08-02 576 1.1.7 bugfix: redo estatdef logic; avoid LastExpect() +// 2014-12-06 609 1.3 new rlink v4 iface +// 2014-08-22 584 1.2.1 use nullptr +// 2014-08-15 583 1.2 rb_mreq addr now 16 bit +// 2014-08-02 576 1.1.7 BUGFIX: redo estatdef logic; avoid LastExpect() // 2013-02-23 492 1.1.6 use RlogFile.Name(); use Context().ErrorCount() // 2013-02-22 491 1.1.5 use new RlogFile/RlogMsg interfaces // 2013-02-02 480 1.1.4 allow empty exec commands @@ -28,7 +31,7 @@ /*! \file - \version $Id: RtclRlinkConnect.cpp 576 2014-08-02 12:24:28Z mueller $ + \version $Id: RtclRlinkConnect.cpp 609 2014-12-07 19:35:25Z mueller $ \brief Implemenation of class RtclRlinkConnect. */ @@ -128,7 +131,7 @@ int RtclRlinkConnect::M_close(RtclArgs& args) int RtclRlinkConnect::M_exec(RtclArgs& args) { - static RtclNameSet optset("-rreg|-rblk|-wreg|-wblk|-stat|-attn|-init|" + static RtclNameSet optset("-rreg|-rblk|-wreg|-wblk|-labo|-attn|-init|" "-edata|-estat|-estatdef|" "-volatile|-print|-dump|-rlist"); @@ -159,7 +162,7 @@ int RtclRlinkConnect::M_exec(RtclArgs& args) } else if (opt == "-rblk") { // -rblk addr size ?varData ?varStat int32_t bsize; if (!GetAddr(args, Obj(), addr)) return kERR; - if (!args.GetArg("bsize", bsize, 1, 256)) return kERR; + if (!args.GetArg("bsize", bsize, 1, 2048)) return kERR; if (!GetVarName(args, "??varData", lsize, vardata)) return kERR; if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR; clist.AddRblk(addr, (size_t) bsize); @@ -174,14 +177,14 @@ int RtclRlinkConnect::M_exec(RtclArgs& args) } else if (opt == "-wblk") { // -wblk addr block ?varStat ------ vector block; if (!GetAddr(args, Obj(), addr)) return kERR; - if (!args.GetArg("data", block, 1, 256)) return kERR; + if (!args.GetArg("data", block, 1, 2048)) return kERR; if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR; clist.AddWblk(addr, block); - } else if (opt == "-stat") { // -stat varData ?varStat --------- + } else if (opt == "-labo") { // -labo varData ?varStat --------- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR; if (!GetVarName(args, "??varStat", lsize, varstat)) return kERR; - clist.AddStat(); + clist.AddLabo(); } else if (opt == "-attn") { // -attn varData ?varStat --------- if (!GetVarName(args, "??varData", lsize, vardata)) return kERR; @@ -237,10 +240,6 @@ int RtclRlinkConnect::M_exec(RtclArgs& args) estatdef_val = stat; estatdef_msk = mask; - } else if (opt == "-volatile") { // -volatile ---------------------- - if (!ClistNonEmpty(args, clist)) return kERR; - clist.LastVolatile(); - } else if (opt == "-print") { // -print ?varRes ----------------- varprint = "-"; if (!args.GetArg("??varRes", varprint)) return kERR; @@ -289,19 +288,12 @@ int RtclRlinkConnect::M_exec(RtclArgs& args) switch (cmd.Command()) { case RlinkCommand::kCmdRreg: case RlinkCommand::kCmdAttn: + case RlinkCommand::kCmdLabo: pres = Tcl_NewIntObj((int)cmd.Data()); break; - case RlinkCommand::kCmdRblk: pres = Rtcl::NewListIntObj(cmd.Block()); break; - - case RlinkCommand::kCmdStat: - retstat.resize(2); - retstat[0] = cmd.StatRequest(); - retstat[1] = cmd.Data(); - pres = Rtcl::NewListIntObj(retstat); - break; } if(!Rtcl::SetVar(interp, vardata[icmd], pres)) return kERR; } @@ -329,34 +321,31 @@ int RtclRlinkConnect::M_exec(RtclArgs& args) } if (!varlist.empty()) { - RtclOPtr prlist(Tcl_NewListObj(0, NULL)); + RtclOPtr prlist(Tcl_NewListObj(0, nullptr)); for (size_t icmd=0; icmdfirst); tpair[1] = Tcl_NewStringObj((it->second).c_str(),(it->second).length()); - Tcl_ListObjAppendElement(NULL, plist, Tcl_NewListObj(2, tpair)); + Tcl_ListObjAppendElement(nullptr, plist, Tcl_NewListObj(2, tpair)); } args.SetResult(plist); } @@ -490,15 +479,24 @@ int RtclRlinkConnect::M_errcnt(RtclArgs& args) int RtclRlinkConnect::M_wtlam(RtclArgs& args) { double tout; + string rvn_apat; if (!args.GetArg("tout", tout, 0.001)) return kERR; + if (!args.GetArg("??varApat", rvn_apat)) return kERR; if (!args.AllDone()) return kERR; RerrMsg emsg; - double twait = Obj().WaitAttn(tout, emsg); + uint16_t apat = 0; - if (twait == -2.) { + double twait = Obj().WaitAttn(tout, apat, emsg); + + if (rvn_apat.length()) { + if(!Rtcl::SetVar(args.Interp(), rvn_apat, + Tcl_NewIntObj((int)apat))) return kERR; + } + + if (twait == -2.) { // IO error return args.Quit(emsg); - } else if (twait == -1.) { + } else if (twait == -1.) { // timeout if (Obj().GetLogOpts().printlevel >= 1) { RlogMsg lmsg(Obj().LogFile()); lmsg << "-- wtlam to=" << RosPrintf(tout, "f", 0,3) @@ -525,7 +523,7 @@ int RtclRlinkConnect::M_wtlam(RtclArgs& args) int RtclRlinkConnect::M_oob(RtclArgs& args) { - static RtclNameSet optset("-rlmon|-rbmon|-sbcntl|-sbdata"); + static RtclNameSet optset("-rlmon|-rlbmon|-rbmon|-sbcntl|-sbdata"); string opt; uint16_t addr; @@ -536,13 +534,19 @@ int RtclRlinkConnect::M_oob(RtclArgs& args) if (opt == "-rlmon") { // oob -rlmon (0|1) if (!args.GetArg("val", data, 1)) return kERR; if (!args.AllDone()) return kERR; - addr = 15; // rlmon on bit 15 + addr = RlinkConnect:: kSBCNTL_V_RLMON; // rlmon enable bit + if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) return args.Quit(emsg); + + } else if (opt == "-rlbmon") { // oob -rlbmon (0|1) + if (!args.GetArg("val", data, 1)) return kERR; + if (!args.AllDone()) return kERR; + addr = RlinkConnect:: kSBCNTL_V_RLBMON; // rlbmon enable bit if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) return args.Quit(emsg); } else if (opt == "-rbmon") { // oob -rbmon (0|1) if (!args.GetArg("val", data, 1)) return kERR; if (!args.AllDone()) return kERR; - addr = 14; // rbmon on bit 14 + addr = RlinkConnect:: kSBCNTL_V_RBMON; // rbmon enable bit if (!Obj().SndOob(0x00, (addr<<8)+data, emsg)) return args.Quit(emsg); } else if (opt == "-sbcntl") { // oob -sbcntl bit (0|1) @@ -584,6 +588,8 @@ int RtclRlinkConnect::M_stats(RtclArgs& args) RtclStats::Context cntx; if (!RtclStats::GetArgs(args, cntx)) return kERR; if (!RtclStats::Collect(args, cntx, Obj().Stats())) return kERR; + if (!RtclStats::Collect(args, cntx, Obj().SndStats())) return kERR; + if (!RtclStats::Collect(args, cntx, Obj().RcvStats())) return kERR; if (Obj().Port()) { if (!RtclStats::Collect(args, cntx, Obj().Port()->Stats())) return kERR; } @@ -734,12 +740,12 @@ bool RtclRlinkConnect::GetAddr(RtclArgs& args, RlinkConnect& conn, int tstint; // if a number is given.. - if (Tcl_GetIntFromObj(NULL, pobj, &tstint) == kOK) { - if (tstint >= 0 && tstint <= 0x00ff) { + if (Tcl_GetIntFromObj(nullptr, pobj, &tstint) == kOK) { + if (tstint >= 0 && tstint <= 0xffff) { addr = (uint16_t)tstint; } else { args.AppendResult("-E: value '", Tcl_GetString(pobj), - "' for 'addr' out of range 0...0x00ff", NULL); + "' for 'addr' out of range 0...0xffff", nullptr); return false; } // if a name is given @@ -750,7 +756,7 @@ bool RtclRlinkConnect::GetAddr(RtclArgs& args, RlinkConnect& conn, addr = tstaddr; } else { args.AppendResult("-E: no address mapping known for '", - Tcl_GetString(pobj), "'", NULL); + Tcl_GetString(pobj), "'", nullptr); return false; } } @@ -772,7 +778,7 @@ bool RtclRlinkConnect::GetVarName(RtclArgs& args, const char* argname, char c = name[0]; if (isdigit(c) || c=='+' || c=='-' ) { // check for mistaken number args.AppendResult("-E: invalid variable name '", name.c_str(), - "': looks like a number", NULL); + "': looks like a number", nullptr); return false; } } @@ -790,7 +796,7 @@ bool RtclRlinkConnect::ConfigBase(RtclArgs& args, uint32_t& base) if (!args.Config("??base", tmp, 16, 2)) return false; if (tmp != base && tmp != 2 && tmp !=8 && tmp != 16) { args.AppendResult("-E: base must be 2, 8, or 16, found '", - args.PeekArgString(-1), "'", NULL); + args.PeekArgString(-1), "'", nullptr); return false; } base = tmp; @@ -806,7 +812,7 @@ bool RtclRlinkConnect::ClistNonEmpty(RtclArgs& args, { if (clist.Size() == 0) { args.AppendResult("-E: -edata, -estat, or -volatile " - "not allowed on empty command list", NULL); + "not allowed on empty command list", nullptr); return false; } return true; diff --git a/tools/src/librlinktpp/RtclRlinkPort.cpp b/tools/src/librlinktpp/RtclRlinkPort.cpp index 54999a8a..764c4aa9 100644 --- a/tools/src/librlinktpp/RtclRlinkPort.cpp +++ b/tools/src/librlinktpp/RtclRlinkPort.cpp @@ -1,6 +1,6 @@ -// $Id: RtclRlinkPort.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclRlinkPort.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.3 use nullptr // 2013-02-23 492 1.0.2 use RlogFile.Name(); // 2013-02-22 491 1.0.1 use new RlogFile/RlogMsg interfaces // 2013-01-27 478 1.0 Initial version @@ -20,7 +21,7 @@ /*! \file - \version $Id: RtclRlinkPort.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclRlinkPort.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of class RtclRlinkPort. */ @@ -244,7 +245,7 @@ int RtclRlinkPort::M_default(RtclArgs& args) bool RtclRlinkPort::TestOpen(RtclArgs& args) { if (fpObj) return true; - args.AppendResult("-E: port not open", NULL); + args.AppendResult("-E: port not open", nullptr); return false; } diff --git a/tools/src/librlinktpp/RtclRlinkServer.cpp b/tools/src/librlinktpp/RtclRlinkServer.cpp index 431dbfd9..155ccc35 100644 --- a/tools/src/librlinktpp/RtclRlinkServer.cpp +++ b/tools/src/librlinktpp/RtclRlinkServer.cpp @@ -1,6 +1,6 @@ -// $Id: RtclRlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ +// $Id: RtclRlinkServer.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.6 use nullptr // 2013-05-01 513 1.0.5 TraceLevel now uint32_t // 2013-04-26 510 1.0.4 change M_attn, now -info instead of -show // 2013-04-21 509 1.0.3 add server -resume @@ -23,7 +24,7 @@ /*! \file - \version $Id: RtclRlinkServer.cpp 513 2013-05-01 14:02:06Z mueller $ + \version $Id: RtclRlinkServer.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of class RtclRlinkServer. */ @@ -195,9 +196,10 @@ int RtclRlinkServer::M_attn(RtclArgs& args) for (alist_it_t it = fAttnHdl.begin(); it != fAttnHdl.end(); it++) { if ((*it)->Mask() & mask) { RtclOPtr pele(Tcl_NewListObj(0,0)); - Tcl_ListObjAppendElement(NULL, pele, Tcl_NewIntObj((*it)->Mask()) ); - Tcl_ListObjAppendElement(NULL, pele, (*it)->Script() ); - Tcl_ListObjAppendElement(NULL, pres, pele); + Tcl_ListObjAppendElement(nullptr, pele, + Tcl_NewIntObj((*it)->Mask()) ); + Tcl_ListObjAppendElement(nullptr, pele, (*it)->Script() ); + Tcl_ListObjAppendElement(nullptr, pres, pele); } } args.SetResult(pres); diff --git a/tools/src/librtcltools/Rtcl.cpp b/tools/src/librtcltools/Rtcl.cpp index 927296f2..28c6d8b3 100644 --- a/tools/src/librtcltools/Rtcl.cpp +++ b/tools/src/librtcltools/Rtcl.cpp @@ -1,6 +1,6 @@ -// $Id: Rtcl.cpp 488 2013-02-16 18:49:47Z mueller $ +// $Id: Rtcl.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.5 use nullptr // 2013-01-06 473 1.0.4 add NewListIntObj(const uint(8|16)_t, ...) // 2011-03-13 369 1.0.2 add NewListIntObj(vector) // 2011-03-05 366 1.0.1 add AppendResultNewLines() @@ -22,7 +23,7 @@ /*! \file - \version $Id: Rtcl.cpp 488 2013-02-16 18:49:47Z mueller $ + \version $Id: Rtcl.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of Rtcl. */ @@ -54,7 +55,7 @@ Tcl_Obj* Rtcl::NewLinesObj(const std::string& str) Tcl_Obj* Rtcl::NewListIntObj(const uint8_t* data, size_t size) { - if (size == 0) return Tcl_NewListObj(0, NULL); + if (size == 0) return Tcl_NewListObj(0, nullptr); vector vobj; vobj.reserve(size); @@ -70,7 +71,7 @@ Tcl_Obj* Rtcl::NewListIntObj(const uint8_t* data, size_t size) Tcl_Obj* Rtcl::NewListIntObj(const uint16_t* data, size_t size) { - if (size == 0) return Tcl_NewListObj(0, NULL); + if (size == 0) return Tcl_NewListObj(0, nullptr); vector vobj; vobj.reserve(size); @@ -111,7 +112,7 @@ bool Rtcl::SetVar(Tcl_Interp* interp, const std::string& varname, Tcl_Obj* pobj) pos_pend == string::npos || pos_pend != varname.length()-1 || pos_pend-pos_pbeg <= 1) { Tcl_AppendResult(interp, "illformed array name '", varname.c_str(), - "'", NULL); + "'", nullptr); return false; } string arrname(varname.substr(0,pos_pbeg)); @@ -120,7 +121,7 @@ bool Rtcl::SetVar(Tcl_Interp* interp, const std::string& varname, Tcl_Obj* pobj) pret = Tcl_SetVar2Ex(interp, arrname.c_str(), elename.c_str(), pobj, TCL_LEAVE_ERR_MSG); } else { - pret = Tcl_SetVar2Ex(interp, varname.c_str(), NULL, pobj, + pret = Tcl_SetVar2Ex(interp, varname.c_str(), nullptr, pobj, TCL_LEAVE_ERR_MSG); } @@ -149,7 +150,7 @@ void Rtcl::AppendResultNewLines(Tcl_Interp* interp) // that allows to append output from multiple AppendResultLines properly const char* res = Tcl_GetStringResult(interp); if (res && res[0]) { - Tcl_AppendResult(interp, "\n", NULL); + Tcl_AppendResult(interp, "\n", nullptr); } return; } diff --git a/tools/src/librtcltools/RtclArgs.cpp b/tools/src/librtcltools/RtclArgs.cpp index 3110ad2e..95dd4e42 100644 --- a/tools/src/librtcltools/RtclArgs.cpp +++ b/tools/src/librtcltools/RtclArgs.cpp @@ -1,6 +1,6 @@ -// $Id: RtclArgs.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclArgs.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.8 use nullptr // 2013-05-19 521 1.0.7 add NextSubOpt() method, pass optset's as const // 2013-02-12 487 1.0.6 add CurrentArg() method // 2013-02-03 481 1.0.5 use Rexception @@ -27,7 +28,7 @@ /*! \file - \version $Id: RtclArgs.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclArgs.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclArgs. */ @@ -454,7 +455,7 @@ bool RtclArgs::AllDone() if (fArgErr || fOptErr) return false; if (fNDone < fObjc) { AppendResult("-E: superfluous arguments, first one '", - Tcl_GetString(fObjv[fNDone]), "'", NULL); + Tcl_GetString(fObjv[fNDone]), "'", nullptr); return false; } return true; @@ -475,7 +476,7 @@ const char* RtclArgs::PeekArgString(int rind) const void RtclArgs::AppendResult(const char* str, ...) { - Tcl_AppendResult(fpInterp, str, NULL); + Tcl_AppendResult(fpInterp, str, nullptr); va_list ap; va_start (ap, str); Tcl_AppendResultVA(fpInterp, ap); @@ -491,9 +492,9 @@ void RtclArgs::AppendResultLines(const std::string& str) Rtcl::AppendResultNewLines(fpInterp); if (str.length()>0 && str[str.length()-1]=='\n') { - Tcl_AppendResult(fpInterp, str.substr(0,str.length()-1).c_str(), NULL); + Tcl_AppendResult(fpInterp, str.substr(0,str.length()-1).c_str(), nullptr); } else { - Tcl_AppendResult(fpInterp, str.c_str(), NULL); + Tcl_AppendResult(fpInterp, str.c_str(), nullptr); } return; } @@ -512,7 +513,7 @@ bool RtclArgs::NextArg(const char* name, Tcl_Obj*& pobj) if (fNDone == fObjc) { if (!isopt) { - AppendResult("-E: required argument '", name, "' missing", NULL); + AppendResult("-E: required argument '", name, "' missing", nullptr); fArgErr = true; return false; } @@ -578,7 +579,7 @@ bool RtclArgs::ConfigReadCheck() if (fNConfigRead != 0) { SetResult(Tcl_NewObj()); AppendResult("-E: only one config read allowed per command, '", - PeekArgString(-1), "' is second", NULL); + PeekArgString(-1), "' is second", nullptr); return false; } fNConfigRead += 1; diff --git a/tools/src/librtcltools/RtclClassBase.cpp b/tools/src/librtcltools/RtclClassBase.cpp index 733b04bc..92c2f229 100644 --- a/tools/src/librtcltools/RtclClassBase.cpp +++ b/tools/src/librtcltools/RtclClassBase.cpp @@ -1,6 +1,6 @@ -// $Id: RtclClassBase.cpp 488 2013-02-16 18:49:47Z mueller $ +// $Id: RtclClassBase.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.4 use nullptr // 2013-02-10 485 1.0.3 add static const defs // 2013-01-13 474 1.0.2 TclClassCmd(): check for existing Rtclproxy names // 2011-03-05 366 1.0.1 use AppendResultNewLines() in exception catcher @@ -22,7 +23,7 @@ /*! \file - \version $Id: RtclClassBase.cpp 488 2013-02-16 18:49:47Z mueller $ + \version $Id: RtclClassBase.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclClassBase. */ @@ -103,7 +104,7 @@ int RtclClassBase::TclClassCmd(Tcl_Interp* interp, int objc, if (pprox) { Tcl_AppendResult(interp, "-E: command name '", name, "' exists already as RtclProxy of type '", - pprox->Type().c_str(), "'", NULL); + pprox->Type().c_str(), "'", nullptr); return kERR; } @@ -119,7 +120,7 @@ int RtclClassBase::ClassCmdList(Tcl_Interp* interp) { std::vector list; RtclContext::Find(interp).ListProxy(list, Type()); - RtclOPtr rlist(Tcl_NewListObj(0, NULL)); + RtclOPtr rlist(Tcl_NewListObj(0, nullptr)); for (size_t i=0; iToken()); @@ -139,26 +140,26 @@ int RtclClassBase::ClassCmdDelete(Tcl_Interp* interp, const char* name) { Tcl_CmdInfo cinfo; if (Tcl_GetCommandInfo(interp, name, &cinfo) == 0) { - Tcl_AppendResult(interp, "-E: unknown command name '", name, "'", NULL); + Tcl_AppendResult(interp, "-E: unknown command name '", name, "'", nullptr); return kERR; } RtclContext& cntx = RtclContext::Find(interp); if (!cntx.CheckProxy((RtclProxyBase*) cinfo.objClientData)) { Tcl_AppendResult(interp, "-E: command '", name, "' is not a RtclProxy", - NULL); + nullptr); return kERR; } if (!cntx.CheckProxy((RtclProxyBase*) cinfo.objClientData, Type())) { Tcl_AppendResult(interp, "-E: command '", name, "' is not a RtclProxy of type '", - Type().c_str(), "'", NULL); + Type().c_str(), "'", nullptr); return kERR; } int irc = Tcl_DeleteCommand(interp, name); if (irc != kOK) Tcl_AppendResult(interp, "-E: failed to delete '", name, - "'", NULL); + "'", nullptr); return irc; } @@ -170,7 +171,7 @@ int RtclClassBase::ThunkTclClassCmd(ClientData cdata, Tcl_Interp* interp, { if (!cdata) { Tcl_AppendResult(interp, "-E: BUG! ThunkTclClassCmd called with cdata == 0", - NULL); + nullptr); return kERR; } @@ -179,7 +180,7 @@ int RtclClassBase::ThunkTclClassCmd(ClientData cdata, Tcl_Interp* interp, } catch (exception& e) { Rtcl::AppendResultNewLines(interp); Tcl_AppendResult(interp, "-E: exception caught in ThunkTclClassCmd: '", - e.what(), "'", NULL); + e.what(), "'", nullptr); } return kERR; } diff --git a/tools/src/librtcltools/RtclCmdBase.cpp b/tools/src/librtcltools/RtclCmdBase.cpp index e2bd62d0..d3d957c6 100644 --- a/tools/src/librtcltools/RtclCmdBase.cpp +++ b/tools/src/librtcltools/RtclCmdBase.cpp @@ -1,6 +1,6 @@ -// $Id: RtclCmdBase.cpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: RtclCmdBase.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.3 use nullptr // 2013-02-10 485 1.0.2 add static const defs // 2013-02-05 483 1.0.1 remove 'unknown specified, full match only' logic // 2013-02-02 480 1.0 Initial version (refactored out from ProxyBase) @@ -20,7 +21,7 @@ /*! \file - \version $Id: RtclCmdBase.cpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: RtclCmdBase.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclCmdBase. */ @@ -94,11 +95,11 @@ int RtclCmdBase::DispatchCmd(RtclArgs& args) } Tcl_AppendResult(interp, "-E: bad option '", name.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (mmap_cit_t it1=fMapMeth.begin(); it1!=fMapMeth.end(); it1++) { if (it1->first.c_str()[0] != '$') { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } } @@ -111,11 +112,11 @@ int RtclCmdBase::DispatchCmd(RtclArgs& args) it1++; if (it1!=fMapMeth.end() && name==it1->first.substr(0,name.length())) { Tcl_AppendResult(interp, "-E: ambiguous option '", - name.c_str(), "': must be ", NULL); + name.c_str(), "': must be ", nullptr); const char* delim = ""; for (it1=it_match; it1!=fMapMeth.end() && name==it1->first.substr(0,name.length()); it1++) { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } return kERR; diff --git a/tools/src/librtcltools/RtclGetList.cpp b/tools/src/librtcltools/RtclGetList.cpp index 01b9f8c0..1155af3b 100644 --- a/tools/src/librtcltools/RtclGetList.cpp +++ b/tools/src/librtcltools/RtclGetList.cpp @@ -1,6 +1,6 @@ -// $Id: RtclGetList.cpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: RtclGetList.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,12 +13,13 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.1 use nullptr // 2013-02-12 487 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RtclGetList.cpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: RtclGetList.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of class RtclGetList. */ @@ -83,10 +84,10 @@ int RtclGetList::M_get(RtclArgs& args) // complain if not found if (it == fMap.end() || pname != it->first.substr(0,pname.length())) { Tcl_AppendResult(interp, "-E: unknown property '", pname.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (map_cit_t it1=fMap.begin(); it1!=fMap.end(); it1++) { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } return TCL_ERROR; @@ -97,11 +98,11 @@ int RtclGetList::M_get(RtclArgs& args) it1++; if (it1!=fMap.end() && pname==it1->first.substr(0,pname.length())) { Tcl_AppendResult(interp, "-E: ambiguous property name '", pname.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (it1=it; it1!=fMap.end() && pname==it1->first.substr(0,pname.length()); it1++) { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } diff --git a/tools/src/librtcltools/RtclNameSet.cpp b/tools/src/librtcltools/RtclNameSet.cpp index 3e0205e3..85c7f5f3 100644 --- a/tools/src/librtcltools/RtclNameSet.cpp +++ b/tools/src/librtcltools/RtclNameSet.cpp @@ -1,6 +1,6 @@ -// $Id: RtclNameSet.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclNameSet.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.1.1 use nullptr // 2013-05-19 521 1.1 add CheckMatch() // 2013-02-03 481 1.0.1 use Rexception // 2011-02-20 363 1.0 Initial version @@ -20,7 +21,7 @@ /*! \file - \version $Id: RtclNameSet.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclNameSet.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclNameSet. */ @@ -103,10 +104,10 @@ int RtclNameSet::CheckMatch(Tcl_Interp* interp, std::string& rval, if (it==fSet.end() || tval!=it->substr(0,tval.length())) { if (misserr) { Tcl_AppendResult(interp, "-E: bad option '", tval.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (nset_cit_t it1=fSet.begin(); it1!=fSet.end(); it1++) { - Tcl_AppendResult(interp, delim, it1->c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->c_str(), nullptr); delim = ","; } } @@ -119,11 +120,11 @@ int RtclNameSet::CheckMatch(Tcl_Interp* interp, std::string& rval, it1++; if (it1!=fSet.end() && tval==it1->substr(0,tval.length())) { Tcl_AppendResult(interp, "-E: ambiguous option '", tval.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (it1=it; it1!=fSet.end() && tval==it1->substr(0,tval.length()); it1++) { - Tcl_AppendResult(interp, delim, it1->c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->c_str(), nullptr); delim = ","; } return 0; diff --git a/tools/src/librtcltools/RtclProxyBase.cpp b/tools/src/librtcltools/RtclProxyBase.cpp index 5413b344..b66b875e 100644 --- a/tools/src/librtcltools/RtclProxyBase.cpp +++ b/tools/src/librtcltools/RtclProxyBase.cpp @@ -1,6 +1,6 @@ -// $Id: RtclProxyBase.cpp 488 2013-02-16 18:49:47Z mueller $ +// $Id: RtclProxyBase.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.4.3 use nullptr // 2013-02-09 485 1.4.2 add CommandName() // 2013-02-05 483 1.4.1 ClassCmdConfig: use RtclArgs // 2013-02-02 480 1.4 factor out RtclCmdBase base class @@ -26,7 +27,7 @@ /*! \file - \version $Id: RtclProxyBase.cpp 488 2013-02-16 18:49:47Z mueller $ + \version $Id: RtclProxyBase.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclProxyBase. */ @@ -125,7 +126,7 @@ int RtclProxyBase::ThunkTclObjectCmd(ClientData cdata, Tcl_Interp* interp, { if (!cdata) { Tcl_AppendResult(interp, "-E: BUG! ThunkTclObjectCmd called with cdata==0", - NULL); + nullptr); return TCL_ERROR; } @@ -133,7 +134,7 @@ int RtclProxyBase::ThunkTclObjectCmd(ClientData cdata, Tcl_Interp* interp, return ((RtclProxyBase*) cdata)->TclObjectCmd(interp, objc, objv); } catch (exception& e) { Rtcl::AppendResultNewLines(interp); - Tcl_AppendResult(interp, "-E: exception caught '", e.what(), "'", NULL); + Tcl_AppendResult(interp, "-E: exception caught '", e.what(), "'", nullptr); } return TCL_ERROR; } diff --git a/tools/src/librtcltools/RtclSetList.cpp b/tools/src/librtcltools/RtclSetList.cpp index 786281e6..f6d19b28 100644 --- a/tools/src/librtcltools/RtclSetList.cpp +++ b/tools/src/librtcltools/RtclSetList.cpp @@ -1,6 +1,6 @@ -// $Id: RtclSetList.cpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: RtclSetList.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,12 +13,13 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.1 use nullptr // 2013-02-12 487 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RtclSetList.cpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: RtclSetList.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of class RtclSetList. */ @@ -83,10 +84,10 @@ int RtclSetList::M_set(RtclArgs& args) // complain if not found if (it == fMap.end() || pname != it->first.substr(0,pname.length())) { Tcl_AppendResult(interp, "-E: unknown property '", pname.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (map_cit_t it1=fMap.begin(); it1!=fMap.end(); it1++) { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } return TCL_ERROR; @@ -97,11 +98,11 @@ int RtclSetList::M_set(RtclArgs& args) it1++; if (it1!=fMap.end() && pname==it1->first.substr(0,pname.length())) { Tcl_AppendResult(interp, "-E: ambiguous property name '", pname.c_str(), - "': must be ", NULL); + "': must be ", nullptr); const char* delim = ""; for (it1=it; it1!=fMap.end() && pname==it1->first.substr(0,pname.length()); it1++) { - Tcl_AppendResult(interp, delim, it1->first.c_str(), NULL); + Tcl_AppendResult(interp, delim, it1->first.c_str(), nullptr); delim = ","; } @@ -115,9 +116,9 @@ int RtclSetList::M_set(RtclArgs& args) try { (it->second)->operator()(args); } catch (Rexception& e) { - Tcl_AppendResult(args.Interp(), ", ", e.ErrMsg().Text().c_str(), NULL); + Tcl_AppendResult(args.Interp(), ", ", e.ErrMsg().Text().c_str(), nullptr); } catch (exception& e) { - Tcl_AppendResult(args.Interp(), " -E: ", e.what(), NULL); + Tcl_AppendResult(args.Interp(), " -E: ", e.what(), nullptr); } return TCL_OK; diff --git a/tools/src/librtcltools/RtclStats.cpp b/tools/src/librtcltools/RtclStats.cpp index 3587d3cc..131d23ab 100644 --- a/tools/src/librtcltools/RtclStats.cpp +++ b/tools/src/librtcltools/RtclStats.cpp @@ -1,6 +1,6 @@ -// $Id: RtclStats.cpp 495 2013-03-06 17:13:48Z mueller $ +// $Id: RtclStats.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.2 use nullptr // 2013-03-06 495 1.0.1 Rename Exec->Collect // 2011-02-26 364 1.0 Initial version // 2011-02-20 363 0.1 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: RtclStats.cpp 495 2013-03-06 17:13:48Z mueller $ + \version $Id: RtclStats.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclStats. */ @@ -111,13 +112,13 @@ bool RtclStats::Collect(RtclArgs& args, const Context& cntx, for (size_t i=0; idistclean # 2011-03-27 374 1.0.1 removed Rnamed (obsolete now) @@ -19,7 +20,7 @@ SOMINV = 0 include ../checkpath_cpp.mk # INCLFLAGS = -I${BOOSTINC} -LDLIBS = -L${BOOSTLIB} -lboost_thread +LDLIBS = -L${BOOSTLIB} -lboost_thread -lboost_system # # Object files to be included # diff --git a/tools/src/librtools/RlogFile.cpp b/tools/src/librtools/RlogFile.cpp index 73a01c2c..1fa7efb6 100644 --- a/tools/src/librtools/RlogFile.cpp +++ b/tools/src/librtools/RlogFile.cpp @@ -1,6 +1,6 @@ -// $Id: RlogFile.cpp 539 2013-10-13 17:06:35Z mueller $ +// $Id: RlogFile.cpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-12-10 611 2.1.2 timestamp now usec precision (was msec) // 2013-10-11 539 2.1.1 fix date print (month was off by one) // 2013-02-23 492 2.1 add Name(), keep log file name; add Dump() // 2013-02-22 491 2.0 add Write(),IsNew(), RlogMsg iface; use lockable @@ -21,7 +22,7 @@ /*! \file - \version $Id: RlogFile.cpp 539 2013-10-13 17:06:35Z mueller $ + \version $Id: RlogFile.cpp 611 2014-12-10 23:23:58Z mueller $ \brief Implemenation of RlogFile. */ @@ -140,13 +141,11 @@ void RlogFile::Write(const std::string& str, char tag) fTagDay = tymd.tm_mday; } - int usec = (int)(tval.tv_usec/1000); - os << "-" << tag << "- " << RosPrintf(tymd.tm_hour,"d0",2) << ":" << RosPrintf(tymd.tm_min,"d0",2) << ":" << RosPrintf(tymd.tm_sec,"d0",2) << "." - << RosPrintf(usec,"d0",3) << " : "; + << RosPrintf((int)tval.tv_usec,"d0",6) << " : "; } os << str; diff --git a/tools/src/librtools/Rtools.cpp b/tools/src/librtools/Rtools.cpp index dae41b3a..452efed7 100644 --- a/tools/src/librtools/Rtools.cpp +++ b/tools/src/librtools/Rtools.cpp @@ -1,6 +1,6 @@ -// $Id: Rtools.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: Rtools.cpp 606 2014-11-24 07:08:51Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,9 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 1.0.4 add TimeOfDayAsDouble() +// 2014-11-08 602 1.0.5 add (int) cast in snprintf to match %d type +// 2014-08-22 584 1.0.4 use nullptr // 2013-05-04 516 1.0.3 add CreateBackupFile() // 2013-02-13 481 1.0.2 remove Throw(Logic|Runtime)(); use Rexception // 2011-04-10 376 1.0.1 add ThrowLogic(), ThrowRuntime() @@ -21,7 +24,7 @@ /*! \file - \version $Id: Rtools.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: Rtools.cpp 606 2014-11-24 07:08:51Z mueller $ \brief Implemenation of Rtools . */ @@ -29,6 +32,7 @@ #include #include #include +#include #include #include @@ -54,8 +58,8 @@ namespace Rtools { std::string Flags2String(uint32_t flags, const RflagName* fnam, char delim) { - if (fnam == 0) - throw Rexception("Rtools::Flags2String()","Bad args: fnam==NULL"); + if (fnam == nullptr) + throw Rexception("Rtools::Flags2String()","Bad args: fnam==nullptr"); string rval; while (fnam->mask) { @@ -120,7 +124,7 @@ bool CreateBackupFile(const std::string& fname, size_t nbackup, RerrMsg& emsg) fnames.push_back(fname); for (size_t i=1; i<=nbackup; i++) { char fnum[4]; - snprintf(fnum, 4, "%d", i); + snprintf(fnum, 4, "%d", (int)i); fnames.push_back(fbase + "_" + fnum + fext); } @@ -169,6 +173,28 @@ bool CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg) } return true; } + +//------------------------------------------+----------------------------------- +//! Returns the time-of-day as \c double value +/*! + Calls \c gettimeofday() and returns the current time as a \c double. + This is convenient for calculations with time values. + + \returns time is seconds as \a double with micro second resolution. + \throws Rexception in case \c gettimeofday() fails. + */ + +double TimeOfDayAsDouble() +{ + struct timeval tval; + int irc = ::gettimeofday(&tval, 0); + if (irc < 0) { + throw Rexception("Rtools::TimeOfDayAsDouble()", + "gettimeofday failed with ", errno); + } + return double(tval.tv_sec) + 1.e-6*double(tval.tv_usec); +} + } // end namespace Rtools } // end namespace Retro diff --git a/tools/src/librtools/Rtools.hpp b/tools/src/librtools/Rtools.hpp index e02f29bc..e9eec8f3 100644 --- a/tools/src/librtools/Rtools.hpp +++ b/tools/src/librtools/Rtools.hpp @@ -1,6 +1,6 @@ -// $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $ +// $Id: Rtools.hpp 611 2014-12-10 23:23:58Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-23 606 1.0.4 add TimeOfDayAsDouble() // 2013-05-04 516 1.0.3 add CreateBackupFile(), String2Long() // 2013-02-13 481 1.0.2 remove ThrowLogic(), ThrowRuntime() // 2011-04-10 376 1.0.1 add ThrowLogic(), ThrowRuntime() @@ -21,7 +22,7 @@ /*! \file - \version $Id: Rtools.hpp 516 2013-05-05 21:24:52Z mueller $ + \version $Id: Rtools.hpp 611 2014-12-10 23:23:58Z mueller $ \brief Declaration of class Rtools . */ @@ -53,6 +54,8 @@ namespace Retro { bool CreateBackupFile(const std::string& fname, size_t nbackup, RerrMsg& emsg); bool CreateBackupFile(const RparseUrl& purl, RerrMsg& emsg); + + double TimeOfDayAsDouble(); }; } // end namespace Retro diff --git a/tools/src/librutiltpp/Makefile b/tools/src/librutiltpp/Makefile index 508bde3d..c6fd7f1b 100644 --- a/tools/src/librutiltpp/Makefile +++ b/tools/src/librutiltpp/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile 529 2013-08-02 17:15:43Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-11-08 602 1.1.3 add TCLLIB/TCLLIBNAME to LDLIBS # 2013-02-01 479 1.1.2 use checkpath_cpp.mk # 2012-12-24 464 1.1.1 add TCLINC # 2011-07-31 401 1.1 rename realclean->distclean @@ -21,7 +22,8 @@ SOMINV = 0 include ../checkpath_cpp.mk # INCLFLAGS = -I${RETROBASE}/tools/src -I${TCLINC} -I${BOOSTINC} -LDLIBS = -lpthread +LDLIBS = -lpthread +LDLIBS += -L$(TCLLIB) -l$(TCLLIBNAME) LDLIBS += -L${RETROBASE}/tools/lib -lrtcltools # # Object files to be included diff --git a/tools/src/librutiltpp/RtclBvi.cpp b/tools/src/librutiltpp/RtclBvi.cpp index 1a9c867e..708b6b30 100644 --- a/tools/src/librutiltpp/RtclBvi.cpp +++ b/tools/src/librutiltpp/RtclBvi.cpp @@ -1,6 +1,6 @@ -// $Id: RtclBvi.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclBvi.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011- by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.2 use nullptr // 2011-11-28 434 1.0.1 DoCmd(): use intptr_t cast for lp64 compatibility // 2011-03-27 374 1.0 Initial version // 2011-02-13 361 0.1 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: RtclBvi.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclBvi.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclBvi. */ @@ -51,8 +52,8 @@ static const int kERR = TCL_ERROR; void RtclBvi::CreateCmds(Tcl_Interp* interp) { - Tcl_CreateObjCommand(interp, "bvi", DoCmd, (ClientData) kStr2Int, NULL); - Tcl_CreateObjCommand(interp, "pbvi", DoCmd, (ClientData) kInt2Str, NULL); + Tcl_CreateObjCommand(interp, "bvi", DoCmd, (ClientData) kStr2Int, nullptr); + Tcl_CreateObjCommand(interp, "pbvi", DoCmd, (ClientData) kInt2Str, nullptr); return; } @@ -77,7 +78,7 @@ int RtclBvi::DoCmd(ClientData cdata, Tcl_Interp* interp, int objc, return kERR; } - RtclOPtr rlist(Tcl_NewListObj(0, NULL)); + RtclOPtr rlist(Tcl_NewListObj(0, nullptr)); for (int i=0; i3 && pval[1]=='"' && pval[lval-1]=='"') { if (strchr("bBoOdDxX", pval[0]) == 0) { Tcl_AppendResult(interp, "-E: bad prefix in c'dddd' format string", - NULL); + nullptr); return 0; } form = pval[0]; @@ -153,13 +154,13 @@ Tcl_Obj* RtclBvi::DoConv(Tcl_Interp* interp, ConvMode mode, Tcl_Obj* val, if (eptr != pval+lval) { Tcl_AppendResult(interp, "-E: conversion error in '", - Tcl_GetString(val), "'", NULL); + Tcl_GetString(val), "'", nullptr); return 0; } if (lres > (1ul< 32) { Tcl_AppendResult(interp, "-E: invalid bvi format '", opt, "'", - " bit count > 32", NULL); + " bit count > 32", nullptr); return false; } } else { Tcl_AppendResult(interp, "-E: invalid bvi format '", opt, "'", - " allowed: [bBoOxXl][0-9]*", NULL); + " allowed: [bBoOxXl][0-9]*", nullptr); return false; } break; diff --git a/tools/src/librutiltpp/RtclSignalAction.cpp b/tools/src/librutiltpp/RtclSignalAction.cpp index e968142f..b292b7ee 100644 --- a/tools/src/librutiltpp/RtclSignalAction.cpp +++ b/tools/src/librutiltpp/RtclSignalAction.cpp @@ -1,4 +1,4 @@ -// $Id: RtclSignalAction.cpp 577 2014-08-03 20:49:42Z mueller $ +// $Id: RtclSignalAction.cpp 602 2014-11-08 21:42:47Z mueller $ // // Copyright 2013-2014 by Walter F.J. Mueller // @@ -13,13 +13,15 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-08 602 1.0.3 cast int first to ptrdiff_t, than to ClientData +// 2014-08-22 584 1.0.2 use nullptr // 2014-08-02 577 1.0.1 add include unistd.h (write+pipe dcl) // 2013-05-17 521 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RtclSignalAction.cpp 577 2014-08-03 20:49:42Z mueller $ + \version $Id: RtclSignalAction.cpp 602 2014-11-08 21:42:47Z mueller $ \brief Implemenation of class RtclSignalAction. */ @@ -125,7 +127,7 @@ bool RtclSignalAction::ClearAction(int signum, RerrMsg& emsg) return false; } - if (::sigaction(signum, &fOldAction[signum], NULL) != 0) { + if (::sigaction(signum, &fOldAction[signum], nullptr) != 0) { emsg.InitErrno("RtclSignalAction::ClearAction", "sigaction() failed: ", errno); return false; @@ -165,7 +167,8 @@ void RtclSignalAction::TclChannelHandler(int mask) Tcl_Read(fShuttleChn, (char*) &signum, sizeof(signum)); // FIXME_code: handle return code - Tcl_SetVar2Ex(fpInterp, "Rutil_signum", NULL, Tcl_NewIntObj((int)signum), 0); + Tcl_SetVar2Ex(fpInterp, "Rutil_signum", nullptr, + Tcl_NewIntObj((int)signum), 0); // FIXME_code: handle return code if ((Tcl_Obj*)fpScript[(int)signum]) { @@ -236,11 +239,13 @@ RtclSignalAction::RtclSignalAction(Tcl_Interp* interp) fFdPipeRead = pipefd[0]; fFdPipeWrite = pipefd[1]; - fShuttleChn = Tcl_MakeFileChannel((ClientData)fFdPipeRead, TCL_READABLE); + // cast first to ptrdiff_t to promote to proper int size + fShuttleChn = Tcl_MakeFileChannel((ClientData)(ptrdiff_t)fFdPipeRead, + TCL_READABLE); - Tcl_SetChannelOption(NULL, fShuttleChn, "-buffersize", "64"); - Tcl_SetChannelOption(NULL, fShuttleChn, "-encoding", "binary"); - Tcl_SetChannelOption(NULL, fShuttleChn, "-translation", "binary"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-buffersize", "64"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-encoding", "binary"); + Tcl_SetChannelOption(nullptr, fShuttleChn, "-translation", "binary"); Tcl_CreateChannelHandler(fShuttleChn, TCL_READABLE, (Tcl_FileProc*) ThunkTclChannelHandler, diff --git a/tools/src/librutiltpp/RtclSystem.cpp b/tools/src/librutiltpp/RtclSystem.cpp index a6f76e32..e53aec1e 100644 --- a/tools/src/librutiltpp/RtclSystem.cpp +++ b/tools/src/librutiltpp/RtclSystem.cpp @@ -1,6 +1,6 @@ -// $Id: RtclSystem.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: RtclSystem.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,12 +13,13 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.1 use nullptr // 2013-05-17 521 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RtclSystem.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: RtclSystem.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclSystem. */ @@ -58,11 +59,11 @@ static const int kERR = TCL_ERROR; void RtclSystem::CreateCmds(Tcl_Interp* interp) { Tcl_CreateObjCommand(interp, "rutil::isatty", Isatty, - (ClientData) 0, NULL); + (ClientData) 0, nullptr); Tcl_CreateObjCommand(interp, "rutil::sigaction", SignalAction, - (ClientData) 0, NULL); + (ClientData) 0, nullptr); Tcl_CreateObjCommand(interp, "rutil::waitpid", WaitPid, - (ClientData) 0, NULL); + (ClientData) 0, nullptr); return; } @@ -150,14 +151,15 @@ int RtclSystem::SignalAction(ClientData cdata, Tcl_Interp* interp, Tcl_Obj* pobj; if (pact->GetAction(siglist[i], pobj, emsg)) { RtclOPtr pele(Tcl_NewListObj(0,0)); - Tcl_ListObjAppendElement(NULL, pele, + Tcl_ListObjAppendElement(nullptr, pele, Tcl_NewStringObj(signum2nam(siglist[i]),-1)); if (pobj) { - Tcl_ListObjAppendElement(NULL, pele, pobj); + Tcl_ListObjAppendElement(nullptr, pele, pobj); } else { - Tcl_ListObjAppendElement(NULL, pele, Tcl_NewStringObj("{}",-1)); + Tcl_ListObjAppendElement(nullptr, pele, + Tcl_NewStringObj("{}",-1)); } - Tcl_ListObjAppendElement(NULL, pres, pele); + Tcl_ListObjAppendElement(nullptr, pres, pele); } } args.SetResult(pres); diff --git a/tools/src/librutiltpp/Rutiltpp_Init.cpp b/tools/src/librutiltpp/Rutiltpp_Init.cpp index 28483cfe..d76c0f20 100644 --- a/tools/src/librutiltpp/Rutiltpp_Init.cpp +++ b/tools/src/librutiltpp/Rutiltpp_Init.cpp @@ -1,6 +1,6 @@ -// $Id: Rutiltpp_Init.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: Rutiltpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2011-2013 by Walter F.J. Mueller +// Copyright 2011-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.4 use nullptr // 2013-05-17 512 1.0.3 add RtclSystem::CreateCmds() // 2013-02-10 485 1.0.2 remove Tcl_InitStubs() // 2011-03-20 372 1.0.1 renamed ..tcl -> ..tpp @@ -21,7 +22,7 @@ /*! \file - \version $Id: Rutiltpp_Init.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: Rutiltpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of Rutiltpp_Init . */ @@ -52,7 +53,7 @@ extern "C" int Rutiltpp_Init(Tcl_Interp* interp) } catch (exception& e) { Tcl_AppendResult(interp, "-E: exception caught in Rutiltpp_Init: '", - e.what(), "'", NULL); + e.what(), "'", nullptr); } return TCL_ERROR; } diff --git a/tools/src/librw11/Rw11Cpu.cpp b/tools/src/librw11/Rw11Cpu.cpp index 883f6fad..ef975a51 100644 --- a/tools/src/librw11/Rw11Cpu.cpp +++ b/tools/src/librw11/Rw11Cpu.cpp @@ -1,4 +1,4 @@ -// $Id: Rw11Cpu.cpp 576 2014-08-02 12:24:28Z mueller $ +// $Id: Rw11Cpu.cpp 602 2014-11-08 21:42:47Z mueller $ // // Copyright 2013-2014 by Walter F.J. Mueller // @@ -21,7 +21,7 @@ /*! \file - \version $Id: Rw11Cpu.cpp 576 2014-08-02 12:24:28Z mueller $ + \version $Id: Rw11Cpu.cpp 602 2014-11-08 21:42:47Z mueller $ \brief Implemenation of Rw11Cpu. */ #include @@ -416,7 +416,7 @@ bool Rw11Cpu::LoadAbs(const std::string& fname, RerrMsg& emsg, bool trace) }; typedef std::map obmap_t; - typedef obmap_t::iterator obmap_it_t; + //typedef obmap_t::iterator obmap_it_t; typedef obmap_t::const_iterator obmap_cit_t; typedef obmap_t::value_type obmap_val_t; diff --git a/tools/src/librw11/Rw11UnitVirt.ipp b/tools/src/librw11/Rw11UnitVirt.ipp index 8cefc39b..c2e80bda 100644 --- a/tools/src/librw11/Rw11UnitVirt.ipp +++ b/tools/src/librw11/Rw11UnitVirt.ipp @@ -1,6 +1,6 @@ -// $Id: Rw11UnitVirt.ipp 515 2013-05-04 17:28:59Z mueller $ +// $Id: Rw11UnitVirt.ipp 600 2014-11-02 22:33:02Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-11-02 600 1.1.1 add (bool) cast, needed in 4.8.2 // 2013-05-03 515 1.1 use AttachDone(),DetachCleanup(),DetachDone() // 2013-03-03 494 1.0 Initial version // 2013-02-05 483 0.1 First draft @@ -20,7 +21,7 @@ /*! \file - \version $Id: Rw11UnitVirt.ipp 515 2013-05-04 17:28:59Z mueller $ + \version $Id: Rw11UnitVirt.ipp 600 2014-11-02 22:33:02Z mueller $ \brief Implemenation (inline) of Rw11UnitVirt. */ @@ -74,7 +75,7 @@ inline bool Rw11UnitVirt::Attach(const std::string& url, RerrMsg& emsg) if (fpVirt) Detach(); fpVirt.reset(TV::New(url, this, emsg)); if (fpVirt) AttachDone(); - return fpVirt; + return (bool)fpVirt; } //------------------------------------------+----------------------------------- diff --git a/tools/src/librw11/Rw11VirtTermTcp.cpp b/tools/src/librw11/Rw11VirtTermTcp.cpp index 703b8063..9ec3ebd2 100644 --- a/tools/src/librw11/Rw11VirtTermTcp.cpp +++ b/tools/src/librw11/Rw11VirtTermTcp.cpp @@ -1,6 +1,6 @@ -// $Id: Rw11VirtTermTcp.cpp 521 2013-05-20 22:16:45Z mueller $ +// $Id: Rw11VirtTermTcp.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.4 use nullptr // 2013-05-17 512 1.0.3 use Rtools::String2Long // 2013-05-05 516 1.0.2 fix mistakes in emsg generation with errno // 2013-04-20 508 1.0.1 add fSndPreConQue handling @@ -22,7 +23,7 @@ /*! \file - \version $Id: Rw11VirtTermTcp.cpp 521 2013-05-20 22:16:45Z mueller $ + \version $Id: Rw11VirtTermTcp.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of Rw11VirtTermTcp. */ @@ -264,7 +265,7 @@ int Rw11VirtTermTcp::ListenPollHandler(const pollfd& pfd) // bail-out and cancel handler if poll returns an error event if (pfd.revents & (~pfd.events)) return -1; - fFd = accept(fFdListen, NULL, 0); + fFd = accept(fFdListen, nullptr, 0); if (fFd < 0) { RlogMsg lmsg(LogFile(),'E'); diff --git a/tools/src/librwxxtpp/Makefile b/tools/src/librwxxtpp/Makefile index 36705379..1484b3a8 100644 --- a/tools/src/librwxxtpp/Makefile +++ b/tools/src/librwxxtpp/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile 561 2014-06-09 17:22:50Z mueller $ +# $Id: Makefile 602 2014-11-08 21:42:47Z mueller $ # # Revision History: # Date Rev Version Comment +# 2014-11-08 602 1.0.2 add TCLLIB/TCLLIBNAME to LDLIBS # 2013-02-01 479 1.0.1 correct so name (no digits allowed in tcl load...) # 2013-01-27 478 1.0 Initial version #--- @@ -17,7 +18,8 @@ SOMINV = 0 include ../checkpath_cpp.mk # INCLFLAGS = -I${RETROBASE}/tools/src -I${TCLINC} -I${BOOSTINC} -LDLIBS = -L${RETROBASE}/tools/lib -lrtools -lrtcltools +LDLIBS = -L$(TCLLIB) -l$(TCLLIBNAME) +LDLIBS += -L${RETROBASE}/tools/lib -lrtools -lrtcltools LDLIBS += -lrlink -lrw11 LDLIBS += -lrlinktpp # diff --git a/tools/src/librwxxtpp/RtclRw11Cpu.cpp b/tools/src/librwxxtpp/RtclRw11Cpu.cpp index 6034a34c..24211088 100644 --- a/tools/src/librwxxtpp/RtclRw11Cpu.cpp +++ b/tools/src/librwxxtpp/RtclRw11Cpu.cpp @@ -1,4 +1,4 @@ -// $Id: RtclRw11Cpu.cpp 576 2014-08-02 12:24:28Z mueller $ +// $Id: RtclRw11Cpu.cpp 607 2014-11-30 20:02:48Z mueller $ // // Copyright 2013-2014 by Walter F.J. Mueller // @@ -13,7 +13,9 @@ // // Revision History: // Date Rev Version Comment -// 2014-08-02 576 1.0.4 bugfix: redo estatdef logic; avoid LastExpect() +// 2014-11-30 607 1.1 new rlink v4 iface +// 2014-08-22 584 1.0.5 use nullptr +// 2014-08-02 576 1.0.4 BUGFIX: redo estatdef logic; avoid LastExpect() // 2014-03-02 552 1.0.3 M_cp: add -ral and -rah options (addr reg readback) // 2013-05-19 521 1.0.2 M_cp: merge -wibrb|-wibrbbe again; add -wa // 2013-04-26 511 1.0.1 add M_show @@ -23,7 +25,7 @@ /*! \file - \version $Id: RtclRw11Cpu.cpp 576 2014-08-02 12:24:28Z mueller $ + \version $Id: RtclRw11Cpu.cpp 607 2014-11-30 20:02:48Z mueller $ \brief Implemenation of RtclRw11Cpu. */ @@ -445,7 +447,9 @@ int RtclRw11Cpu::M_wtcpu(RtclArgs& args) if (!Server().IsActive()) { // server is not active RerrMsg emsg; - twait = Connect().WaitAttn(tout, emsg); + uint16_t apat; + // FIXME_code: make apat accessible in tcl + twait = Connect().WaitAttn(tout, apat, emsg); if (twait == -2.) { // wait failed, quit return args.Quit(emsg); } @@ -632,7 +636,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) } else { argv.push_back("-"); } - argv.push_back(NULL); + argv.push_back(nullptr); ::dup2(pipe_tcl2asm[0], STDIN_FILENO); ::dup2(pipe_asm2tcl[1], STDOUT_FILENO); @@ -664,7 +668,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) ::close(pipe_tcl2asm[1]); FILE* fp = ::fdopen(pipe_asm2tcl[0], "r"); - if (fp == NULL) { + if (fp == nullptr) { ::close(pipe_asm2tcl[0]); return args.Quit(RerrMsg("RtclRw11Cpu::M_ldasm" , "fdopen() failed: ", errno)); @@ -672,7 +676,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) vector ilines; while(true) { - char* pline = NULL; + char* pline = nullptr; size_t nchar; if (::getline(&pline, &nchar, fp) < 0) break; //cout << "+++2:" << pline; @@ -700,7 +704,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) typedef map cmap_t; typedef cmap_t::iterator cmap_it_t; - typedef cmap_t::value_type cmap_val_t; + //typedef cmap_t::value_type cmap_val_t; cmap_t cmap; uint16_t dot = 0; @@ -727,7 +731,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) string key = line.substr(0,dpos); string val= line.substr(dpos+4); if (!Tcl_SetVar2Ex(interp, varsym.c_str(), key.c_str(), - Tcl_NewIntObj((int)::strtol(val.c_str(),NULL,8)), + Tcl_NewIntObj((int)::strtol(val.c_str(),nullptr,8)), TCL_LEAVE_ERR_MSG)) return kERR; } else { return args.Quit(string("bad sym spec: ") + line); @@ -739,7 +743,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) if (line.length() != 10) return args.Quit(string("bad dat spec: ") + line); dtyp = line[0]; - dot = (uint16_t)::strtol(line.c_str()+2,NULL,8); + dot = (uint16_t)::strtol(line.c_str()+2,nullptr,8); } else if (line[0] == '}') { dtyp = ' '; } else { @@ -747,7 +751,7 @@ int RtclRw11Cpu::M_ldasm(RtclArgs& args) string dat; while (datstream >> dat) { //cout << "+++1 " << dtyp << ":" << dat << endl; - uint16_t val = (uint16_t)::strtol(dat.c_str(),NULL,8); + uint16_t val = (uint16_t)::strtol(dat.c_str(),nullptr,8); if (dtyp == 'w') { cmap[dot] = val; dot += 2; @@ -1111,7 +1115,7 @@ bool RtclRw11Cpu::GetVarName(RtclArgs& args, const char* argname, char c = name[0]; if (isdigit(c) || c=='+' || c=='-' ) { // check for mistaken number args.AppendResult("-E: invalid variable name '", name.c_str(), - "': looks like a number", NULL); + "': looks like a number", nullptr); return false; } } diff --git a/tools/src/librwxxtpp/RtclRw11UnitPC11.cpp b/tools/src/librwxxtpp/RtclRw11UnitPC11.cpp index 5c73c5bc..9f69cf7b 100644 --- a/tools/src/librwxxtpp/RtclRw11UnitPC11.cpp +++ b/tools/src/librwxxtpp/RtclRw11UnitPC11.cpp @@ -1,6 +1,6 @@ -// $Id: RtclRw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ +// $Id: RtclRw11UnitPC11.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,12 +13,13 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.1 use nullptr // 2013-05-03 515 1.0 Initial version // --------------------------------------------------------------------------- /*! \file - \version $Id: RtclRw11UnitPC11.cpp 515 2013-05-04 17:28:59Z mueller $ + \version $Id: RtclRw11UnitPC11.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of RtclRw11UnitPC11. */ @@ -54,7 +55,8 @@ RtclRw11UnitPC11::RtclRw11UnitPC11(Tcl_Interp* interp, if (unitcmd.length() == 8 && unitcmd.substr(4,3) == "pca") { string alias = unitcmd.substr(0,4); alias += (ind==Rw11CntlPC11::kUnit_PR) ? "pr" : "pp"; - Tcl_CreateAlias(interp, alias.c_str(), interp, unitcmd.c_str(), 0, NULL); + Tcl_CreateAlias(interp, alias.c_str(), interp, unitcmd.c_str(), + 0, nullptr); } } } diff --git a/tools/src/librwxxtpp/Rwxxtpp_Init.cpp b/tools/src/librwxxtpp/Rwxxtpp_Init.cpp index d9e4b28c..37fe3a7f 100644 --- a/tools/src/librwxxtpp/Rwxxtpp_Init.cpp +++ b/tools/src/librwxxtpp/Rwxxtpp_Init.cpp @@ -1,6 +1,6 @@ -// $Id: Rwxxtpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $ +// $Id: Rwxxtpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ // -// Copyright 2013- by Walter F.J. Mueller +// Copyright 2013-2014 by Walter F.J. Mueller // // This program is free software; you may redistribute and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -13,13 +13,14 @@ // // Revision History: // Date Rev Version Comment +// 2014-08-22 584 1.0.1 use nullptr // 2013-02-10 485 1.0 Initial version // 2013-01-27 478 0.1 First draft // --------------------------------------------------------------------------- /*! \file - \version $Id: Rwxxtpp_Init.cpp 504 2013-04-13 15:37:24Z mueller $ + \version $Id: Rwxxtpp_Init.cpp 584 2014-08-22 19:38:12Z mueller $ \brief Implemenation of Rwxxtpp_Init . */ @@ -49,7 +50,7 @@ extern "C" int Rwxxtpp_Init(Tcl_Interp* interp) } catch (exception& e) { Tcl_AppendResult(interp, "-E: exception caught in Rwxxtpp_Init: '", - e.what(), "'", NULL); + e.what(), "'", nullptr); } return TCL_ERROR; } diff --git a/tools/src/tclshcpp/.cvsignore b/tools/src/tclshcpp/.cvsignore new file mode 100644 index 00000000..49858186 --- /dev/null +++ b/tools/src/tclshcpp/.cvsignore @@ -0,0 +1 @@ +*.dep diff --git a/tools/src/tclshcpp/Makefile b/tools/src/tclshcpp/Makefile new file mode 100644 index 00000000..af2bb677 --- /dev/null +++ b/tools/src/tclshcpp/Makefile @@ -0,0 +1,54 @@ +# $Id: Makefile 601 2014-11-07 22:44:43Z mueller $ +# + +# +# Revision History: +# Date Rev Version Comment +# 2014-11-07 601 1.0 Initial version +# +# Compile and Link search paths +# +include ../checkpath_cpp.mk +# +INCLFLAGS = -I${TCLINC} +LDLIBS += -L$(TCLLIB) -l$(TCLLIBNAME) +# +BINPATH = $(RETROBASE)/tools/bin +# +# Object files to be included +# +OBJ_all = tclshcpp.o +# +DEP_all = $(OBJ_all:.o=.dep) +# +# link target +# +$(BINPATH)/tclshcpp : $(OBJ_all) + $(CXX) -o $(BINPATH)/tclshcpp $(OBJ_all) $(LDLIBS) + +#- generic part ---------------------------------------------------------------- +# +include $(RETROBASE)/tools/make/generic_cpp.mk +include $(RETROBASE)/tools/make/generic_dep.mk +include $(RETROBASE)/tools/make/dontincdep.mk +# +# The magic auto-dependency include +# +ifndef DONTINCDEP +include $(DEP_all) +endif +# +# cleanup phonies: +# +.PHONY : clean cleandep distclean +clean : + @ rm -f $(OBJ_all) + @ echo "Object files removed" +# +cleandep : + @ rm -f $(DEP_all) + @ echo "Dependency files removed" +# +distclean : + @ rm -f $(BINPATH)/tclshcpp + @ echo "Executable files removed" diff --git a/tools/src/tclshcpp/tclshcpp.cpp b/tools/src/tclshcpp/tclshcpp.cpp new file mode 100644 index 00000000..8c9a43b3 --- /dev/null +++ b/tools/src/tclshcpp/tclshcpp.cpp @@ -0,0 +1,47 @@ +// $Id: tclshcpp.cpp 601 2014-11-07 22:44:43Z mueller $ +// +// Copyright 2014- by Walter F.J. Mueller +// +// This program is free software; you may redistribute 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. +// +// 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 complete details. +// +// Revision History: +// Date Rev Version Comment +// 2014-11-07 601 1.0 Initial version + +// This code is the minimal code for a tclsh, as recommended by +// http://wiki.tcl.tk/1315 +// but also equivalent to the code in tclAppInit.c which is the source of +// tclsh when all ifdefs and options have been removed. +// +// Only difference to the plain C version is the inclusion of . +// This ensures that the C++ basing I/O streams are initialized before the +// Tcl interpreter starts. +// +// If iostream is not included one gets core dumps when a 'package require' +// loads a dynamic library which has C++ code and unresolved references. +// With iostream included one gets a proper error message. +// + +#include "tcl.h" +#include + +int main(int argc, char **argv) +{ + extern int Tcl_AppInit(Tcl_Interp *interp); + Tcl_Main(argc, argv, Tcl_AppInit); + return 0; +} + +int Tcl_AppInit(Tcl_Interp *interp) +{ + if (Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR; + Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY); + return TCL_OK; +} diff --git a/tools/src/testtclsh/Makefile b/tools/src/testtclsh/Makefile index 25a37b8e..b7230524 100644 --- a/tools/src/testtclsh/Makefile +++ b/tools/src/testtclsh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 529 2013-08-02 17:15:43Z mueller $ +# $Id: Makefile 601 2014-11-07 22:44:43Z mueller $ # # Revision History: # Date Rev Version Comment @@ -9,7 +9,8 @@ include ../checkpath_cpp.mk # INCLFLAGS = -I${TCLINC} -I${RETROBASE}/tools/src -LDLIBS = -ltcl -lreadline +LDLIBS = -lreadline +LDLIBS += -L$(TCLLIB) -l$(TCLLIBNAME) -lreadline LDLIBS += -L${RETROBASE}/tools/lib -lrtcltools LDLIBS += -lrutiltpp -lrlinktpp -lrwxxtpp #LDLIBS += -lrusbtpp diff --git a/tools/tcl/rbbram/perf.tcl b/tools/tcl/rbbram/perf.tcl index 07dd5084..8bfe46b3 100644 --- a/tools/tcl/rbbram/perf.tcl +++ b/tools/tcl/rbbram/perf.tcl @@ -1,4 +1,4 @@ -# $Id: perf.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: perf.tcl 609 2014-12-07 19:35:25Z mueller $ # # Copyright 2011-2013 by Walter F.J. Mueller # @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-12-06 609 1.1 test 512,1024,2000 word wblk/rbld; retra buffer cut # 2013-01-04 469 1.0.2 perf_blk: add optional 2nd arg: trace # 2012-12-27 465 1.0.1 adopt format, cover small ms and large kb # 2011-04-17 376 1.0 Initial version @@ -25,6 +26,8 @@ namespace eval rbbram { # perf_blk: determine wblk/rblk write performance # proc perf_blk {{tmax 1000} {trace 0}} { + set rbmax 2000; # FIXME_code: get proper buffer max + if {$tmax < 1} { error "-E: perf_blk: tmax argument must be >= 1" } set amax [regget rbbram::CNTL(addr) -1] @@ -33,7 +36,8 @@ namespace eval rbbram { append rval \ "\n ms/r kB/s ms/r kB/s ms/r kB/s ms/r kB/s ms/r kB/s ms/r kB/s" - foreach nblk {1 2 4 8 16 32 64 128 256} { + # 256 512 1024 + foreach nblk {1 2 4 8 16 32 64 128 256 512 1024 2000} { set wbuf0 {} set wbuf1 {} set wbuf2 {} @@ -108,50 +112,62 @@ namespace eval rbbram { lappend pval 1 $i $trun # double rblk - if {$trace} { puts "2 rblk for $nblk" } - set tbeg [clock clicks -milliseconds] - set addr 0x0000 - for {set i 1} {1} {incr i} { - rlc exec \ - -wreg br.cntl $addr \ - -rblk br.data $nblk rbuf0 \ - -rblk br.data $nblk rbuf1 - set trun [expr {[clock clicks -milliseconds] - $tbeg}] - if {$trun > $tmax} { break } + if {2*$nblk <= $rbmax} { + if {$trace} { puts "2 rblk for $nblk" } + set tbeg [clock clicks -milliseconds] + set addr 0x0000 + for {set i 1} {1} {incr i} { + rlc exec \ + -wreg br.cntl $addr \ + -rblk br.data $nblk rbuf0 \ + -rblk br.data $nblk rbuf1 + set trun [expr {[clock clicks -milliseconds] - $tbeg}] + if {$trun > $tmax} { break } set addr [expr {( $addr + 2 * $nblk ) & $amax}] + } + lappend pval 2 $i $trun + } else { + lappend pval 4 "-" "-" } - lappend pval 2 $i $trun # quad rblk - if {$trace} { puts "4 rblk for $nblk" } - set tbeg [clock clicks -milliseconds] - set addr 0x0000 - for {set i 1} {1} {incr i} { - rlc exec \ - -wreg br.cntl $addr \ - -rblk br.data $nblk rbuf0 \ - -rblk br.data $nblk rbuf1 \ - -rblk br.data $nblk rbuf2 \ - -rblk br.data $nblk rbuf3 - set trun [expr {[clock clicks -milliseconds] - $tbeg}] - if {$trun > $tmax} { break } - set addr [expr {( $addr + 4 * $nblk ) & $amax}] + if {4*$nblk <= $rbmax} { + if {$trace} { puts "4 rblk for $nblk" } + set tbeg [clock clicks -milliseconds] + set addr 0x0000 + for {set i 1} {1} {incr i} { + rlc exec \ + -wreg br.cntl $addr \ + -rblk br.data $nblk rbuf0 \ + -rblk br.data $nblk rbuf1 \ + -rblk br.data $nblk rbuf2 \ + -rblk br.data $nblk rbuf3 + set trun [expr {[clock clicks -milliseconds] - $tbeg}] + if {$trun > $tmax} { break } + set addr [expr {( $addr + 4 * $nblk ) & $amax}] + } + lappend pval 4 $i $trun + } else { + lappend pval 4 "-" "-" } - lappend pval 4 $i $trun set oline [format "\n%4d" $nblk] foreach {nr i trun} $pval { - set ms [expr {double($trun) / double($nr*$i)}] - set kb [expr {double(2*$nr*$i*$nblk) / double($trun)}] - if { $ms < 9.94 } { - append oline [format " %5.2f" $ms] + if {$i ne "-"} { + set ms [expr {double($trun) / double($nr*$i)}] + set kb [expr {double(2*$nr*$i*$nblk) / double($trun)}] + if { $ms < 9.94 } { + append oline [format " %5.2f" $ms] + } else { + append oline [format " %5.1f" $ms] + } + if { $kb > 999.9 } { + append oline [format " %5.0f" $kb] + } else { + append oline [format " %5.1f" $kb] + } } else { - append oline [format " %5.1f" $ms] - } - if { $kb > 999.9 } { - append oline [format " %5.0f" $kb] - } else { - append oline [format " %5.1f" $kb] + append oline " - -" } } diff --git a/tools/tcl/rbbram/util.tcl b/tools/tcl/rbbram/util.tcl index 5c05e5ec..4fcc19fb 100644 --- a/tools/tcl/rbbram/util.tcl +++ b/tools/tcl/rbbram/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: util.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout # 2011-03-19 372 1.0 Initial version # @@ -26,7 +27,7 @@ namespace eval rbbram { # # setup: amap definitions for rbd_bram # - proc setup {{base 0x00f4}} { + proc setup {base} { rlc amap -insert br.cntl [expr {$base + 0x00}] rlc amap -insert br.data [expr {$base + 0x01}] } diff --git a/tools/tcl/rbmoni/util.tcl b/tools/tcl/rbmoni/util.tcl index 8c322e9c..6b3d1a0c 100644 --- a/tools/tcl/rbmoni/util.tcl +++ b/tools/tcl/rbmoni/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: util.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout # 2011-03-27 374 1.0 Initial version # 2011-03-13 369 0.1 First draft # @@ -40,7 +41,7 @@ namespace eval rbmoni { # # setup: amap definitions for rbd_rbmon # - proc setup {{base 0x00fc}} { + proc setup {{base 0xffe8}} { rlc amap -insert rm.cntl [expr {$base + 0x00}] rlc amap -insert rm.alim [expr {$base + 0x01}] rlc amap -insert rm.addr [expr {$base + 0x02}] diff --git a/tools/tcl/rbtest/test_attn.tcl b/tools/tcl/rbtest/test_attn.tcl index b64c4edf..760cc690 100644 --- a/tools/tcl/rbtest/test_attn.tcl +++ b/tools/tcl/rbtest/test_attn.tcl @@ -1,6 +1,6 @@ -# $Id: test_attn.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: test_attn.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface # 2011-03-27 374 1.0 Initial version # 2011-03-20 372 0.1 First Draft # @@ -53,9 +54,9 @@ namespace eval rbtest { foreach apat $apats { rlc exec -estatdef $esdval $esdmsk \ -wreg te.attn $apat \ - -rreg te.attn -estat [regbld rlink::STAT attn] \ + -rreg te.cntl -estat [regbld rlink::STAT attn] \ -attn -edata $apat \ - -rreg te.attn -estat 0x0 + -rreg te.cntl -estat 0x0 } # @@ -68,12 +69,12 @@ namespace eval rbtest { # #------------------------------------------------------------------------- - rlc log " test 3: verify that comma is send" - set apat [lindex $apats 0] - rlc exec -init 0xff [regbld rlink::INIT anena] -estat $esdval $esdmsk - rlc exec -wreg te.attn $apat -estat $esdval $esdmsk - rlc wtlam 1. - rlc exec -attn -edata $apat -estat $esdval $esdmsk + #rlc log " test 3: verify that comma is send" + #set apat [lindex $apats 0] + #rlc exec -init 0xff [regbld rlink::INIT anena] -estat $esdval $esdmsk + #rlc exec -wreg te.attn $apat -estat $esdval $esdmsk + #rlc wtlam 1. + #rlc exec -attn -edata $apat -estat $esdval $esdmsk # #------------------------------------------------------------------------- diff --git a/tools/tcl/rbtest/test_data.tcl b/tools/tcl/rbtest/test_data.tcl index 54feaba4..398bec43 100644 --- a/tools/tcl/rbtest/test_data.tcl +++ b/tools/tcl/rbtest/test_data.tcl @@ -1,6 +1,6 @@ -# $Id: test_data.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: test_data.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface # 2011-03-27 374 1.0 Initial version # 2011-03-13 369 0.1 First Draft # @@ -25,7 +26,7 @@ package require rlink namespace eval rbtest { # - # Basic tests with cntl and data registers. + # Basic tests with cntl, stat, data and dinc registers. # All tests depend only on rbd_tester logic alone and not on how the # rbd_tester is embedded in the design (e.g. stat and attn connections) # @@ -41,9 +42,11 @@ namespace eval rbtest { rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl] # #------------------------------------------------------------------------- - rlc log " test 1a: cntl, data are write- and read-able" - foreach {addr valw valr} [list te.cntl 0xffff 0xf3ff \ + rlc log " test 1a: cntl, stat and data are write- and read-able" + foreach {addr valw valr} [list te.cntl 0xffff 0x83ff \ te.cntl 0x0000 0x0000 \ + te.stat 0xffff 0x000f \ + te.stat 0x0000 0x0000 \ te.data 0xffff 0xffff \ te.data 0x0000 0x0000 ] { rlc exec -wreg $addr $valw -estat $esdval $esdmsk @@ -51,38 +54,19 @@ namespace eval rbtest { } # # - rlc log " test 1b: as test 1a, now use clists and check cntl/data distinct" - foreach {valc vald} [list 0x0000 0x0000 [regbld rbtest::CNTL nofifo] 0xffff] { + rlc log " test 1b: as test 1a, use clists, check cntl,stat,data distinct" + foreach {valc vals vald} [list 0x1 0x2 0x3 0x0 0x0 0x0] { rlc exec -estatdef $esdval $esdmsk \ -wreg te.cntl $valc \ + -wreg te.stat $vals \ -wreg te.data $vald \ -rreg te.cntl -edata $valc \ + -rreg te.stat -edata $vals \ -rreg te.data -edata $vald } # - # - rlc log " test 1c: as test 1, now cntl.stat field is used" - foreach stat {0x1 0x3 0x7 0x0} { - set valc [regbld rbtest::CNTL [list stat $stat]] - set vald [expr {$stat | ( $stat << 8 ) }] - rlc exec -estatdef $esdval $esdmsk \ - -wreg te.cntl $valc \ - -wreg te.data $vald \ - -rreg te.cntl -edata $valc \ - -rreg te.data -edata $vald - } - # #------------------------------------------------------------------------- - rlc log " test 2: cntl.nbusy is write- and readable (last nbusy=0 again)" - foreach nbusy {0x00f 0x0ff 0x3ff 0x000} { - set valc [regbld rbtest::CNTL [list nbusy $nbusy]] - rlc exec -estatdef $esdval $esdmsk \ - -wreg te.cntl $valc \ - -rreg te.cntl -edata $valc - } - # - #------------------------------------------------------------------------- - rlc log " test 3: verify that large nbusy causes timeout" + rlc log " test 2: verify that large nbusy causes timeout" rlc exec -estatdef $esdval $esdmsk \ -wreg te.data 0xdead \ -rreg te.data -edata 0xdead \ @@ -93,63 +77,46 @@ namespace eval rbtest { -rreg te.data -edata 0xdead -edata 0xdead # # ------------------------------------------------------------------------- - rlc log " test 4a: verify that init 001 clears cntl and not data" - set valc [regbld rbtest::CNTL nofifo {stat 0x3}] + rlc log " test 3a: verify that init 001 clears cntl,stat and not data" + set valc [regbld rbtest::CNTL {nbusy 1}] rlc exec -estatdef $esdval $esdmsk \ -wreg te.cntl $valc \ + -wreg te.stat 0x0002 \ -wreg te.data 0x1234 \ -init te.cntl [regbld rbtest::INIT cntl] \ -rreg te.cntl -edata 0x0 \ + -rreg te.stat -edata 0x0 \ -wreg te.data 0x1234 - rlc log " test 4b: verify that init 010 clears data and not cntl" - set valc [regbld rbtest::CNTL {stat 0x7}] + rlc log " test 3b: verify that init 010 clears data and not cntl,stat" + set valc [regbld rbtest::CNTL {nbusy 2}] rlc exec -estatdef $esdval $esdmsk \ -wreg te.cntl $valc \ + -wreg te.stat 0x0003 \ -wreg te.data 0x4321 \ -init te.cntl [regbld rbtest::INIT data] \ -rreg te.cntl -edata $valc \ + -rreg te.stat -edata 0x0003 \ -wreg te.data 0x0 - rlc log " test 4c: verify that init 011 clears data and cntl" + rlc log " test 3c: verify that init 011 clears data and cntl,stat" rlc exec -estatdef $esdval $esdmsk \ - -wreg te.cntl [regbld rbtest::CNTL nofifo {stat 0x7} {nbusy 2}] \ + -wreg te.cntl [regbld rbtest::CNTL {nbusy 3}] \ + -wreg te.stat 0x0004 \ -wreg te.data 0xabcd \ -init te.cntl [regbld rbtest::INIT data cntl] \ -rreg te.cntl -edata 0x0 \ + -rreg te.stat -edata 0x0 \ -wreg te.data 0x0 # # ------------------------------------------------------------------------- - rlc log " test 5: test that te.attn returns # of cycles for te.data w&r" + rlc log " test 4: test that te.ncyc returns # of cycles for te.data w&r" foreach nbusy {0x03 0x07 0x0f 0x1f 0x00} { set valc [regbld rbtest::CNTL [list nbusy $nbusy]] rlc exec -estatdef $esdval $esdmsk \ -wreg te.cntl $valc \ -wreg te.data [expr {$nbusy | ( $nbusy << 8 ) }] \ - -rreg te.attn -edata [expr {$nbusy + 1 }] \ + -rreg te.ncyc -edata [expr {$nbusy + 1 }] \ -rreg te.data -edata [expr {$nbusy | ( $nbusy << 8 ) }] \ - -rreg te.attn -edata [expr {$nbusy + 1 }] - } - # - # ------------------------------------------------------------------------- - rlc log " test 6: verify stat command after te.data wreg & rreg" - set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \ - -wreg te.data 0x1234 \ - -stat ] - #rlist like: {wreg 90 23 0} {stat 4 39 0 90 1} - set xreg_ccode [lindex $rlist 0 1] - set stat_ccode [lindex $rlist 1 4] - if {$xreg_ccode != $stat_ccode} { - rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL" - incr errcnt - } - set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \ - -rreg te.data -edata 0x1234 \ - -stat -edata 0x1234] - #rlist like: {rreg 72 23 0 4660} {stat 12 39 0 72 4660} - set xreg_ccode [lindex $rlist 0 1] - set stat_ccode [lindex $rlist 1 4] - if {$xreg_ccode != $stat_ccode} { - rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL" - incr errcnt + -rreg te.ncyc -edata [expr {$nbusy + 1 }] } # #------------------------------------------------------------------------- diff --git a/tools/tcl/rbtest/test_fifo.tcl b/tools/tcl/rbtest/test_fifo.tcl index 70d36736..6232f9ee 100644 --- a/tools/tcl/rbtest/test_fifo.tcl +++ b/tools/tcl/rbtest/test_fifo.tcl @@ -1,6 +1,6 @@ -# $Id: test_fifo.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: test_fifo.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface # 2011-03-27 374 1.0 Initial version # 2011-03-13 369 0.1 First draft # @@ -84,50 +85,29 @@ namespace eval rbtest { -rblk te.fifo 16 -edata [lrange $blk 0 15] # #------------------------------------------------------------------------- - rlc log " test 4a: verify that init 100 clears fifo ant not cntl&data" + rlc log " test 4a: verify that init 100 clears fifo and not cntl&data" # check fifo empty; write a value; clear fifo via init; check fifo empty # check that cntl and data not affected rlc exec -estatdef $esdval $esdmsk \ - -wreg te.cntl [regbld rbtest::CNTL {stat 0x7}] \ + -wreg te.cntl [regbld rbtest::CNTL {nbusy 0x1}] \ -wreg te.data 0x1234 \ -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk \ -wreg te.fifo 0x4321 \ -init te.cntl [regbld rbtest::INIT fifo] \ -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk \ - -rreg te.cntl -edata [regbld rbtest::CNTL {stat 0x7}] \ + -rreg te.cntl -edata [regbld rbtest::CNTL {nbusy 0x1}] \ -rreg te.data -edata 0x1234 # - # - rlc log " test 4b: verify fifo clear via nofifo flag in cntl" - # write a value; set and clear nofifo flag in cntl; ckeck fifo empty - rlc exec -estatdef $esdval $esdmsk \ - -wreg te.fifo 0x4321 \ - -wreg te.cntl [regbld rbtest::CNTL nofifo] \ - -wreg te.cntl 0x0000 \ - -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk - # #------------------------------------------------------------------------- - rlc log " test 5: verify that nofifo causes a rbnak on fifo access" - # write fifo; set nofifo in cntl; write/read fifo(->rbnak); - # clr nofifo in cntl; read fifo(->rberr) - rlc exec -estatdef $esdval $esdmsk \ - -wreg te.fifo 0x12ab \ - -wreg te.cntl [regbld rbtest::CNTL nofifo] \ - -wreg te.fifo 0x12cd -estat [regbld rlink::STAT rbnak] $esdmsk \ - -rreg te.fifo -estat [regbld rlink::STAT rbnak] $esdmsk \ - -wreg te.cntl 0x0000 \ - -rreg te.fifo -estat [regbld rlink::STAT rberr] $esdmsk - # - #------------------------------------------------------------------------- - rlc log " test 6: test that te.attn returns # of cycles for te.fifo w&r" + rlc log " test 6: test that te.ncyc returns # of cycles for te.fifo w&r" foreach nbusy {0x03 0x07 0x0f 0x1f 0x00} { set valc [regbld rbtest::CNTL [list nbusy $nbusy]] rlc exec -estatdef $esdval $esdmsk \ -wreg te.cntl $valc \ -wreg te.fifo [expr {$nbusy | ( $nbusy << 8 ) }] \ - -rreg te.attn -edata [expr {$nbusy + 1 }] \ + -rreg te.ncyc -edata [expr {$nbusy + 1 }] \ -rreg te.fifo -edata [expr {$nbusy | ( $nbusy << 8 ) }] \ - -rreg te.attn -edata [expr {$nbusy + 1 }] + -rreg te.ncyc -edata [expr {$nbusy + 1 }] } # #------------------------------------------------------------------------- @@ -143,32 +123,6 @@ namespace eval rbtest { -rblk te.fifo [llength $blk] -edata $blk } # - # ------------------------------------------------------------------------- - rlc log " test 8: verify stat command after te.data wblk & rblk" - set blk {0x1234 0x2345} - set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \ - -wblk te.fifo $blk \ - -stat ] - #puts $rlist - #rlist like: {wblk 99 23 0} {stat 4 39 0 99 65279} - set xreg_ccode [lindex $rlist 0 1] - set stat_ccode [lindex $rlist 1 4] - if {$xreg_ccode != $stat_ccode} { - rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL" - incr errcnt - } - set rlist [rlc exec -rlist -estatdef $esdval $esdmsk \ - -rblk te.fifo [llength $blk] -edata $blk \ - -stat -edata 0x2345] - #puts $rlist - #{rblk 97 23 0 {4660 9029}} {stat 12 39 0 97 9029} - set xreg_ccode [lindex $rlist 0 1] - set stat_ccode [lindex $rlist 1 4] - if {$xreg_ccode != $stat_ccode} { - rlc log " ---- stat ccmd mismatch, d=[pbvi o8 $xreg_ccode]! D=[pbvi o8 $stat_ccode] FAIL" - incr errcnt - } - # #------------------------------------------------------------------------- rlc log "rbtest::test_fifo - cleanup: clear cntl, data, and fifo" rlc exec -init te.cntl [regbld rbtest::INIT fifo data cntl] diff --git a/tools/tcl/rbtest/test_stat.tcl b/tools/tcl/rbtest/test_stat.tcl index 8e3c9aa0..2215f692 100644 --- a/tools/tcl/rbtest/test_stat.tcl +++ b/tools/tcl/rbtest/test_stat.tcl @@ -1,6 +1,6 @@ -# $Id: test_stat.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: test_stat.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface # 2011-03-27 374 1.0 Initial version # 2011-03-20 372 0.1 First Draft # @@ -25,7 +26,7 @@ package require rlink namespace eval rbtest { # - # Test with stat connectivity of the cntl register. + # Test with stat connectivity of the stat register. # proc test_stat {{statmsk 0x0}} { # quit if nothing to do... @@ -40,13 +41,12 @@ namespace eval rbtest { # #------------------------------------------------------------------------- rlc log " test 1: verify connection of cntl stat bits to stat return" - for {set i 0} {$i < 3} {incr i} { + for {set i 0} {$i < 4} {incr i} { set spat [expr {1 << $i}] if {[expr {$spat & $statmsk}]} { - set cntl [regbld rbtest::CNTL [list stat $spat]] rlc exec \ - -wreg te.cntl $cntl \ - -rreg te.cntl -edata $cntl \ + -wreg te.stat $spat \ + -rreg te.stat -edata $spat \ -estat [regbld rlink::STAT [list stat $spat]] } } diff --git a/tools/tcl/rbtest/util.tcl b/tools/tcl/rbtest/util.tcl index 80529366..b5c39602 100644 --- a/tools/tcl/rbtest/util.tcl +++ b/tools/tcl/rbtest/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: util.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011-2013 by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface with 8 regs # 2011-03-27 374 1.0 Initial version # 2011-03-13 369 0.1 Frist draft # @@ -27,16 +28,20 @@ namespace eval rbtest { # # setup register descriptions for rbd_tester # - regdsc CNTL {nofifo 15} {stat 14 3} {nbusy 9 10} + regdsc CNTL {wchk 15} {nbusy 9 10} regdsc INIT {fifo 2} {data 1} {cntl 0} # # setup: amap definitions for rbd_tester # - proc setup {{base 0x00f0}} { + proc setup {{base 0xffe0}} { rlc amap -insert te.cntl [expr {$base + 0x00}] - rlc amap -insert te.data [expr {$base + 0x01}] - rlc amap -insert te.fifo [expr {$base + 0x02}] - rlc amap -insert te.attn [expr {$base + 0x03}] + rlc amap -insert te.stat [expr {$base + 0x01}] + rlc amap -insert te.attn [expr {$base + 0x02}] + rlc amap -insert te.ncyc [expr {$base + 0x03}] + rlc amap -insert te.data [expr {$base + 0x04}] + rlc amap -insert te.dinc [expr {$base + 0x05}] + rlc amap -insert te.fifo [expr {$base + 0x06}] + rlc amap -insert te.lnak [expr {$base + 0x07}] } # # init: reset rbd_tester (clear via init) @@ -46,14 +51,18 @@ namespace eval rbtest { } # # nbusymax: returns maximal nbusy value not causing timeout - # + # set te.cntl nbusy to max + # do read to te.data (will fail, check stat) + # get cycle count from te.ncyc --> this minus one is nbusymax + # restore te.cntl + proc nbusymax {} { set esdmsk [regbld rlink::STAT {stat -1} attn] rlc exec -estatdef 0 $esdmsk \ -rreg te.cntl sav_cntl \ -wreg te.cntl [regbld rbtest::CNTL {nbusy -1}] \ -rreg te.data -estat [regbld rlink::STAT rbnak] $esdmsk \ - -rreg te.attn ncyc + -rreg te.ncyc ncyc rlc exec -estatdef 0 $esdmsk \ -wreg te.cntl $sav_cntl return [expr {$ncyc - 1}] @@ -96,10 +105,9 @@ namespace eval rbtest { # # probe stat wiring # - for {set i 0} { $i < 3 } {incr i} { - set valc [regbld rbtest::CNTL [list stat [expr {1 << $i}]]] + for {set i 0} { $i < 4 } {incr i} { rlc exec -estatdef $esdval $esdmsk \ - -wreg te.cntl $valc \ + -wreg te.stat [expr {1 << $i}] \ -rreg te.data dummy statrd lappend rstat [list $i [regget rlink::STAT(stat) $statrd]] } @@ -137,17 +145,17 @@ namespace eval rbtest { append rval \ "\nnbusy: read max [lindex $rbusy 1 2] --> WIDTH=[lindex $rbusy 1 0]" # - for {set i 0} { $i < 3 } {incr i} { + for {set i 0} { $i < 4 } {incr i} { set rcvpat [lindex $rstat $i 1] set rcvind [print_bitind $rcvpat] - append rval [format "\nstat: te.cntl line %2d --> design %2d %s" \ - $i $rcvind [pbvi b3 $rcvpat]] + append rval [format "\nstat: te.stat line %2d --> design %2d %s" \ + $i $rcvind [pbvi b4 $rcvpat]] } # for {set i 0} { $i < 16 } {incr i} { set rcvpat [lindex $rattn $i 1] set rcvind [print_bitind $rcvpat] - append rval [format "\nattn: te.attn line %2d --> design %2d %s" \ + append rval [format "\nattn: te.attn line %2d --> design %2d %s" \ $i $rcvind [pbvi b16 $rcvpat]] } return $rval diff --git a/tools/tcl/rlink/util.tcl b/tools/tcl/rlink/util.tcl index e1440eb9..70e41635 100644 --- a/tools/tcl/rlink/util.tcl +++ b/tools/tcl/rlink/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 403 2011-08-06 17:36:22Z mueller $ +# $Id: util.tcl 609 2014-12-07 19:35:25Z mueller $ # -# Copyright 2011- by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,8 @@ # # Revision History: # Date Rev Version Comment +# 2014-12-07 609 2.0 use new rlink v4 iface; remove SINIT again +# 2014-08-09 580 1.0.2 add run_rri # 2011-08-06 403 1.0.1 add SINT and SINIT defs for serport init # 2011-03-26 373 1.0 Initial version # 2011-03-19 372 0.1 First draft @@ -23,9 +25,9 @@ package provide rlink 1.0 package require rutil 1.0 namespace eval rlink { - regdsc STAT {stat 7 3} {attn 4} {cerr 3} {derr 2} {rbnak 1} {rberr 0} - regdsc INIT {anena 15} {itoena 14} {itoval 7 8} - regdsc SINIT {fena 12} {fwidth 11 3} {fdelay 8 3} {rtsoff 5 3} {rtson 2 3} + regdsc STAT {stat 7 4} {attn 3} {rbnak 1} {rberr 0} + regdsc RLCNTL {anena 15} {atoena 14} {atoval 7 8} + regdsc RLSTAT {lcmd 15 8} {babo 7} {rbsize 2 3} # # 'pseudo register', describes 3rd word in return list element for -rlist regdsc FLAGS {vol 16} \ @@ -34,20 +36,38 @@ namespace eval rlink { {resend 7} {recov 6} {pktend 5} {pktbeg 4} \ {done 2} {send 1} {init 0} - variable IINT 0x00ff - variable SINT 0x00fe + # define rlink core regs addresses (are system constants) + variable ADDR_RLCNTL 0xffff + variable ADDR_RLSTAT 0xfffe + variable ADDR_RLID1 0xfffd + variable ADDR_RLID0 0xfffc + # + # setup: amap definitions for core config regs + # + proc setup {} { + rlc amap -insert rl.cntl $rlink::ADDR_RLCNTL + rlc amap -insert rl.stat $rlink::ADDR_RLSTAT + rlc amap -insert rl.id1 $rlink::ADDR_RLID1 + rlc amap -insert rl.id0 $rlink::ADDR_RLID0 + } # # init: reset rlink: disable enables; clear attn register # proc init {} { rlc exec \ - -init $rlink::IINT 0x0000 \ - -init $rlink::SINT [regbld rlink::SINIT {rtsoff 7} {rtson 6} ] \ + -wreg $rlink::ADDR_RLCNTL 0 \ -attn return "" } # + # anena: enable/disable attn notify messages + # + proc anena {{ena 0}} { + rlc exec \ + -wreg $rlink::ADDR_RLCNTL [regbld rlink::RLCNTL [list anena $ena]] + } + # # isopen: returns 1 if open and 0 if close # proc isopen {} { @@ -69,4 +89,19 @@ namespace eval rlink { if {![info exists rlink::sim_mode]} { return 0} return $rlink::sim_mode } + + # + # run_rri: execute rri type command file + # + proc run_rri {fname} { + rlc errcnt -clear + set code [exec ticonv_rri $fname] + eval $code + set errcnt [rlc errcnt] + if { $errcnt } { + puts [format "run_rri: FAIL after %d errors" $errcnt] + } + return $errcnt + } + } diff --git a/tools/tcl/rw11/tbench.tcl b/tools/tcl/rw11/tbench.tcl index 80e96ee5..c995ea1f 100644 --- a/tools/tcl/rw11/tbench.tcl +++ b/tools/tcl/rw11/tbench.tcl @@ -1,6 +1,6 @@ -# $Id: tbench.tcl 510 2013-04-26 16:14:57Z mueller $ +# $Id: tbench.tcl 607 2014-11-30 20:02:48Z mueller $ # -# Copyright 2013- by Walter F.J. Mueller +# Copyright 2013-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-30 607 2.0 use new rlink v4 iface # 2013-04-26 510 1.0 Initial version (extracted from util.tcl) # @@ -27,7 +28,7 @@ namespace eval rw11 { # tbench: driver for tbench scripts # proc tbench {fname} { - rlc exec -init 0xff [regbld rlink::INIT anena] + rlink::anena 1; # enable attn notify set errcnt [tbench_list $fname] return $errcnt } diff --git a/tools/tcl/rw11/util.tcl b/tools/tcl/rw11/util.tcl index 6a0c3afb..d1de1a8f 100644 --- a/tools/tcl/rw11/util.tcl +++ b/tools/tcl/rw11/util.tcl @@ -1,4 +1,4 @@ -# $Id: util.tcl 575 2014-07-27 20:55:41Z mueller $ +# $Id: util.tcl 607 2014-11-30 20:02:48Z mueller $ # # Copyright 2013-2014 by Walter F.J. Mueller # @@ -34,8 +34,9 @@ namespace eval rw11 { # proc setup_cpu {} { rlc config -basestat 2 -baseaddr 8 -basedata 8 - rw11 rlw rls w11a 1 - cpu0 cp -reset; # reset CPU + rlink::setup; # basic rlink defs + rw11 rlw rls w11a 1; # create 1 w11a cpu + cpu0 cp -reset; # reset CPU return "" } diff --git a/tools/tcl/setup_packages b/tools/tcl/setup_packages index 6bbc8d9f..bc38976a 100755 --- a/tools/tcl/setup_packages +++ b/tools/tcl/setup_packages @@ -1,7 +1,11 @@ -#! /usr/bin/env tclsh -# $Id: setup_packages 510 2013-04-26 16:14:57Z mueller $ +#! /usr/bin/env tclshcpp +# $Id: setup_packages 601 2014-11-07 22:44:43Z mueller $ # -pkg_mkIndex -verbose ../lib libr*tpp.so +pkg_mkIndex -verbose ../lib \ + librlinktpp.so \ + librusbtpp.so \ + librutiltpp.so \ + librwxxtpp.so # pkg_mkIndex -verbose rutil *.tcl pkg_mkIndex -verbose rlink *.tcl diff --git a/tools/tcl/tst_rlink/perf.tcl b/tools/tcl/tst_rlink/perf.tcl index 94807c96..69b704bb 100644 --- a/tools/tcl/tst_rlink/perf.tcl +++ b/tools/tcl/tst_rlink/perf.tcl @@ -1,6 +1,6 @@ -# $Id: perf.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: perf.tcl 606 2014-11-24 07:08:51Z mueller $ # -# Copyright 2011- by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-23 606 2.0 use new rlink v4 iface # 2011-04-17 376 1.0 Initial version # @@ -27,7 +28,7 @@ namespace eval tst_rlink { set rval "delay latency" - rlc exec -init 0xff [regbld rlink::INIT anena] + rlink::anena 1; # enable attn notify for {set dly 250} {$dly <= 10000} {incr dly 250} { rlc exec \ @@ -49,7 +50,7 @@ namespace eval tst_rlink { append rval [format "\n%5d %6.2f" $dly $ms] } - rlc exec -init 0xff [regbld rlink::INIT {anena 0}] + rlink::anena 0; # disable attn notify return $rval } diff --git a/tools/tcl/tst_rlink/test_all.tcl b/tools/tcl/tst_rlink/test_all.tcl index 7646d72a..6ca78622 100644 --- a/tools/tcl/tst_rlink/test_all.tcl +++ b/tools/tcl/tst_rlink/test_all.tcl @@ -1,6 +1,6 @@ -# $Id: test_all.tcl 469 2013-01-05 12:29:44Z mueller $ +# $Id: test_all.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011- by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout and iface # 2013-01-04 469 1.0.2 move rbemon tests from test_all to test_all_emon # 2011-04-17 376 1.0.1 add rbemon::test_rbtest_sim (if in sum mode) # 2011-04-02 375 1.0 Initial version @@ -31,9 +32,9 @@ namespace eval tst_rlink { proc test_all {} { # set errcnt 0 - incr errcnt [rbtest::test_all 0x7 0xfffc] - incr errcnt [rbmoni::test_regs] - incr errcnt [rbmoni::test_rbtest] + incr errcnt [rbtest::test_all 0xf 0xfffc] + ##incr errcnt [rbmoni::test_regs] + ##incr errcnt [rbmoni::test_rbtest] puts "tst_rlink::test_all errcnt = $errcnt --> [rutil::errcnt2txt $errcnt]" diff --git a/tools/tcl/tst_rlink/util.tcl b/tools/tcl/tst_rlink/util.tcl index 34a1f359..0029a3b6 100644 --- a/tools/tcl/tst_rlink/util.tcl +++ b/tools/tcl/tst_rlink/util.tcl @@ -1,6 +1,6 @@ -# $Id: util.tcl 516 2013-05-05 21:24:52Z mueller $ +# $Id: util.tcl 603 2014-11-09 22:50:26Z mueller $ # -# Copyright 2011- by Walter F.J. Mueller +# Copyright 2011-2014 by Walter F.J. Mueller # # This program is free software; you may redistribute and/or modify it under # the terms of the GNU General Public License as published by the Free @@ -13,6 +13,7 @@ # # Revision History: # Date Rev Version Comment +# 2014-11-09 603 2.0 use rlink v4 address layout # 2011-04-17 376 1.0.1 add proc scan_baud # 2011-04-02 375 1.0 Initial version # 2011-03-19 372 0.1 First draft @@ -33,13 +34,14 @@ namespace eval tst_rlink { # proc setup {} { rlc amap -clear; # clear first to allow re-run - rbmoni::setup [bvi b 11111100] - rbemon::setup [bvi b 11111000] - rbbram::setup [bvi b 11110100] - rbtest::setup [bvi b 11110000] - rlc amap -insert timer.1 [bvi b 11100001] - rlc amap -insert timer.0 [bvi b 11100000] - rbs3hio::setup [bvi b 11000000] + rlink::setup; + rbtest::setup 0xffe0; + rbmoni::setup 0xffe8; + rbemon::setup 0xffd0; + rbbram::setup 0xfe00; + rlc amap -insert timer.1 0xfe11; + rlc amap -insert timer.0 0xfe10; + rbs3hio::setup 0xfef0; } # @@ -47,11 +49,11 @@ namespace eval tst_rlink { # proc init {} { rlink::init; # reset rlink - rbtest::init - rbbram::init - rbmoni::init - rbs3hio::init - rbemon::init + rbtest::init; + rbmoni::init; + rbbram::init; + rbemon::init; + rbs3hio::init; rlink::init; # re-reset rlink }