OpenCores
URL https://opencores.org/ocsvn/fpga-cf/fpga-cf/trunk

Subversion Repositories fpga-cf

[/] [fpga-cf/] [trunk/] [java/] [src/] [edu/] [byu/] [cc/] [plieber/] [fpgaenet/] [icapif/] [IcapTools.java] - Diff between revs 2 and 7

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 7
Line 36... Line 36...
        }
        }
 
 
        /**
        /**
         * Writes a packet to the ICAP
         * Writes a packet to the ICAP
         * @param packet
         * @param packet
 
         * @throws FCPException
         */
         */
        public void write(edu.byu.ece.bitstreamTools.bitstream.Packet packet) {
        public void write(edu.byu.ece.bitstreamTools.bitstream.Packet packet) throws FCPException {
                this.icapif.sendIcapData(packet.toByteArray());
                this.icapif.sendIcapData(packet.toByteArray());
        }
        }
 
 
        /**
        /**
         * Writes a packet list to the ICAP
         * Writes a packet list to the ICAP
         * @param packet
         * @param packet
 
         * @throws FCPException
         */
         */
        public void write(edu.byu.ece.bitstreamTools.bitstream.PacketList packetList) {
        public void write(edu.byu.ece.bitstreamTools.bitstream.PacketList packetList) throws FCPException {
                this.icapif.sendIcapData(packetList.toByteArray());
                this.icapif.sendIcapData(packetList.toByteArray());
        }
        }
 
 
        /**
        /**
         * Writes dummy/synch data from a DummySyncData object.
         * Writes dummy/synch data from a DummySyncData object.
         * @param synchData
         * @param synchData
 
         * @throws FCPException
         */
         */
        public void write(edu.byu.ece.bitstreamTools.bitstream.DummySyncData synchData) {
        public void write(edu.byu.ece.bitstreamTools.bitstream.DummySyncData synchData) throws FCPException {
                this.icapif.sendIcapData(synchData.getData());
                this.icapif.sendIcapData(synchData.getData());
        }
        }
 
 
        public void write(edu.byu.ece.bitstreamTools.configuration.Frame frame) throws BitstreamException {
        public void write(edu.byu.ece.bitstreamTools.configuration.Frame frame) throws BitstreamException, FCPException {
                PacketList packets = new PacketList();
                PacketList packets = new PacketList();
                packets.addAll(PacketUtils.NOP_PACKETS(2));
                packets.addAll(PacketUtils.NOP_PACKETS(2));
                packets.add(PacketUtils.RCRC_CMD_PACKET);
                packets.add(PacketUtils.RCRC_CMD_PACKET);
                packets.addAll(PacketUtils.NOP_PACKETS(2));
                packets.addAll(PacketUtils.NOP_PACKETS(2));
                packets.add(PacketUtils.COR_PACKET(0x100531E5));
                packets.add(PacketUtils.COR_PACKET(0x100531E5));
Line 83... Line 86...
                //packets.addAll(PacketUtils.FDRI_WRITE_PACKETS(frame.getData().getAllFrameWords()));
                //packets.addAll(PacketUtils.FDRI_WRITE_PACKETS(frame.getData().getAllFrameWords()));
                packets.addAll(PacketUtils.NOP_PACKETS(3));
                packets.addAll(PacketUtils.NOP_PACKETS(3));
                this.write(packets);
                this.write(packets);
        }
        }
 
 
        public void write(edu.byu.ece.bitstreamTools.bitstream.RegisterType regtype, int value) throws BitstreamException {
        public void write(edu.byu.ece.bitstreamTools.bitstream.RegisterType regtype, int value) throws BitstreamException, FCPException {
                PacketList packets = new PacketList();
                PacketList packets = new PacketList();
                //packets.addAll(PacketUtils.NOP_PACKETS(1));
                //packets.addAll(PacketUtils.NOP_PACKETS(1));
                //packets.add(PacketUtils.IDCODE_PACKET(0x2AD6093));
                //packets.add(PacketUtils.IDCODE_PACKET(0x2AD6093));
                //packets.addAll(PacketUtils.NOP_PACKETS(1));
                //packets.addAll(PacketUtils.NOP_PACKETS(1));
                ArrayList<Integer> valuelist = new ArrayList<Integer>();
                ArrayList<Integer> valuelist = new ArrayList<Integer>();
Line 111... Line 114...
                //packets.add(PacketUtils.TYPE_ONE_WRITE_PACKET(regtype, valuelist2));
                //packets.add(PacketUtils.TYPE_ONE_WRITE_PACKET(regtype, valuelist2));
                //packets.addAll(PacketUtils.NOP_PACKETS(20));
                //packets.addAll(PacketUtils.NOP_PACKETS(20));
                this.write(packets);
                this.write(packets);
        }
        }
 
 
        public void synchIcap() {
        public void synchIcap() throws FCPException {
                //write(DummySyncData.V5_V6_ICAP_DUMMY_SYNC_DATA);
                //write(DummySyncData.V5_V6_ICAP_DUMMY_SYNC_DATA);
                write(DummySyncData.V5_V6_STANDARD_DUMMY_SYNC_DATA);
                write(DummySyncData.V5_V6_STANDARD_DUMMY_SYNC_DATA);
        }
        }
 
 
        public void deviceIdCheck(int deviceId) {
        public void deviceIdCheck(int deviceId) {

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.