MIPT-ILab / MDSP

[2009 – 2012] MDSP: functional simulation of a Multimedia Digital Signal Processor
MIT License
3 stars 1 forks source link

Main functional execution loop should be corrected. #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current core::run() has a major flaw - it is not "classical" i.e. it does 
not conform to 'fetch-decode-execute-write-results-advance_pc' form. This 
should corrected:

* all stages must be present, though they are are allowed to do nothing useful 
except for printing out "I am here!"

* all stages must be in the exact sequence.

Original issue reported on code.google.com by grigory....@gmail.com on 26 Oct 2010 at 5:09

GoogleCodeExporter commented 9 years ago
Over to the maintainer.

Original comment by grigory....@gmail.com on 30 Oct 2010 at 3:34

GoogleCodeExporter commented 9 years ago
Finally I started work seriously and I hope I'll fix this bug quickly.
Arthur Gilmullin

Original comment by agilmul...@gmail.com on 20 Nov 2010 at 5:59

GoogleCodeExporter commented 9 years ago
I dont understand what encode() operation in the main loop (core.cpp) should 
do. As I think the main loop should look like read -> decode -> execute -> dump 
-> ++pc. Is it correct?
Arthur Gilmullin

Original comment by agilmul...@gmail.com on 22 Nov 2010 at 7:27

GoogleCodeExporter commented 9 years ago
Indeed, for processor simulation normally we need not any encoding. Encoding is 
kind of work that should be done by assembler program during creation of 
machine code. The sumalator core should only decode what is given to him.

Original comment by grigory....@gmail.com on 22 Nov 2010 at 9:29

GoogleCodeExporter commented 9 years ago
I was faced with really strange bug: GetPC() returns wrong value of PC on 
simple_test.bin. I have no idea why, but I'll try to understand.
Arthur Gilmullin

Original comment by agilmul...@gmail.com on 23 Nov 2010 at 6:43

GoogleCodeExporter commented 9 years ago
It's not problem with GetPC(). It's problems with output:
cout << core->GetPC() << endl;
because printf("PC=%d",GetPC()) works correctly.
Arthur Gilmullin

Original comment by agilmul...@gmail.com on 23 Nov 2010 at 10:18

GoogleCodeExporter commented 9 years ago
I understood:
it's not decimal output as I thought: it's hex output. There is no bug in 
source, there is bug in my head.

Original comment by agilmul...@gmail.com on 27 Nov 2010 at 6:47

GoogleCodeExporter commented 9 years ago
There is no problem. Everyone do mistakes. 
It is nice that you are recording all your steps in the issue. Keep up the good 
work!

Original comment by alexander.igorevich.titov@gmail.com on 28 Nov 2010 at 4:23

GoogleCodeExporter commented 9 years ago
I merged my branch and trunk.

Original comment by agilmul...@gmail.com on 29 Nov 2010 at 12:09

GoogleCodeExporter commented 9 years ago

Original comment by agilmul...@gmail.com on 29 Nov 2010 at 8:39

GoogleCodeExporter commented 9 years ago
Arthur, *close* the bug please!

Original comment by grigory....@gmail.com on 30 Nov 2010 at 7:40

GoogleCodeExporter commented 9 years ago
I thought "Closed Statuses" means I can't choice it.
I think I should use "Fixed" status.

Original comment by agilmul...@gmail.com on 30 Nov 2010 at 11:11