Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers

1.6k comments

529 users

+2 votes

Ich hätte eine Frage zum Offset. Müsste es in diesem Fall nicht 2bit Offset sein?

Vielen Dank im Voraus!

in * TF "Emb. Sys. and Rob." by (580 points)

1 Answer

+3 votes
Der Abacus-Prozessor, um den es hier geht, ist ein 16-bit Prozessor, dessen Speicherbefehle sich auf Wörter mit 2 Bytes beziehen. Eine Speicheradresse sind also zwei Bytes und ein Block mit 4 Bytes enthält zwei Wörter, so dass ein Bit ausreicht um die beiden Wörter in einem Block zu adressieren.
by (166k points)
Vielen Dank!
Sie können das Programm mit folgender Eingabe im Simulator laufen lassen:

// -----------------------------------------------------------------------------
// parameters for DM cache
// -----------------------------------------------------------------------------
#const SingleCycle yes  // whether everything is done in one stage
#const DataWidth    16  // bitwidth of registers (two bytes wide)
#const MemSize     512  // size of physical main memory in bytes
#const CacheSize    32  // size of data cache in bytes
#const BlockSize     4  // number of bytes in a block
#const SetAssoc      1  // number of blocks in a set
// -----------------------------------------------------------------------------
// parameters for A2 cache
// -----------------------------------------------------------------------------
#const SingleCycle yes  // whether everything is done in one stage
#const DataWidth    16  // bitwidth of registers (two bytes wide)
#const MemSize     512  // size of physical main memory in bytes
#const CacheSize    32  // size of data cache in bytes
#const BlockSize     4  // number of bytes in a block
#const SetAssoc      4  // number of blocks in a set

      mov  $0, 30
      mov  $2,  0
      mov  $1, 16
loop: ldi  $4, $2, 4
      modi $3, $2, 4
      ld   $5, $3, $0
      xor  $6, $4, $5
      add  $7, $2, $0
      sti  $6, $7, 6
      addi $2, $2, 1
      slt  $7, $2, $1
      bnz  $7, loop

Related questions

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
asked Mar 22, 2021 in * TF "Emb. Sys. and Rob." by ballatma (1.2k points)
Imprint | Privacy Policy
...