Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5841679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:55:14+00:00 2026-05-22T11:55:14+00:00

I am currently learning MyHDL for my summer project. I have a problem grasping

  • 0

I am currently learning MyHDL for my summer project.
I have a problem grasping the functioning of yield statement in it. Though its true that the MyHDL is based upon python, it uses its yield statement in a specialized way.
the link for the same is :
http://www.myhdl.org/doc/current/manual/reference.html#myhdl.always

it states:
MyHDL generators are standard Python generators with specialized yield statements. In hardware description languages, the equivalent statements are called sensitivity lists. The general format of yield statements in in MyHDL generators is:
yield clause [, clause …]
When a generator executes a yield statement, its execution is suspended at that point. At the same time, each clause is a trigger object which defines the condition upon which the generator should be resumed. However, per invocation of a yield statement, the generator resumes exactly once, regardless of the number of clauses. This happens on the first trigger that occurs.

I am not able to comprehend it. Could someone please explain it in simple words? or perhaps redirect me to another source?

I’ll be grateful if you could help.
Thanks!

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:55:15+00:00Added an answer on May 22, 2026 at 11:55 am

    First and foremost: remember that the MyHDL implementation is strictly pure Python. In that sense there is no “difference” between a yield statement in MyHDL and in Python.

    MyHDL really is a way to use Python as a HDL. Partially, this is done by implementing some hardware design specific objects in a pure Python package called myhdl. For example, there is a myhdl.Simulation object that runs generators in a way suited for hardware simulation.

    The other part is simply interpreting certain Python features in a hardware specific way. For example, a hardware module is modeled as a Python function that returns generators. Another example is that the “yield” statement is interpreted as a “wait” functionality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently learning Magento and seem to have come across a problem that is
Currently learning Scheme/Racket and have problem running this piece of code. (if (or (<
im currently learning jQuery and have ran into a problem. I am trying to
I'm currently learning MVC2, and I have seen three variants of the tags that
So I am currently learning C++ and decided to make a program that tests
I'm learning XML, currently of Wikibooks, but that is kinda huge and not oversee-able...
im currently learning python (in the very begining), so I still have some doubts
im currently learning stacks in java and have a quick question. what will the
I am currently learning ASP.NET MVC and I have followed Stephen Walther's tutorial: ASP.NET
I'm currently learning F# and I really love the yield! (yield-bang) operator. Not only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.