cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
7,512 Views
Registered: ‎11-14-2009

Basic question about FSL control bit

Jump to solution

 

Hi,

 

    Does the macro "cputfsl(val, id)" put a control bit of 1 on control bus and val on data bus? If not how can I update the control and data at the same time?

 

 

 

 

Regards,

 

Karthik

1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
9,560 Views
Registered: ‎08-06-2007

Hi,

 

 "cputfsl(val, id)" do put '1' on the control bit and val on the data bus.

 

Göran

 

View solution in original post

5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
9,561 Views
Registered: ‎08-06-2007

Hi,

 

 "cputfsl(val, id)" do put '1' on the control bit and val on the data bus.

 

Göran

 

View solution in original post

Highlighted
Observer
Observer
7,484 Views
Registered: ‎11-14-2009

 

Thank you!

 

 

Regards,

 

Karthik

0 Kudos
Highlighted
Visitor
Visitor
6,100 Views
Registered: ‎03-09-2011

Göran (e du svensk?),

 

I'm confused about your answer here.  It was my understanding that cputfsl(val, id) would put the value in "val" into the control bit.  Otherwise how would cgetfsl work to get the control bit?  That is, in order to write a value onto the data bus, and set the control bit you would have to:

 

cputfsl(1, id);

putfsl(data, id);

 

When you called putfsl it would write the entire thing with the control bit and data.  Is that not accurate?  If I assumed that cputfsl wrote "val" to the data bus and a 1 to the control bit in one instruction, then how do I get a data value from the bus along with the control bit?  How do I read the control bit for a particular data value?  Can you provide a quick example?  Thanks! 

 

-Donby

Tags (1)
Highlighted
Xilinx Employee
Xilinx Employee
6,087 Views
Registered: ‎08-06-2007

Hi,

 

(Jo, Jag är svensk)

 

cput sets control bit to '1' and put sets control bit to '0'.

 

get doesn't "read" the control bit but you will see on the carry-bit if the control bit was not the expected value.

So cgetfsl assumes that control bit is '1' and will set the carry-bit in the MSR if it's not.

The same goes for getfsl which assumes than control bit is '0'.

 

You can read about this in the microblaze reference guide.

 

Göran

Highlighted
Visitor
Visitor
6,073 Views
Registered: ‎03-09-2011

OK I get it.  So in a situation (like mine) where we're using the control bit to indicate that the data is an address vs. data, I would call iserror after calling getfsl.  If the control bit was a one, then I should get an error.  If isinvalid is true, then there wasn't any data (fifo was empty, i'm using nonblocking).  LIkewise when I want to write back using this method, I use cputfsl to write the address, putfsl to write data, and isinvalid to determine that the last write didn't work because the fifo is full.

 

Is this correct? 

 

Thanks a million for your help, we're in the middle of the "freaking out" phase of our project. :)

 

-Donby