Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
hostCompiledSimulation
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
hostCompiledSimulation
Commits
6a1add7e
Commit
6a1add7e
authored
Sep 10, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Intermediate changes in cacheSim, probably won't compile
Signed-off-by:
Gaurav Kukreja
<
gaurav@gauravk.in
>
parent
7fbde717
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
cacheSim.h
cache_simulator/headers/cacheSim.h
+2
-2
cacheSim.c
cache_simulator/src/cacheSim.c
+2
-2
cacheSimHwMod.h
cache_simulator/src/cacheSimHwMod.h
+2
-2
genericHwMod.c
cache_simulator/src/genericHwMod.c
+3
-2
No files found.
cache_simulator/headers/cacheSim.h
View file @
6a1add7e
...
...
@@ -17,7 +17,7 @@
*
* @return number of clock cycles spent
*/
extern
unsigned
int
simICache
(
unsigned
long
address
,
unsigned
int
nBytes
);
extern
unsigned
long
simICache
(
unsigned
long
address
,
unsigned
int
nBytes
);
/**
* Simulates Data Cache access by benchmark
...
...
@@ -27,7 +27,7 @@ extern unsigned int simICache(unsigned long address, unsigned int nBytes);
*
* @return number of clock cycles spent
*/
extern
unsigned
int
simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
);
extern
unsigned
long
simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
);
/**
* Initialize the cache data structures
...
...
cache_simulator/src/cacheSim.c
View file @
6a1add7e
...
...
@@ -47,7 +47,7 @@
*
* @return number of clock cycles spent
*/
unsigned
int
simICache
(
unsigned
long
address
,
unsigned
int
nBytes
)
unsigned
long
simICache
(
unsigned
long
address
,
unsigned
int
nBytes
)
{
unsigned
int
nCycles
;
cacheSimStat
.
access_type
=
ACCESS_TYPE_INVALID
;
...
...
@@ -70,7 +70,7 @@ unsigned int simICache(unsigned long address, unsigned int nBytes)
*
* @return number of clock cycles spent
*/
unsigned
int
simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
)
unsigned
long
simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
)
{
unsigned
int
nCycles
;
cacheSimStat
.
access_type
=
ACCESS_TYPE_INVALID
;
...
...
cache_simulator/src/cacheSimHwMod.h
View file @
6a1add7e
...
...
@@ -23,7 +23,7 @@ struct cacheSimHwMod_t
*
* @return number of clock cycles spent
*/
unsigned
int
(
*
simICache
)
(
unsigned
long
address
,
unsigned
int
nBytes
);
unsigned
long
(
*
simICache
)
(
unsigned
long
address
,
unsigned
int
nBytes
);
/**
* Simulates Data Cache access by benchmark
...
...
@@ -33,7 +33,7 @@ struct cacheSimHwMod_t
*
* @return number of clock cycles spent
*/
unsigned
int
(
*
simDCache
)
(
unsigned
long
address
,
unsigned
int
isReadAccess
);
unsigned
long
(
*
simDCache
)
(
unsigned
long
address
,
unsigned
int
isReadAccess
);
/**
* Initialize the cache data structures
...
...
cache_simulator/src/genericHwMod.c
View file @
6a1add7e
...
...
@@ -96,6 +96,7 @@ struct cacheLine_t
struct
cacheParam_t
L1Params
;
struct
cacheParam_t
L2Params
;
struct
cacheLine_t
**
L1DCache
;
struct
cacheLine_t
**
L1ICache
;
struct
cacheLine_t
**
L2DCache
;
...
...
@@ -458,7 +459,7 @@ unsigned int generic_simL1ICache(unsigned long address,
*
* @return number of clock cycles spent
*/
unsigned
int
generic_simICache
(
unsigned
long
address
,
unsigned
int
nBytes
)
unsigned
long
generic_simICache
(
unsigned
long
address
,
unsigned
int
nBytes
)
{
unsigned
int
nCycles
=
100
;
...
...
@@ -659,7 +660,7 @@ unsigned int generic_simL1DCache(unsigned long address,
*
* @return number of clock cycles spent
*/
unsigned
int
generic_simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
)
unsigned
long
generic_simDCache
(
unsigned
long
address
,
unsigned
int
isReadAccess
)
{
unsigned
int
nCycles
=
100
;
unsigned
int
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment