Kiran
Kiran

Reputation: 8548

Using Slice Block in Simulink

I am having some trouble using the Slice block(Xilinx Bit Slice Extractor). I need to extract 2 bits before the Binary Point of Input.

So if the input is represented in 2's complement, and if the input is say for instance 2.25

It would represented as 000*10*.01000000. So I need to extract only 2 bits before the binary point. (10 in this case)

If not Slice Block, is there any technique which gives me more flexibility in extracting the required bits.

I am having similar problem using Bitbasher block.

Thanks Kiran

Upvotes: 0

Views: 1168

Answers (1)

Martin Thompson
Martin Thompson

Reputation: 16832

Set up your slice block parameters as:

  • Width of slice = 2
  • "lower bit location + width"
  • Offset of bottom bit = 0
  • relative to: Binary point of input

I'm not sure that you can be that detailed with the BitBasher.

Upvotes: 1

Related Questions