1

He all, I was wondering how should be the parameters fo the CORDIC divider block in order to get proper results. In this example I´m trying to get 0.1/0.2 = 0.5 but I don´t get it and I don´t know why? Please, does anyone know how to do it? Thank you!!!

EDIT: To take a look to the parameters of the CORDIC block see this question: System Generator: How to configure the CORDIC divider block. Understanding the block parameters

enter image description here

Peterstone
  • 945
  • 2
  • 14
  • 30

1 Answers1

2

From the latency on the cordic block, that looks as if you've chosen to use a single processing element - that will produce results of limited accuracy. Very limited it appears :)

I tried using 10 elements for example, with [zeros (1,9) 1] for the "latency per processing element" - to get back to your 21 tick latency. Making sure I ran the simulation long enough (oops), I then got a result (using UFixed_16_11 inputs) of 0.501953125. Which is closer...

Does that help?

Martin Thompson
  • 8,439
  • 1
  • 23
  • 44
  • Yeeaah!!, I´ve put as 'Number of Proccessing Elements:' 10; and I´ve put a Latency for each Processing Element: [0 0 0 0 0 0 0 0 0 0 1] and I´ve gotten 0.498. – Peterstone Feb 02 '11 at 09:50
  • 1
    Excellent! Just for future readers - "[zeros (1,9) 1]" isn't (just) shorthand, you really can type that in the box. Any legal matlab commands can go in the box and as long as they evaluate to a vector, it'll get used by the underlying scripts. – Martin Thompson Feb 02 '11 at 13:46