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

Subversion Repositories systemc_cordic

[/] [systemc_cordic/] [trunk/] [cordic_ip/] [resultfifo.h] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 wwcheng
// resultfifo.h: header file
2
/********************************************************************
3
//
4
// Module:
5
//   Pipeline Output Result FIFO
6
//
7
// Interface:
8
//   This module connects to the adjust module and to a "reader" of
9
//   the result
10
//
11
//
12
// Authors:     Winnie Cheng <wwcheng@stanford.edu>,
13
//              Peter Wu <peter5@stanford.edu>
14
//
15
 *********************************************************************/
16
 
17
#include "systemc.h"
18
#include "opcode.h"
19
 
20
 
21
SC_MODULE(resultfifo) {
22
 
23
    // Clock Declaration
24
    sc_in_clk clk;
25
 
26
    // Input ports Declaration
27
    sc_in<bool> reset;
28
 
29
    // Input control
30
    sc_in<bool> read_request;
31
    sc_in<bool> write_request;
32
 
33
    // Input data - adjust module output
34
    sc_in<sc_uint<UNIT_SEL_WIDTH> > in_opcode;
35
    sc_in<short> in_result1;
36
    sc_in<short> in_result2;
37
 
38
    // Output data - results of this stage
39
    sc_out<bool> out_valid;
40
    sc_out<sc_uint<UNIT_SEL_WIDTH> > out_opcode;
41
    sc_out<short> out_result1;
42
    sc_out<short> out_result2;
43
 
44
    // Declare implementation functions
45
    void resultfifo_process();
46
 
47
    // Constructor
48
    SC_CTOR(resultfifo)
49
    {
50
        // Register processes and define active clock edge
51
        SC_CTHREAD(resultfifo_process, clk.pos());
52
 
53
        // Watching for global reset
54
        watching(reset.delayed()==true);
55
    }
56
 
57
}; // end module resultfifo 

powered by: WebSVN 2.1.0

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