diff --git a/Driver/enc624j6net/build/enc624j6net.device b/Driver/enc624j6net/build/enc624j6net.device index 61b29f0..13c1c82 100644 Binary files a/Driver/enc624j6net/build/enc624j6net.device and b/Driver/enc624j6net/build/enc624j6net.device differ diff --git a/Driver/enc624j6net/enc624j6net/enc624j6l.asm b/Driver/enc624j6net/enc624j6net/enc624j6l.asm index c5f5684..69d5696 100755 --- a/Driver/enc624j6net/enc624j6net/enc624j6l.asm +++ b/Driver/enc624j6net/enc624j6net/enc624j6l.asm @@ -813,10 +813,13 @@ _enc624j6l_IntServer: beq.s .rts ;exit quickly when no packet pending ;CLRREG EIR,a1,d1 ;clear interrupt bit - move #$C000,d0 ;disable board interrupt until /INT from ENC toggles - lea $4000(a1),a1 ;D0: Bit15 = overall board int enable, Bit14 = ignore int until toggle (1) - move.w d0,($4000,a1) - lea -$4000(a1),a1 + ;move #$C000,d0 ;disable board interrupt until /INT from ENC toggles + ;lea $4000(a1),a1 ;D0: Bit15 = overall board int enable, Bit14 = ignore int until toggle (1) + ;move.w d0,($4000,a1) + ;lea -$4000(a1),a1 + + move #EIE_INTIE,D0 ;disable board interrupt until someone enables it again + CLRREG EIE,A1,d0 READREG PSigTask,a1,d0 ;upper two bytes swap d0 ; @@ -1034,7 +1037,7 @@ _enc624j6l_RecvFrame: ; ifne _OPT_RECV move.l d7,d1 ;start - and.l #$FFFF,d1 ;keep only lower adderess + and.l #$FFFF,d1 ;keep only lower address add.l d0,d1 ;start+bytes cmp.l #RXSTOP_INIT,d1 bgt.s .nooptrecv ;sadly, we cannot use faster routine atm, because we have a wrap around in the SRAM buffer @@ -1049,12 +1052,12 @@ _enc624j6l_RecvFrame: ; subq #1,d1 ;words - 1 .opt_read: ifne _OPT_BUFFER_SWAP - move.w (a2)+,d2 ;get current word - rol.w #8,d2 ;swap buffer to Big Endian - move.w d2,(a1)+ - move.w (a2)+,d2 ;get current word - rol.w #8,d2 ;swap buffer to Big Endian - move.w d2,(a1)+ + move.l (a2)+,d2 ;get current word + rol.w #8,d2 ;swap buffer to Big Endian + swap D2 + rol.w #8,d2 ;swap buffer to Big Endian + swap D2 + move.l d2,(a1)+ else move.l (a2)+,(a1)+ endc @@ -1063,7 +1066,7 @@ _enc624j6l_RecvFrame: ; .nooptrecv: endc ;_OPT_RECV - ;generic loop: check for position overflows with each word + ;generic loop: check for position overflows with each dword move d0,d1 ;byte count lsr #2,d1 ;converted to dword count bcs.s .generic_read ;read 1 byte more if impair byte count @@ -1071,12 +1074,15 @@ _enc624j6l_RecvFrame: ; .generic_read: READSRAM_LONG a0,d7,d2 ;get current dword ;move.l (a0,d7.w),d2 ;get current dword - addq #4,d7 ;increment position ifne _OPT_BUFFER_SWAP rol.w #8,d2 ;swap buffer to Big Endian + SWAP D2 + rol.w #8,d2 ;swap buffer to Big Endian + SWAP D2 endc + move.l d2,(a1)+ ; store currend dword + addq #4,d7 ;increment position WRAPINDEX d7 ;wrap D7 if beyond buffer - move.l d2,(a1)+ dbf d1,.generic_read .end_read: @@ -1186,10 +1192,9 @@ _enc624j6l_TransmitFrame: swap d4 move.w #8,d4 .txcopy: - move.l (a1)+,d1 - move.l (a1)+,d3 - ifne _OPT_BUFFER_SWAP + move.l (a1)+,d1 + move.l (a1)+,d3 ; byte swap in 16 Bit words rol.w d4,d1 rol.w d4,d3 @@ -1199,9 +1204,12 @@ _enc624j6l_TransmitFrame: rol.w d4,d3 swap d1 swap d3 + move.l d1,(a2)+ ;save to SRAM + move.l d3,(a2)+ ;save to SRAM + else + move.l (a1)+,(a2)+ ;save to SRAM + move.l (a1)+,(a2)+ ;save to SRAM endc - move.l d1,(a2)+ ;save to SRAM - move.l d3,(a2)+ ;save to SRAM dbf d0,.txcopy swap d4 diff --git a/Driver/enc624j6net/server.c b/Driver/enc624j6net/server.c index 5583816..fa25e49 100755 --- a/Driver/enc624j6net/server.c +++ b/Driver/enc624j6net/server.c @@ -353,109 +353,103 @@ PRIVATE REGARGS BOOL read_frame(struct IOSana2Req *req, struct HWFrame *frame) LONG datasize; struct IOSana2Req *got; ULONG pkttyp = 0; /* just to avoid warning with opt build, irrelevant otherwise */ - BOOL rv; + BOOL rv,ok; struct HWFrame *frame = pb->pb_Frame; + + while(hw_recv_pending(pb)){ + d8(("+hw_recv\n")); + rv = hw_recv_frame(pb, frame); + d8(("-hw_recv\n")); + if (rv) + { + pb->pb_DevStats.PacketsReceived++; + + pkttyp = frame->hwf_Type; + + #if 0 + /* perform internal loop back of magic packets of type 0xfffd */ + if(pkttyp == HW_MAGIC_LOOPBACK) { + d(("loop back packet (size %ld)\n",frame->hwf_Size)); + hw_send_frame(pb, frame); + return; + } + + /* plipbox requests online magic (again) */ + if(pkttyp == HW_MAGIC_ONLINE) { + d(("request online magic")); + hw_send_magic_pkt(pb, HW_MAGIC_ONLINE); + return; + } + #endif + + datasize = frame->hwf_Size - HW_ETH_HDR_SIZE; + + dotracktype(pb, pkttyp, 0, 1, 0, datasize, 0); + + d(("packet %08lx, size %ld received\n",pkttyp,datasize)); + ok = FALSE; + ObtainSemaphore(&pb->pb_ReadListSem); + /* traverse the list of read-requests */ + for(got = (struct IOSana2Req *)pb->pb_ReadList.lh_Head; + got->ios2_Req.io_Message.mn_Node.ln_Succ; + got = (struct IOSana2Req *)got->ios2_Req.io_Message.mn_Node.ln_Succ ) + { + /* check if this one requests for the new packet we got */ + if (got->ios2_PacketType == pkttyp ) + { + Remove((struct Node*)got); + ok =TRUE; + break; + } + } + ReleaseSemaphore(&pb->pb_ReadListSem); + + if(!ok){ + /* If no one wanted this packet explicitely, there is one chance + ** left: somebody waiting for orphaned packets. If this fails, too, + ** we will drop it. + */ + d(("unknown packet\n")); + + pb->pb_DevStats.UnknownTypesReceived++; + + ObtainSemaphore(&pb->pb_ReadOrphanListSem); + got = (struct IOSana2Req *)RemHead((struct List*)&pb->pb_ReadOrphanList); + ReleaseSemaphore(&pb->pb_ReadOrphanListSem); + + if (got) + { + d(("orphan read\n")); + ok=TRUE; + } + } - d8(("+hw_recv\n")); - rv = hw_recv_frame(pb, frame); - d8(("-hw_recv\n")); - if (rv) - { - pb->pb_DevStats.PacketsReceived++; - - pkttyp = frame->hwf_Type; - -#if 0 - /* perform internal loop back of magic packets of type 0xfffd */ - if(pkttyp == HW_MAGIC_LOOPBACK) { - d(("loop back packet (size %ld)\n",frame->hwf_Size)); - hw_send_frame(pb, frame); - return; - } - - /* plipbox requests online magic (again) */ - if(pkttyp == HW_MAGIC_ONLINE) { - d(("request online magic")); - hw_send_magic_pkt(pb, HW_MAGIC_ONLINE); - return; - } -#endif - - datasize = frame->hwf_Size - HW_ETH_HDR_SIZE; - - dotracktype(pb, pkttyp, 0, 1, 0, datasize, 0); - - d(("packet %08lx, size %ld received\n",pkttyp,datasize)); - - ObtainSemaphore(&pb->pb_ReadListSem); - - /* traverse the list of read-requests */ - for(got = (struct IOSana2Req *)pb->pb_ReadList.lh_Head; - got->ios2_Req.io_Message.mn_Node.ln_Succ; - got = (struct IOSana2Req *)got->ios2_Req.io_Message.mn_Node.ln_Succ ) - { - /* check if this one requests for the new packet we got */ - if (got->ios2_PacketType == pkttyp ) - { - BOOL ok; - - Remove((struct Node*)got); - - /* deliver packet */ - ok = read_frame(got, frame); - if(!ok) { - DoEvent(pb, S2EVENT_ERROR | S2EVENT_BUFF | S2EVENT_SOFTWARE); - } - - d(("packet received, satisfying S2Request\n")); - DevTermIO(pb, got); - got = NULL; - break; - } - } - - ReleaseSemaphore(&pb->pb_ReadListSem); - } - else - { - d(("Error receiving (%ld. len=%ld)\n", rv, frame->hwf_Size)); - /* something went wrong during receipt */ - DoEvent(pb, S2EVENT_HARDWARE | S2EVENT_ERROR | S2EVENT_RX); - got = NULL; - pb->pb_DevStats.BadData++; - } - - /* If no one wanted this packet explicitely, there is one chance - ** left: somebody waiting for orphaned packets. If this fails, too, - ** we will drop it. - */ - if (got) - { - d(("unknown packet\n")); - - pb->pb_DevStats.UnknownTypesReceived++; - - ObtainSemaphore(&pb->pb_ReadOrphanListSem); - got = (struct IOSana2Req *)RemHead((struct List*)&pb->pb_ReadOrphanList); - ReleaseSemaphore(&pb->pb_ReadOrphanListSem); - - if (got) - { - BOOL ok = read_frame(got, frame); - if(!ok) { - DoEvent(pb, S2EVENT_ERROR | S2EVENT_BUFF | S2EVENT_SOFTWARE); - } - - d(("orphan read\n")); - - DevTermIO(pb, got); - } - else - { - dotracktype(pb, pkttyp, 0, 0, 0, 0, 1); - d(("packet thrown away...\n")); - } - } + if(ok){ + /* deliver packet */ + ok = read_frame(got, frame); + if(!ok) { + DoEvent(pb, S2EVENT_ERROR | S2EVENT_BUFF | S2EVENT_SOFTWARE); + } + + d(("packet received, satisfying S2Request\n")); + DevTermIO(pb, got); + } + else{ + /* throw it away*/ + dotracktype(pb, pkttyp, 0, 0, 0, 0, 1); + d(("packet thrown away...\n")); + } + got = NULL; + } + else + { + d(("Error receiving (%ld. len=%ld)\n", rv, frame->hwf_Size)); + /* something went wrong during receipt */ + DoEvent(pb, S2EVENT_HARDWARE | S2EVENT_ERROR | S2EVENT_RX); + got = NULL; + pb->pb_DevStats.BadData++; + } + } } /*E*/ @@ -725,21 +719,14 @@ PRIVATE REGARGS BOOL read_frame(struct IOSana2Req *req, struct HWFrame *frame) hw_enable_global_int(pb); recv = Wait(wmask); d2(("**> wait: got 0x%08lx\n", recv)); - haverec = hw_recv_pending(pb); } - hw_disable_global_int(pb); - - /*allow only a certain number of packets to be serverd per interrupt*/ - if(haverec>MAX_READ_PACKAGE) - haverec = MAX_READ_PACKAGE; - + /*hw_disable_global_int(pb);*/ + /* accept pending receive and start reading */ - while( haverec-- ) - { - d2(("*+ do_read\n")); - doreadreqs(pb); - d2(("*- do_read\n")); - } + d2(("*+ do_read\n")); + doreadreqs(pb); + d2(("*- do_read\n")); + if( recv & specialmask ) { diff --git a/Logic/LAN_IDE/LAN_IDE.gise b/Logic/LAN_IDE/LAN_IDE.gise index d6b07ae..ec9460d 100644 --- a/Logic/LAN_IDE/LAN_IDE.gise +++ b/Logic/LAN_IDE/LAN_IDE.gise @@ -72,6 +72,8 @@ + + @@ -92,6 +94,7 @@ + @@ -102,6 +105,7 @@ + @@ -119,12 +123,14 @@ + + @@ -132,6 +138,7 @@ + diff --git a/Logic/LAN_IDE/LAN_IDE_CP_summary.html b/Logic/LAN_IDE/LAN_IDE_CP_summary.html index fb8924a..532a9c6 100644 --- a/Logic/LAN_IDE/LAN_IDE_CP_summary.html +++ b/Logic/LAN_IDE/LAN_IDE_CP_summary.html @@ -2,7 +2,7 @@ - + @@ -77,5 +77,5 @@ System Settings
LAN_IDE_CP Project Status (02/02/2018 - 21:54:37)
LAN_IDE_CP Project Status (01/26/2017 - 20:59:08)
Project File: LAN_IDE.xise
-
Date Generated: 02/02/2018 - 21:54:37
+
Date Generated: 02/08/2018 - 22:40:05
\ No newline at end of file diff --git a/Logic/LAN_IDE/_xmsgs/pn_parser.xmsgs b/Logic/LAN_IDE/_xmsgs/pn_parser.xmsgs index a38ed26..36b25b9 100644 --- a/Logic/LAN_IDE/_xmsgs/pn_parser.xmsgs +++ b/Logic/LAN_IDE/_xmsgs/pn_parser.xmsgs @@ -8,5 +8,8 @@ +Parsing VHDL file "C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/LAN_IDE_CP.vhd" into library work + + diff --git a/Logic/LAN_IDE/iseconfig/LAN_IDE.projectmgr b/Logic/LAN_IDE/iseconfig/LAN_IDE.projectmgr index eeadaf4..b3bbf3a 100644 --- a/Logic/LAN_IDE/iseconfig/LAN_IDE.projectmgr +++ b/Logic/LAN_IDE/iseconfig/LAN_IDE.projectmgr @@ -9,13 +9,13 @@ 2 - pinlist.ucf (C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/pinlist.ucf) + LAN_IDE_CP - Behavioral (C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/LAN_IDE_CP.vhd) 0 0 000000ff0000000000000001000000010000000000000000000000000000000002020000000100000001000000640000013c000000020000000000000000000000000200000064ffffffff0000008100000003000000020000013c0000000100000003000000000000000100000003 true - pinlist.ucf (C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/pinlist.ucf) + LAN_IDE_CP - Behavioral (C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/LAN_IDE_CP.vhd) @@ -64,13 +64,13 @@ Implement Design/Synthesize - XST - Manage Configuration Project (iMPACT) + - 1 + 0 0 000000ff000000000000000100000001000000000000000000000000000000000000000000000000e7000000010000000100000000000000000000000064ffffffff000000810000000000000001000000e70000000100000000 false - Manage Configuration Project (iMPACT) + 000000ff00000000000000020000011b0000011b01000000050100000002 Implementation diff --git a/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport b/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport index d2ee1dc..aa899bc 100644 --- a/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport +++ b/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport @@ -1,7 +1,7 @@
- 2018-02-01T00:49:32 + 2018-02-08T22:40:05 LAN_IDE_CP 2017-01-26T20:59:08 C:/Users/Matze/Amiga/Hardwarehacks/Zorro-LAN-IDE/Logic/LAN_IDE/iseconfig/LAN_IDE_CP.xreport