Our forums have moved! Please go to http://forums.accellera.org for the new forums. The forums you see here will remain open for browsing, but are no longer open to new posts.
KMLM List
View email archives for the history of this mailing list.
|
|
|
|
systemc-forum - Re: [systemc-forum] How can i solve strange error
|
Message Thread:
Previous |
Next
|
- To: Kevin Im <jylim3@xxxxxxxxxxx>
- From: "Palla S. Kiran Kumar" <pallakirankumar@xxxxxxxxx>
- Date: Mon, 11 Jan 2010 12:28:55 +0530
- Cc: systemc-forum@xxxxxxxxxxxxxxxxx
- Send Email to systemc-forum@lists.systemc.org:
- Send new message
- Reply to this message
|
Hi Kevin
What is the upper code and below code. can you elaborate ?
Also, can you paste the error that you got ?
Regards
/kk
On Sun, Jan 10, 2010 at 12:33 PM, Kevin Im <jylim3@xxxxxxxxxxx> wrote:
> Dear all
>
> I have designed some module with systemc.
>
> But, i have encountered strange error in my code.
>
> Here is codes.
>
> cache.h
> .....
> SC_METHOD( cache_process );
> sensitive << clk;
> sensitive << RSTb;
> ...
>
> sc_signal< sc_uint<1> > CACHE_HIT ;
> sc_signal< sc_uint<1> > CACHE_MISS ;
> ....
>
> cache.cpp
> .....
> cache_process()
> {
> .......
> // Cache Hit
> sc_uint<1> CACHE_HIT_int ;
> sc_uint<1> CACHE_MISS_int;
>
>
> CACHE_HIT_int = ( ( ( WAY_0_HIT == 1 || WAY_1_HIT == 1 || WAY_2_HIT == 1||
> WAY_3_HIT == 1 ) && ( ENABLE_CACHE.read() == 1 ) && (
> CACHE_ENABLE_AREA_int == 1) ) )? 1 : 0 ;
> CACHE_HIT.write( CACHE_HIT_int ) ;
>
>
>
> if (CACHE_HIT_int == 0 )
> CACHE_MISS_int = 1;
> else
> CACHE_MISS_int = 0 ;
>
>
> CACHE_MISS.write( CACHE_MISS_int ) ;
> ......
> }
> .....
>
> As see in codes, there are same sequence code.
>
> ..
> CACHE_HIT.write( CACHE_HIT_int ) ;
> ...
> CACHE_MISS.write( CACHE_MISS_int ) ;
> ....
> Upper code did not generate any error, But, below code which write to
> CACHE_MISS is generate "bus error".
> between two codes are not much difference except CACHE_MISS write value is
> generate from CACHE_HIT_int signal.
>
> Any Reason to this situation ?
> Is there anything i should do other than that ?
>
> Thanks and regards.
> Kevin Im
>
>
>
--
Palla S. Kiran Kumar
|
|