void
pke_flip_dbf(struct pke_device* me)
{
+ /* compute new ITOP and TOP */
+ PKE_REG_MASK_SET(me, ITOP, ITOP,
+ PKE_REG_MASK_GET(me, ITOPS, ITOPS));
+ PKE_REG_MASK_SET(me, TOP, TOP,
+ PKE_REG_MASK_GET(me, TOPS, TOPS));
/* flip DBF */
PKE_REG_MASK_SET(me, DBF, DF,
PKE_REG_MASK_GET(me, DBF, DF) ? 0 : 1);
(PKE_REG_MASK_GET(me, BASE, BASE) +
(PKE_REG_MASK_GET(me, DBF, DF) *
PKE_REG_MASK_GET(me, OFST, OFFSET))));
- /* compute new ITOP and TOP */
- PKE_REG_MASK_SET(me, ITOP, ITOP,
- PKE_REG_MASK_GET(me, ITOPS, ITOPS));
- PKE_REG_MASK_SET(me, TOP, TOP,
- PKE_REG_MASK_GET(me, TOPS, TOPS));
}
/* imm: in 64-bit units for MPG instruction */
/* VU*_MEM0 : instruction memory */
vu_addr_base = (me->pke_number == 0) ?
- VU0_MEM0_WINDOW_START : VU0_MEM0_WINDOW_START;
+ VU0_MEM0_WINDOW_START : VU1_MEM0_WINDOW_START;
vu_addr = vu_addr_base + (imm + i) * 8;
/* XXX: overflow check! */
void init_vu1(void);
void init_vu(VectorUnitState *state, char* umem_buffer, char* mem_buffer);
+static void dump_mem() {
+ int i;
+ typedef int T[2048][4];
+ T *mem = (T*)&vu1_mem_buffer;
+
+ for (i = 0; i < 200; i++) {
+ printf("%d: %x %x %x %x\n", i, (*mem)[i][0], (*mem)[i][1], (*mem)[i][2], (*mem)[i][3]);
+ }
+}
+
void
vu1_issue(void)
{