OpenCores
URL https://opencores.org/ocsvn/lxp32/lxp32/trunk

Subversion Repositories lxp32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /lxp32/trunk/verify/lxp32
    from Rev 9 to Rev 12
    Reverse comparison

Rev 9 → Rev 12

/src/firmware/test016.asm
1,47 → 1,28
/*
* Test for temporarily blocked interrupts
* Test wake-up interrupts
*/
 
lc r100, 0x10000000 // test result output pointer
lc r101, halt
lc r102, failure
lc r103, 0x20000000 // timer: number of pulses (0xFFFFFFFF - infinite)
lc r104, 0x20000004 // timer: delay between pulses (in cycles)
lc r102, 0x30000000 // coprocessor input register
lc r103, 0x30000004 // coprocessor output register
lc r104, failure
 
lcs cr, 0x0404 // enable coprocessor interrupt and mark it as wake-up
lc iv0, timer_handler
lc cr, 0x101 // enable interrupt 0 in temporarily blocked state
sw r102, 33
lc r32, 0 // interrupt handler call counter
lc r33, 1000 // loop counter
lc r34, loop1
lc r35, loop2
sw r104, 100
sw r103, 1
hlt
 
loop1:
sub r33, r33, 1
cjmpug r34, r33, 0 // loop1
lc r33, 1000
mov cr, 1 // unblock interrupt 0
loop2:
sub r33, r33, 1
cjmpug r35, r33, 0 // loop2
// r32 should be 1 by this point
cjmpne r102, r32, 1 // failure
sw r100, 1
lw r1, r103
cjmpne r104, r1, 99
 
sw r100, 1 // success
 
halt:
hlt
jmp r101 // halt
 
failure:
sw r100, 2
halt:
hlt
jmp r101 // halt
timer_handler:
add r32, r32, 1
iret
/src/platform/coprocessor.vhd
38,7 → 38,7
 
signal value: unsigned(31 downto 0):=(others=>'0');
signal result: unsigned(31 downto 0):=(others=>'0');
signal cnt: integer range 0 to 5:=0;
signal cnt: integer range 0 to 50:=0;
signal irq: std_logic:='0';
 
begin
67,7 → 67,7
if wbs_adr_i="00"&X"000000" then
value(i*8+7 downto i*8)<=
unsigned(wbs_dat_i(i*8+7 downto i*8));
cnt<=5;
cnt<=50;
end if;
end if;
end loop;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.