开发者

Using Slice Block in Simulink

开发者 https://www.devze.com 2023-03-06 10:26 出处:网络
I 开发者_如何学运维am having some trouble using the Slice block(Xilinx Bit Slice Extractor).

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消