Fix bug in PTLcall support

When PTLcall command is sent via MMIO only first command was read, this bug
fixes this issue and now correctly read all the commands.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Improved running unit-tests

Now unit-tests are run right after qemu is initialized so users don't have to
load any checkpoint to start tests.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Increased Max Uops per Instruction count

In cmpxchg8b/16b instrucitons number of uops can go higher than 16 so we have
increased Max uops per instructions limit.

Also renamed 'tests_passed' to 'tests_failed' in test.cpp.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Fix small bugs in Cache

Bug fixes in this patch:
- In simple cache mark line as modified when upper level cache sends 'Update' message
- Send modified line to lower level cache on evict
- Increased split-bus pending request queue size to 32

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Fix non-determinism issues when comamnd is specified via QEMU monitor

With this patch, when 'simconfig -run' is specified via qemu monitor
it will switch to simulation with more determinstic ways by eliminating
emulation runs when -run command is issued.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Small bug fix in MOESI and Switch that prevents deadlocks

Also fixed compilation issue introduced in last commit

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
* Use python tempfile to create the simconfig
Signed-off-by: Furat Afram <furat.afram@gmail.com>
Merge pull request #12 from furatafram/code-cleanup

Improvement to run_bench.py script
Fix small issues in directory and MOESI

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Fix in memory-update operation in Moesi

Allows memory-update in MOESI code to go to lower level cache/memory.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Support Write-back private caches with Split-bus

Now users can create multicore machine configurations with private
write-back caches and split-bus as interconnect.  Specify option
'snoop_disbale' to 'true' in machine configuration.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Cycle count fix in atomcore

Now idle mode cycles are not counted as 'kernel' cycles in atom core.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Support to run multiple run configurations

New feature in run_bench script that allows multiple run configurations either
via command line or via configuration file.  To specify more than one
configuration in cfg file create a new run section as below:

[run multiple_runs]
runs = run_cfg_1, run_cfg_2, run_cfg_3

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Support for pop gs instruction and fix in push fs/gs

Fix small bug with push fs/gs instruction.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Fix in cache line prefetch

Line is now inserted into cache when prefetch request is completed.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Changed location of cache hit/miss stats

Old place where stats were updated might be incorrect because if a request is
annulled after cache is accessed and before stats is updated then our total
stats count can be little off.

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Removed unused code from ooo-exec.cpp

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Added 'likely/unlikely' to cpuController and memoryHierarchy

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Fix memory update handling issue in MESI

Signed-off-by: Avadh Patel <avadh4all@gmail.com>
Added description to memory operation types

Signed-off-by: Avadh Patel <avadh4all@gmail.com>