OpenCores
no use no use 1/1 no use no use
Plasma problem?
by marian6625 on Sep 16, 2009
marian6625
Posts: 2
Joined: Aug 21, 2009
Last seen: Apr 11, 2012
Hi,

I am completely new on opencores, I am not very familiar with hardware, I work with
software mainly. I am trying to work with plasma examining a possibility of Linux port.
After some work, I am able to run the current distribution of plasma on my board
(xc3s1600e), however when checking uClibc I have problems. Maybe I am wrong, but
it seems to me that unsigned comparison between small and large (more than maximal
signed) integers gives wrong results. Does anybody have a patch or another solution for
this problem?


Thanks,

Marian


P.S.: Here is a small testing program, which gives correct results on mlite and gives
wrong result on plasma:


#define MemoryRead(A) (*(volatile unsigned int*)(A))
#define MemoryWrite(A,V) *(volatile unsigned int*)(A)=(V)

#define UART_WRITE 0x20000000
#define UART_READ 0x20000000
#define IRQ_MASK 0x20000010
#define IRQ_STATUS 0x20000020

#define IRQ_UART_READ_AVAILABLE 0x01
#define IRQ_UART_WRITE_AVAILABLE 0x02

void serial_putc(const char value)
{
while((MemoryRead(IRQ_STATUS) & IRQ_UART_WRITE_AVAILABLE) == 0)
;
MemoryWrite(UART_WRITE, value);
}

int fun(int req) {
return((unsigned long)(req) >= (unsigned long)(-4000));
}

void main() {
int r = fun(16000000);
serial_putc(r + '0');
}



The problem appears only if the program is compiled without optimisation or with
only -O option only, i.e. when functions are not inlined.
RE: Plasma problem?
by rhoads on Sep 17, 2009
rhoads
Posts: 16
Joined: Sep 25, 2001
Last seen: Jan 11, 2023
It appears that control.vhd line 301 should be changed:

b_source := B_FROM_SIGNED_IMM; --was B_FROM_IMM;

I will test it tomorrow. Thank you for reporting the problem.

Steve
RE: Plasma problem?
by marian6625 on Sep 17, 2009
marian6625
Posts: 2
Joined: Aug 21, 2009
Last seen: Apr 11, 2012
Hi Steve,

It appears that control.vhd line 301 should be changed:

b_source := B_FROM_SIGNED_IMM; --was B_FROM_IMM;

I will test it tomorrow. Thank you for reporting the problem.

Steve


thank you very much for the quick and usefull answer. It works fine now.
I really appreciate all your work on PLASMA core.

Regards,

Marian
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.