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

Subversion Repositories risc5x

[/] [risc5x/] [trunk/] [hex_conv/] [readme.txt] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 mikej
--
2
-- Risc5x
3
-- www.OpenCores.Org - November 2001
4
--
5
--
6
-- This library is free software; you can distribute it and/or modify it
7
-- under the terms of the GNU Lesser General Public License as published
8
-- by the Free Software Foundation; either version 2.1 of the License, or
9
-- (at your option) any later version.
10
--
11
-- This library is distributed in the hope that it will be useful, but
12
-- WITHOUT ANY WARRANTY; without even the implied warranty of
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
-- See the GNU Lesser General Public License for more details.
15
--
16
-- A RISC CPU core.
17
--
18
-- (c) Mike Johnson 2001. All Rights Reserved.
19
-- mikej@opencores.org for support or any other issues.
20
--
21
-- Revision list
22
--
23
-- version 1.1 bug fix: Used wrong bank select bits in direct addressing mode
24
--                      INDF register returns 0 when indirectly read
25
--                      FSR bit 8 always set
26
--                      (cpu.vhd file changed)
27
--
28
-- version 1.0 initial opencores release
29
--
30
 
31
Risc5x is a small RISC CPU written in VHDL that is compatible with the 12 bit
32
opcode PIC family. Single cycle operation normally, two cycles when the program
33
counter is modified. Clock speeds of over 40Mhz are possible when using the
34
Xilinx Virtex optimisations.
35
 
36
 
37
This program ( hexconv.cpp ) may be used to read in a .HEX program file
38
and outputs directives to the Xilinx build tools to initialise the program
39
ram correctly.
40
 
41
Usage :
42
 
43
hexconv sourcefile.hex                  outputs to screen
44
 
45
hexconv sourcefile.hex > temp.ucf       outputs to file temp.ucf
46
 
47
this will generate 16 x 6 statements like this :
48
 
49
INST PRAMS_0_INST INIT_00 = 00000000000000000000000000000000000000000000000000000000E9A7B9E4;
50
 
51
copy these to your RISC5X_XIL.UCF file. Job done.
52
 
53
 
54
The program source has a commented out section which will produce "attribute
55
init" statements which may be used in the VHDL code directly. Replace the prams
56
generate in RISC5X_XIL.vhd with the following. The advantage of this technique
57
is you can see the correct init's in the EDIF file, and if you have a block ram
58
simulation model that you can pass INIT generics to, then you can simulate it.
59
 
60
prams : if true generate
61
 attribute INIT_00 of inst0 : label is "00000000000000000000000000000000000000000000000000000000E9A7B9E4";
62
 
63
begin
64
  inst0 : ramb4_s2_s2
65
  port map (
66
    dob   => pdata(1 downto 0),
67
    dib   => "00",
68
    
69
 
70
    doa   => pram_dout(1 downto 0),
71
    dia   => pram_din(1 downto 0),
72
    
73
    );
74
  inst1 : ramb4_s2_s2
75
  port map (
76
    dob   => pdata(3 downto 2),
77
    
78
 
79
    doa   => pram_dout(3 downto 2),
80
    dia   => pram_din(3 downto 2),
81
    
82
    );
83
    
84
end generate;
85
 
86
 
87
Legal Stuff
88
 
89
This core is distributed in the hope that it will be useful, but
90
WITHOUT ANY WARRANTY; without even the implied warranty of
91
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
92
 
93
You are responsible for any legal issues arising from the use of this core.
94
 
95
The source files may be used and distributed without restriction provided that
96
all copyright statements are not removed from the files and that any derivative
97
work contains the original copyright notices and the associated disclaimer.
98
 
99
PIC is a trademark of Microchip Technology Inc.
100
 
101
 
102
Any questions or interest in customisation /locked / other cores (16x8x?) etc
103
feel free to mail.
104
 
105
mikej@opencores.org
106
 
107
Cheers
108
 
109
Mike.
110
 
111
 

powered by: WebSVN 2.1.0

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