MC723 - Frequently Asked Questions

General | Activity 1 | Activity 2 | Activity 4 (v0.2) | Activity 5 (v0.3) | Activity 6 (v0.4)

General

Where do I find SystemC installed?

All IC-3 machines have SystemC installed.

How do I install / use ArchC?

You do not need to install it if you are on the IC-3. I installed on my account at ~ rodolfo / archc. To use, just run the following commands:
      ARCHC_PATH = / home / staff / rodolfo / archc PATH = $ PATH: $ ARCHC_PATH
From then on, only use acpp as described in the manual.

Activity 1

For the processor family I chose, which processor model should I choose?

Try to choose a processor that has a lot of practical utility (there are products based on it for example). So whoever implements it will probably have greater availability of tools. Note that from the point of view of implementation, features such as embedded peripherals are not relevant, so you can consider as equal versions processors that have exactly the same set of instructions and different peripherals.

How to save the file in .txt format?

Type your text in Windows Notepad or Linux Emacs. There are several other publishers that record directly in .txt format (plain text). If you are still in doubt, do not use Word or OpenOffice and you will have a good chance of having the .txt file automatically saved for you.

Which email should I send the work to?

Send it to my email, which is rodolfo at ic.unicamp.br. I would like to apologize for having to put this question on the page, but a student called me to ask what my email was and two others wrote to me (by email, amazing!).

Activity 2

The processor manual contains all the necessary information. Can we send it instead of the spreadsheet?

Actually the manual contains everything you need to create the spreadsheet. But the spreadsheet with instructions and formats must be created to facilitate your own work. It will be small and should be easy to consult. See some examples: SPARC (type e instructions) to MIPS.

Activity 4 (v0.2)

How do I test my model's instructions?

Create a file in hexadecimal format and provide it as input to the generated simulator. For version 0.2, you only need to ensure that: The hexadecimal file with instructions must have, for each line, an address and a word from the processor (if the ac_wordsize is 32 bits, you must work with 32 bits words, same for other sizes). If you want to put more than one word per line, the reader will consider successive addresses always adding the length of the specified word.

How do I use the function delay?

You must use the option --delay of the acpp. The function delay serves to make a delayed assignment in a register.

How do I debug my code?

To see if the decoder is correct, use the option --dumpdecoder from acpp, it will show the entire decoder on the screen and can help you find any instructions that are not correctly decoding.
To increase the debugging level, include the options --disassembler, --debug e --verbose. To learn more about these and other options, see the ArchC manual or run: app --help.

Activity 5 (v0.3)

What should I test in this version?

This version is for deeper testing, you will need larger programs to test. At this point we are already assuming that all instructions are individually tested, which should have been done in the previous activity. Here are some steps to take:

What options do gcc should I use to compile my program?

To avoid some common compilation errors at this stage, you will probably need the options -nostdinc -nostdlib -Ttext = 0. The last option tells the compiler to put the code in memory address 0 as it is there that the simulator expects to find it.

Activity 6 (v0.4)

What should I test in this version?

Use the test programs of this file to test the implemented System Calls. All programs must work correctly. It is common, after the inclusion of calls to the operating system, that you discover bugs in the implementation of the instructions. Be sure to fix these bugs!