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

Subversion Repositories minirisc

[/] [minirisc/] [trunk/] [README.txt] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 lampret
 
2
This is a Mini-RISC CPU/Microcontroller that is mostly compatible with the
3
PIC 16C57 from Microchip.
4
 
5
 
6
Legal
7
=====
8
 
9
PIC, Microship, etc. are Trademarks of Microchip Technology Inc.
10
 
11
I have no idea if implementing this core will or will not violate
12
patents, copyrights or cause any other type of lawsuits.
13
 
14
I provide this core AS IS, without any warrenties. If you decide to
15
build this core, you are responsible for any legal resolutions, such
16
as patents and copyrights, and perhaps others ....
17
 
18
        This source file(s) may be used and distributed without
19
        restriction provided that this copyright statement is not
20
        removed from the file and that any derivative work contains
21
        the original copyright notice and the associated disclaimer.
22
 
23
        THIS SOURCE FILE(S) IS/ARE PROVIDED "AS IS" AND WITHOUT ANY
24
        EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
25
        LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
26
        FITNESS FOR A PARTICULAR PURPOSE.
27
 
28
 
29
Motivation
30
==========
31
 
32
After seeing the "free_risc8" on the free-ip web site, I got excited
33
and downloaded the core. Pretty soon I found out that it had many
34
many errors and omissions from the original 16C57. So I started looking
35
at the code. This is when I realized it was very badly designed and
36
could not be made run faster. So, I sat down and wrote my own PIC IP
37
core last night. A lot of work was spend in writing test code to ensure
38
that it was 100% compatible from the software point of view.
39
 
40
- A PIC compatible Microcontroller that runs a lot faster
41
- Separate (External to the core) Program Memory
42
- Options to extend the core
43
 
44
 
45
Compatibility
46
=============
47
 
48
This design should be fully software compatible to the Microchip Implementation
49
of the PIC 16C57, except for the following extensions:
50
 
51
- Port A is full 8 bits wide
52
- Hardware stack is 4 level deep [original 2 levels] (can be easily expanded)
53
- Executions of instructions that modify the PC has become a lot more expensive
54
  due to the pipeline and execution of instructions on every cycle.
55
  Any instruction that writes to the PC (PC as destination (f), call, goto, retlw)
56
  now takes 4 cycles to execute (instead of 2 in the origianl implementation).
57
  The 4 'skip' instructions, remain as in the original implmentation: 1 cycle
58
  if not skipped, 2 cycles if skipped.
59
- Sampling of IO ports might be off
60
- Timer and watchdog might be off a few cycles
61
 
62
 
63
Performance
64
===========
65
 
66
- Single cycle instruction execution, except as noted above.
67
- Here are results of some sample implementations:
68 5 rudi
  - Xilinx Spartan 2e ((Device: xc2s50e-6): Fmax: 80Mhz, Utilization: 30%
69 2 lampret
  - Xilinx Spartan2 (Device: xc2s30-6-cs144): Fmax: 50Mhz, Utilization: 66%, Ports: Tsu: 2.2nS, Tcq: 7.7nS
70
  - Xilinx Virtex   (Device: xcv50-4-cs144) : Fmax: 40Mhz, Utilization: 35%, Ports: Tsu: 3.0nS, Tcq: 6.2nS
71
  - Xilinx VirtexE  (Device: xcv50e-8-cs144): Fmax: 66Mhz, Utilization: 35%, Ports: Tsu: 1.7nS, Tcq: 4.5nS
72
  Half of the cycle time is spend in routing delays. My guess is that by placing
73
  proper locatiuon contrains and guiding the back-end tools, a significant
74
  speed improvement can be achieved ....
75
- I estimat about 25K gates with the xilinx primitives, (excluding Register
76
  File and Programm Memory).
77
 
78
Implementing the core
79
=====================
80
 
81
The only file you should edit if you really want to implement this core, is the
82
'primitives.v' file. It contains all parts that can be optimized, depending on
83
the technology used. It includes memories, and arithmetic modules.
84
I added a primitives_xilinx,v file and xilinx_primitives.zip which contain
85
primitives for xilinx.
86
'risc_core.v' is the top level without program memory and tristate Io buffers for ports.
87
This is probably a good starting point if you want to instantiate the core in to a larger
88
design. If you just want a PIC clone, take a loot at 'risc_core_top.v', it was written
89
with Xilinx FPGAs in mind, but should be easily addaptred to other vendors FPGAs - just
90
replace the memory blocks ...
91
 
92
To-Do
93
=====
94
 
95
Things that need to be done
96
 
97
1) Write more test/compliance test vectors
98
   - Verify that all instructions after a goto/call/retlw/write to PCL are not executed
99
   - Verify ALU
100
   - Timer and Watchdog tests
101
   - Perhaps some other ereas ?
102
 
103
2) Extensions ?
104
   - I guess this is on a "as needed" basis
105
   - A friend suggested to add registers that can be shared by two or more cores in a MP type configuration
106
 
107
Author
108
======
109
 
110
I have been doing ASIC design, verification and synthesis for over 15 years.
111
This core is only a "mid-night hack", and should used with caution.
112
 
113
I'd also like to know if anyone will actually use this core. Please send me a
114
note if you will !
115
 
116
Rudolf Usselmann
117
russelmann@hotmail.com
118
 
119
Feel free to send me comments, suggestions and bug reports.
120
 

powered by: WebSVN 2.1.0

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