OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_c/] [jtag/] [test_rtl/] [jtag_ram_test/] [src_verilog/] [ram_test_top.v] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 alirezamon
 
2
/**************************************************************************
3
**      WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
4
**      OVERWRITTEN AND LOST. Rename this file if you wish to do any modification.
5
****************************************************************************/
6
 
7
 
8
/**********************************************************************
9
**      File: ram_test_top.v
10
**
11
**      Copyright (C) 2014-2018  Alireza Monemi
12
**
13
**      This file is part of ProNoC 1.7.0
14
**
15
**      ProNoC ( stands for Prototype Network-on-chip)  is free software:
16
**      you can redistribute it and/or modify it under the terms of the GNU
17
**      Lesser General Public License as published by the Free Software Foundation,
18
**      either version 2 of the License, or (at your option) any later version.
19
**
20
**      ProNoC is distributed in the hope that it will be useful, but WITHOUT
21
**      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
**      or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
23
**      Public License for more details.
24
**
25
**      You should have received a copy of the GNU Lesser General Public
26
**      License along with ProNoC. If not, see <http:**www.gnu.org/licenses/>.
27
******************************************************************************/
28
 
29
`timescale 1ns / 1ps
30
 
31
module ram_test_top #(
32
        parameter       CORE_ID=0,
33
        parameter       SW_LOC="/home/alireza/mywork/mpsoc_work/SOC/ram_test/sw" ,
34
        parameter       ram_Dw=32 ,
35
        parameter       ram_Aw=12
36
)(
37
        ss_clk_in,
38
        ss_reset_in
39
);
40
 
41
        function integer log2;
42
                input integer number; begin
43
                log2=0;
44
                while(2**log2<number) begin
45
                                log2=log2+1;
46
                        end
47
                        end
48
        endfunction // log2 
49
 
50
        function   [15:0]i2s;
51
          input   integer c;  integer i;  integer tmp; begin
52
              tmp =0;
53
              for (i=0; i<2; i=i+1'b1) begin
54
              tmp =  tmp +    (((c % 10)   + 6'd48) << i*8);
55
                  c       =   c/10;
56
              end
57
              i2s = tmp[15:0];
58
          end
59
     endfunction //i2s
60
 
61 48 alirezamon
        localparam      programmer_DW=32;
62
        localparam      programmer_AW=32;
63
        localparam      programmer_S_Aw=   7;
64
        localparam      programmer_M_Aw=   32;
65
        localparam      programmer_TAGw=   3;
66
        localparam      programmer_SELw=   4;
67
        localparam      programmer_VJTAG_INDEX=CORE_ID;
68 38 alirezamon
 
69
        localparam      ram_BYTE_WR_EN="YES";
70
        localparam      ram_FPGA_VENDOR="ALTERA";
71
        localparam      ram_JTAG_CONNECT= "ALTERA_IMCE";
72
        localparam      ram_JTAG_INDEX=CORE_ID;
73
        localparam      ram_TAGw=3;
74
        localparam      ram_SELw=ram_Dw/8;
75
        localparam      ram_CTIw=3;
76
        localparam      ram_BTEw=2;
77
        localparam      ram_BURST_MODE="DISABLED";
78
        localparam      ram_MEM_CONTENT_FILE_NAME="ram0";
79
        localparam      ram_INITIAL_EN="NO";
80
        localparam      ram_INIT_FILE_PATH=SW_LOC;
81
 
82
        localparam      bus_M=1;
83
        localparam      bus_S=1;
84
        localparam      bus_Dw=32;
85
        localparam      bus_Aw=32;
86
        localparam      bus_SELw=bus_Dw/8;
87
        localparam      bus_TAGw=3;
88
        localparam      bus_CTIw=3;
89
        localparam      bus_BTEw=2 ;
90
 
91
 
92
        input                   ss_clk_in;
93
        input                   ss_reset_in;
94
 
95
 
96
 
97
// Allow software to remote reset/enable the cpu via jtag
98
 
99
        wire jtag_cpu_en, jtag_system_reset;
100
 
101
        jtag_system_en jtag_en (
102
                .cpu_en(jtag_cpu_en),
103
                .system_reset(jtag_system_reset)
104
 
105
        );
106
 
107
 
108
 
109
 
110
 
111
 
112
 
113
        wire ss_reset_in_ored_jtag;
114
 
115
 ram_test #(
116
        .CORE_ID(CORE_ID),
117
        .SW_LOC(SW_LOC),
118
        .ram_Dw(ram_Dw),
119
        .ram_Aw(ram_Aw)
120
        )the_ram_test(
121
 
122
                .ss_clk_in(ss_clk_in),
123
                .ss_reset_in(ss_reset_in_ored_jtag)
124
        );
125
        assign ss_reset_in_ored_jtag = (jtag_system_reset | ss_reset_in);
126
 
127
 
128
 endmodule

powered by: WebSVN 2.1.0

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