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

Subversion Repositories systemcaes

[/] [systemcaes/] [trunk/] [bench/] [systemc/] [aes192lowarea/] [adapt.h] - Blame information for rev 28

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 23 jcastillo
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  sc_fifo to sc_signal adapter                                ////
4
////                                                              ////
5
////  This file is part of the SystemC AES                        ////
6
////                                                              ////
7
////  To Do:                                                      ////
8
////   - done                                                     ////
9
////                                                              ////
10
////  Author(s):                                                  ////
11
////      - Javier Castillo, jcastilo@opencores.org               ////
12
////                                                              ////
13
//////////////////////////////////////////////////////////////////////
14
////                                                              ////
15
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
16
////                                                              ////
17
//// This source file may be used and distributed without         ////
18
//// restriction provided that this copyright statement is not    ////
19
//// removed from the file and that any derivative work contains  ////
20
//// the original copyright notice and the associated disclaimer. ////
21
////                                                              ////
22
//// This source file is free software; you can redistribute it   ////
23
//// and/or modify it under the terms of the GNU Lesser General   ////
24
//// Public License as published by the Free Software Foundation; ////
25
//// either version 2.1 of the License, or (at your option) any   ////
26
//// later version.                                               ////
27
////                                                              ////
28
//// This source is distributed in the hope that it will be       ////
29
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
30
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
31
//// PURPOSE.  See the GNU Lesser General Public License for more ////
32
//// details.                                                     ////
33
////                                                              ////
34
//// You should have received a copy of the GNU Lesser General    ////
35
//// Public License along with this source; if not, download it   ////
36
//// from http://www.opencores.org/lgpl.shtml                     ////
37
////                                                              ////
38
//////////////////////////////////////////////////////////////////////
39
//
40
// CVS Revision History
41
//
42
// $Log: not supported by cvs2svn $
43
// Revision 1.1  2005/02/14 16:18:21  jcastillo
44
// aes192 uploaded
45
//
46
 
47
 
48
#include "systemc.h"
49
 
50
SC_MODULE(adapter){
51
 
52
        sc_in<bool> clk;
53
        sc_in<bool> rt_ready_i;
54
        sc_in<sc_biguint<128> > rt_aes_data_i;
55
 
56
        sc_fifo_out<sc_biguint<128> > rt_aes_data_o;
57
 
58
        void adapt(){
59
 
60
          while(1){
61
                 wait(clk->posedge_event());
62
                    if(rt_ready_i.read())
63
                        rt_aes_data_o.write(rt_aes_data_i.read());
64
           }
65
 
66
   }
67
 
68
         SC_CTOR(adapter){
69
              SC_THREAD(adapt);
70
     }
71
 };

powered by: WebSVN 2.1.0

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