Skip to content

Commit 39f63b5

Browse files
committed
preparing to pip
1 parent cd5389f commit 39f63b5

8 files changed

Lines changed: 330 additions & 118 deletions

File tree

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
"# CacheSimulator"
1+
# cache tables
2+
## Created for education oriented stuff, this library will let students create cache tables extremelly easy so they can learn more about the hardware and spend less time doing this stuff by hand.
3+
### Author: @notZombieFood
4+
5+
## How to
6+
First, be sure you have installed pip and run this command.
7+
```shell
8+
pip install cache_tables
9+
```
10+
Load the libray into python
11+
```python
12+
import cache_tables
13+
cache_tables.demo() #this will run some functions to demonstrate the functionality
14+
```
15+
## Code example, this should be easy to understand
16+
```python
17+
addresses = [3,180,43,2,191,88,190,14,181,44,186,253]
18+
print ("Example 1 \nDirect Associative, with 8 blocks of 1 word \n")
19+
cache_tables.directAssociative(addresses,8,1)
20+
print ("Example 2 \nDirect Associative, with 4 blocks of 2 word\n")
21+
cache_tables.directAssociative(addresses,4,2)
22+
print ("Example 3 \nDirect Associative, with 2 blocks of 4 word\n")
23+
cache_tables.directAssociative(addresses,2,4)
24+
print ("Example 4 \nFull Associative Random, with 4 word\n")
25+
cache_tables.fullAssociative(addresses,4,"RANDOM")
26+
print ("Example 4 \nFull Associative FIFO, with 4 word\n")
27+
cache_tables.fullAssociative(addresses,4,"FIFO")
28+
print ("Example 4 \nFull Associative MRU, with 8 word\n")
29+
cache_tables.fullAssociative(addresses,4,"MRU")
30+
print ("Example 4 \nFull Associative LRU, with 8 word\n")
31+
cache_tables.fullAssociative(addresses,4,"LRU")
32+
```
33+
## Help, this will give you further info
34+
```python
35+
help(cache_tables.fullAssociative)
36+
```
37+
38+
## Will I implement partial associative?
39+
Yes, sometime. But I can also receive some help if any of you wants to!
40+
41+

__init__.py

Whitespace-only changes.

app.py

Lines changed: 0 additions & 116 deletions
This file was deleted.

cache_tables/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from cache_tables.cache import parseAddressDA, parseAddressFA, directAssociative, fullAssociative

0 commit comments

Comments
 (0)