I think the thing to keep in mind is that this default value is only used to 
generate the controller SimObject py file.  I don't want to add a constant 
because that leads to the thing I want to avoid the most...having more than 1 
way to specify defaults.  In the end, I think the right way to do this is have 
a base dma controller py file that all generated dma py files inherit from.  We 
should add that on the things to do for SLICC.

Brad


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
nathan binkert
Sent: Thursday, March 18, 2010 7:05 PM
To: M5 Developer List
Subject: Re: [m5-dev] [PATCH 14 of 31] ruby: Minor dma latency initialization 
fix

What I was getting at is that it is generally bad programming style to
just have a number all over the place and not have some sort of
constant that defines what that number is.

  Nate

> 6 is value used by other dma controllers and is the same value that was used 
> in the old ruby lang config files.  I'm just maintaining that consistency.
>
> Brad
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of 
> nathan binkert
> Sent: Thursday, March 18, 2010 4:30 PM
> To: M5 Developer List
> Subject: Re: [m5-dev] [PATCH 14 of 31] ruby: Minor dma latency initialization 
> fix
>
> 6 seems like a magic number to me.  Why did you pick it?  Is there
> some constant somewhere that could at least specify it?
>
> On Thu, Mar 18, 2010 at 2:46 PM, Brad Beckmann <[email protected]> wrote:
>> # HG changeset patch
>> # User Brad Beckmann <[email protected]>
>> # Date 1268941833 25200
>> # Node ID 61a3951c4739508c5fc5a518eeffb2da08790827
>> # Parent  a6b9c13fe7c9a4d3b4f560df959132b65a3c733a
>> ruby: Minor dma latency initialization fix
>>
>> diff --git a/src/mem/protocol/MI_example-dma.sm 
>> b/src/mem/protocol/MI_example-dma.sm
>> --- a/src/mem/protocol/MI_example-dma.sm
>> +++ b/src/mem/protocol/MI_example-dma.sm
>> @@ -1,7 +1,7 @@
>>
>>  machine(DMA, "DMA Controller")
>>  : DMASequencer * dma_sequencer,
>> -  int request_latency
>> +  int request_latency = 6
>>  {
>>
>>   MessageBuffer responseFromDir, network="From", virtual_network="4", 
>> ordered="true", no_vector="true";
>> diff --git a/src/mem/protocol/MOESI_CMP_token-dma.sm 
>> b/src/mem/protocol/MOESI_CMP_token-dma.sm
>> --- a/src/mem/protocol/MOESI_CMP_token-dma.sm
>> +++ b/src/mem/protocol/MOESI_CMP_token-dma.sm
>> @@ -29,7 +29,7 @@
>>
>>  machine(DMA, "DMA Controller")
>>  : DMASequencer * dma_sequencer,
>> -  int request_latency
>> +  int request_latency = 6
>>  {
>>
>>   MessageBuffer responseFromDir, network="From", virtual_network="0", 
>> ordered="true", no_vector="true";
>>
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev


_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to