You are currently viewing SemiWiki as a guest which gives you limited access to the site. To view blog comments and experience other SemiWiki features you must be a registered member. Registration is fast, simple, and absolutely free so please, join our community today!

Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By kaaliakahn

Thread: systemverilog assertion for a 3x3 unsigned gate-level multiplier

  1. #1
    Member
    Join Date
    Mar 2012
    Location
    Massachusetts
    Posts
    18

    systemverilog assertion for a 3x3 unsigned gate-level multiplier

    [top]

    Hi
    I am wondering if the following assertion completely describes the behavior of a 3x3 unsigned gate-level multiplier at the bit level.

    The idea is the following. A 3x3 unsigned multiplier with 3 bit inputs "a" and "b" and 6 bit output "out" can be thought of as an adder that can add "
    a" 0 to 7 times OR an adder that can add "b" 0 to 7 times. With this in mind, can i NOT write a systemverilog assertion like the following??

    mult_propc: assert property (
    @ (posedge clk)
    disable iff(~rst_n)
    out == 0 ||
    1*(a[0] + 2*a[1] + 4*a[2]) &&
    2*(a[0] + 2*a[1] + 4*a[2]) &&
    3*(a[0] + 2*a[1] + 4*a[2]) &&
    4*(a[0] + 2*a[1] + 4*a[2]) &&
    5*(a[0] + 2*a[1] + 4*a[2]) &&
    6*(a[0] + 2*a[1] + 4*a[2]) &&
    7*(a[0] + 2*a[1] + 4*a[2]) &&
    1*(b[0] + 2*b[1] + 4*b[2]) &&
    2*(b[0] + 2*b[1] + 4*b[2]) &&
    3*(b[0] + 2*b[1] + 4*b[2]) &&
    4*(b[0] + 2*b[1] + 4*b[2]) &&
    5*(b[0] + 2*b[1] + 4*b[2]) &&
    6*(b[0] + 2*b[1] + 4*b[2]) &&
    7*(b[0] + 2*b[1] + 4*b[2])

    );


    I coded the property this way and tried it on 3x3 unsigned multiplier using Cadence Incisive formal verifier and it PASSED.

    If you feel there is a discrepancy, please educate me or where do you think this assertion might fail?

    Thanks a lot
    srikanth likes this.

  2. #2
    Blogger daniel_payne's Avatar
    Join Date
    Sep 2010
    Location
    Tualatin, OR
    Posts
    1,227
    I think that you are looking at this assertion from too low of a level. Look at the snippet in this book for writing assertions on a multiplier.
    Daniel Payne, EDA Consultant
    www.MarketingEDA.com
    503.806.1662

  3. #3
    Member
    Join Date
    Mar 2012
    Location
    Massachusetts
    Posts
    18
    Daniel, thanks for your comment

    My previous approach is wrong and confusing.

    Here is an approach that works till 8x8 multipliers. For 16x16, formal tools give up because of the scalability issues


    mult_propc: assert property ( //coded for unsigned 3x3 multiplier
    @ (posedge clk)
    disable iff(~rst_n)
    cout == (~b[2]& ~b[1]& ~b[0])*0*(a[0] + 2*a[1] + 4*a[2]) |
    (~b[2]& ~b[1]& b[0])*1*(a[0] + 2*a[1] + 4*a[2]) |
    (~b[2]& b[1]& ~b[0])*2*(a[0] + 2*a[1] + 4*a[2]) |
    (~b[2]& b[1]& b[0])*3*(a[0] + 2*a[1] + 4*a[2]) |
    (b[2]& ~b[1]& ~b[0])*4*(a[0] + 2*a[1] + 4*a[2]) |
    (b[2]& ~b[1]& b[0])*5*(a[0] + 2*a[1] + 4*a[2]) |
    (b[2]& b[1]& ~b[0])*6*(a[0] + 2*a[1] + 4*a[2]) |
    (b[2]& b[1]& b[0])* 7 * (a[0] + 2*a[1] + 4*a[2]);

Posting Permissions

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