Results 1 to 7 of 7

Thread: Shift Register: different behaviour between QII 8.0 and 10.1

  1. #1
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    1

    Default Shift Register: different behaviour between QII 8.0 and 10.1

    I have created the following shift register using Quartus II 8.0:

    ENTITY ShiftReg IS
    GENERIC
    (
    DATA_SIZE : INTEGER := 8
    );
    PORT
    (
    clk : IN STD_LOGIC;
    clr : IN STD_LOGIC;
    data_in : IN STD_LOGIC;
    data_out : OUT STD_LOGIC_VECTOR (DATA_SIZE - 1 DOWNTO 0)
    );
    END ShiftReg;

    ARCHITECTURE ShiftReg OF ShiftReg IS
    SIGNAL data_wire : STD_LOGIC_VECTOR (DATA_SIZE - 1 DOWNTO 0);

    BEGIN
    PROCESS (clk, clr, data_in, data_wire)

    VARIABLE count_data : INTEGER;

    BEGIN

    IF (clr = '1') THEN
    data_wire <= (OTHERS =>'0');
    ELSE
    IF (clk'EVENT AND clk = '1') THEN
    data_wire(DATA_SIZE - 1 DOWNTO 1) <= data_wire(DATA_SIZE - 2 DOWNTO 0);
    data_wire(0) <= data_in;
    END IF;
    END IF;

    END PROCESS;

    data_out <= data_wire;
    END ShiftReg;

    Performed the simulation using Altera-ModelSIM 6.6c and obtained the "correct" results as shown in Fig. 1.

    After creating a new project and compile it using Quartus II 10.1, I have performed a new simulation (same stimuli) and obtained the "incorrect" behaviour as shown in Fig. 2.

    Used Timequest to guide the placement and verified with the Technology Map Viewer (post-fiiting) that the resource usage and netlist are indeed the same in both version of Quartus (clearly the device used was also consistent EP1C12Q240C7).

    Is this a problem related with the simuation tool and its libraries? what is that I am missing?

    Thanks in advance for any reply
    Attached Images Attached Images

  2. #2
    Join Date
    May 2008
    Location
    Norway
    Posts
    4,172
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    Is your design properly constrained in Timequest and does it meet all timing requirements?

  3. #3
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    The design is constrained correctly for Input, Output and for clock. As mentioned, the interesting aspect is that the Technology Map Viewer shows the same implementation, thus, the propagation delays should also be consistent between the 2 designs.

    I am planning to submit a Request and send the archive project to Altera: would be the project of interest to You?

  4. #4
    Join Date
    May 2008
    Location
    Norway
    Posts
    4,172
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    The timing models for Modelsim could be different between the two versions and it could explain the different results even with the same synthesis. Also please note that even if the technology map viewer shows the same implementation, the two versions of Quartus could route the design differently, giving slightly different delays. But if the design is properly constrain and you don't have any critical warning from Timequest then this shouldn't happen and you should have consistent results in the two cases.
    This could sound stupid but are you sure that the clock you use in your testbench is within the range you specified in the timing constraints?

  5. #5
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    Indeed, the clock is also constrained and I am not getting any error or warning from Timequest.
    I have double checked for unconstrained paths and everything looks OK.
    An interesting aspect is that I have also created a new design under 101. in which I am using an Enable Shift signal and, surprise surprise, it works fine.
    The only doubt that I would like to dissipate is to verify that, in fact, the first design was created under Quartus II 8.0 and that project has been then opened with Quartus II 10.1.
    I will further test if this could be a condition for the reported problem by creating a brand new project (different directories but same design file) under Quartus 8.0 and then open it under 10.1.
    While it could be a glitch of either tool, I am a bit concern about this misbehaviour because I have quite some projects created with 8.0 that will end up in 10.1 or later versions.
    I will keep posting any result.

  6. #6
    Join Date
    Oct 2006
    Posts
    10
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    So, I have been trying further and I came to the conlcusion that the problem has been generated not between QII 8.0 and 10.1 but between QII 10.1 and 10.1 SP1.
    Indeed, the original design, for which I have posted the VHDL code, was created with a project under 10.1. I have then upgraded to SP1 and once I have opened the project I have been asked to update the database, which I did, and that is when I have seen the strange behavior of ModelSIM.
    In the past day, I have create a new project with the same code under 10.1 SP1 and same code and it behaved correctly.
    I do not know if it is the case to submit a service request considering that this version of QII has been already superseded by the latters: at least I know, or at I believe to understand, the failure mechanism.

    Thanks for the support,

    Armando

  7. #7
    Join Date
    May 2008
    Location
    Norway
    Posts
    4,172
    Rep Power
    1

    Default Re: Shift Register: different behaviour between QII 8.0 and 10.1

    It indeed looks like a bug. If you can check that this is still a problem with Quartus II 11.1 SP2 then you can file an SR, but if not then I don't think it's worth the while, I don't think they would fix it if it only impacted 10.1 SP1

Similar Threads

  1. Generic shift register
    By LETS in forum General Altera Discussion
    Replies: 2
    Last Post: February 10th, 2011, 01:27 AM
  2. Shift Register
    By agri in forum General Altera Discussion
    Replies: 4
    Last Post: December 9th, 2010, 11:38 AM
  3. Genvar: Shift Register
    By woeichee in forum General Altera Discussion
    Replies: 1
    Last Post: May 16th, 2010, 06:18 PM
  4. Strange behaviour whene reading custom component register
    By magixD in forum General Software Forum
    Replies: 7
    Last Post: September 30th, 2009, 12:32 AM
  5. SPI interfacing + Shift Register
    By digitaltee in forum Quartus II and EDA Tools Discussion
    Replies: 4
    Last Post: August 26th, 2008, 02:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •