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

Subversion Repositories csa

[/] [csa/] [trunk/] [quartus10/] [csa_fpga.v] - Rev 29

Go to most recent revision | Compare with Previous | Blame | View Log

 
 
// this file is the test circuit
// author: Simom Panti
//
 
 
module csa_fpga(
                          output              bell
                        , input               clk
                        , input               rst
                        , input               flaga
                        , input               flagb
                        , input               flagc
                        , output              slcs
                        , output              pktend
                        , output reg          sloe
                        , output reg          slwr
                        , output reg          slrd
                        , output reg [ 1:0]   fifoadr
                        , inout      [15:0]   fd
                        , input               ifclk
                        , output     [ 7:0]   led
                        , output     [ 3:0]   ledseg
                        , output     [ 7:0]   seg_d
             );
 
 
        wire usbclk = ifclk;
        wire ep6_havedata = flaga;
        wire ep2_haveroom = flagc;
 
        assign bell = 1'h1;
 
`define CNT_WIDTH 25
`define STA_WIDTH 4
 
	////////////////////////////////////////////////////////////////////////////////
        // led control
	////////////////////////////////////////////////////////////////////////////////
        reg [`CNT_WIDTH-1:0]led_cnt;
 
        always @(posedge usbclk) 
                led_cnt <= led_cnt + `CNT_WIDTH'h00001;
 
        wire sec_clk = led_cnt[`CNT_WIDTH-1];
 
        led_cnt led1(
                         .clk    (usbclk)
                       , .rst    (rst)
                       , .scan   (sec_clk)
                       , .led    (led)
                        );
 
 
        wire seg_clk = led_cnt[`CNT_WIDTH-16];
        ledseg_cnt ledseg1(
                         .clk      (usbclk)
                       , .rst      (rst)
                       , .scan     (seg_clk)
                       , .data     (fd)
                       , .seg      (ledseg)
                       , .segd     (seg_d)
                        );
 
        ////////////////////////////////////////////////////////////////////////////////
        // usb interface
        ////////////////////////////////////////////////////////////////////////////////
 
 
 
        ////////////////////////////////////////////////////////////////////////////////
        // csa decrypt module
        ////////////////////////////////////////////////////////////////////////////////
        decrypt csa_decrypt(
                                 . clk            (ifclk)
                                ,. rst            (rst)
                                ,. ck             (64'h0000000000000000)
                                ,. key_en         (1'h0)
                                ,. even_odd       (1'h0)
                                ,. en             ()
                                ,. encrypted      ()
                                ,. decrypted      ()
                                ,. invalid        ()
                    );
 
 
endmodule
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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