OpenCores
URL https://opencores.org/ocsvn/csa/csa/trunk

Subversion Repositories csa

[/] [csa/] [trunk/] [quartus10/] [csa_fpga.v] - Diff between revs 33 and 38

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

Rev 33 Rev 38
Line 52... Line 52...
        // usb interface
        // usb interface
        ////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////
        assign slcs  =1'h0;
        assign slcs  =1'h0;
        assign pktend=1'h1;
        assign pktend=1'h1;
 
 
`define EP2_W  2'h0
`define EP2_W  2'h3
`define EP6_R  2'h1
`define EP6_R  2'h2
`define EP8_R  2'h2
`define EP8_R  2'h1
`define NO_ACT 2'h3
`define NO_ACT 2'h0
 
 
        reg [ 1:0] last_action;
        reg [ 1:0] last_action;
        reg [15:0] usb_dat_out;
        reg [15:0] usb_dat_out;
        reg [15:0] usb_dat_in;
        reg [15:0] usb_dat_in;
 
 
Line 88... Line 88...
                        sloe<=1'h1;
                        sloe<=1'h1;
                        fifoadr<=2'h0;
                        fifoadr<=2'h0;
                        slwr<=1'h0;
                        slwr<=1'h0;
                        slrd<=1'h1;
                        slrd<=1'h1;
                        last_action<=`EP2_W;
                        last_action<=`EP2_W;
 
 
                end
                end
                else
                else
                begin
                begin
                        sloe<=1'h1;
                        sloe<=1'h1;
                        fifoadr<=2'h0;
                        fifoadr<=2'h0;
                        slwr<=1'h1;
                        slwr<=1'h1;
                        slrd<=1'h1;
                        slrd<=1'h1;
                        last_action<=`NO_ACT;
                        last_action<=`NO_ACT;
                end
                end
 
 
 
 
        always @(posedge usbclk)
        always @(posedge usbclk)
                if(last_action==`EP8_R )
                if(last_action==`EP8_R )
                        usb_dat_in<=fd;
                        usb_dat_in<=fd;
 
 
        assign fd=(sloe)?usb_dat_out:16'hzzzz;
        assign fd=(sloe)?usb_dat_out:16'hzzzz;

powered by: WebSVN 2.1.0

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