1

I need to get the absolute of the signal in Xilinx Simulink.

I can use a mcode block and write matlab code to achieve it. But, just curious if there is a better way of doing it.

I am very new to using Simulink(Xilinx). Is there any abs block as in Simulink in Xilinx library.

Thanks

Martin Thompson
  • 16,395
  • 1
  • 38
  • 56
Kiran
  • 8,034
  • 36
  • 110
  • 176
  • Well, I modeled it. I basically used a compare to Zero block and followed by a 2-to-1 Multiplexer. – Kiran May 07 '11 at 10:43

1 Answers1

2

Xilinx have the following Answer Record:

http://www.xilinx.com/support/answers/10975.htm

which pretty much covers what you've already done!

Martin Thompson
  • 16,395
  • 1
  • 38
  • 56
  • Thanks, 1 more solution. and more optimal since Compare to zero has a latency of 1 clock cycle whereas Slice block doesn't require any additional hardware resource – Kiran May 16 '11 at 12:46
  • If you make the latency of a "compare to zero" 0 it will probably result in just a slice in the end. The optimisers are good at that sort of thing. – Martin Thompson May 16 '11 at 12:50