Giter Club home page Giter Club logo

Comments (3)

edgar-costa avatar edgar-costa commented on July 25, 2024

You can find the description of hash here: https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4#L453

The important part:

The value written to the out parameter named result: will always be in the range [base, base+max-1] inclusive, if max >=1. If max=0, the value written to result will always be base.

That means if base is 0, and max is 100, it will be from 0 to 100. If base is 100 and range 100, it will be from 100 to 200.

Hope that answers your question

from p4-learning.

ls760008979 avatar ls760008979 commented on July 25, 2024

Oh,thanks! I got it,and one more question about register.In the same exercise,for example:
register
does it means the 'um_ip_src' register have index from 0 to 'REGISTER_SIZE_TOTAL',and every index has a value in type 'REGISTER_CELL_WIDTH'.Excuse me for taking your time,thanks in advance.

from p4-learning.

edgar-costa avatar edgar-costa commented on July 25, 2024

Yes it means that!

from p4-learning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.