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

  • SEARCH
  • Home
  • 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 8522161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:02:16+00:00 2026-06-11T07:02:16+00:00

For the record, I’m a complete Verilog newbie. I’m writing a module that uses

  • 0

For the record, I’m a complete Verilog newbie. I’m writing a module that uses a few bidirectional buses.

inout wire [KEY_SIZE-1:0] prevKey;
inout wire [TAG_SIZE-1:0] prevTag;

inout wire [KEY_SIZE-1:0] nextKey;
inout wire [TAG_SIZE-1:0] nextTag;

I know how I read things off of the bus, but how do I write something onto it? If I use an assign statement to a reg, will the value of the reg get clobbered when new data comes onto the wire? Is dealing with an inout port worth the hassle, or should I just make an input and and output bus for each?

  • 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-06-11T07:02:18+00:00Added an answer on June 11, 2026 at 7:02 am

    If I use an assign statement to a reg…

    This statement doesn’t really make sense, you don’t do assignments to regs, you do assignments to wires.

    Simple example of driving an inout wire:

    inout wire bidir_wire;
    
    reg drive_value;
    reg drive_enable;
    reg something;
    
    assign bidir_wire = drive_enable ? drive_value : 1'bz; 
    
    always @(posedge clk) begin
        drive_value  <= ... ;  //assign a drive value based on some criteria
        drive_enable <= ...;
        something    <= bidir_wire; //do something with the input value
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A record has been deleted from a CMS that I am using called ePublisher.
One record in our database tracks the frequency that person A gives gifts to
I have the following record definition: -record(contact, {name, email}) Assuming that I have a
When saving a record with belongs to is it possible to ensure that the
I have a record set that includes a date field, and want to determine
When I retrieve a record using LINQ that has a DateTime field only the
I have a Record model (Active Record) that stores some custom logs. Record is
I want to record the client that browse my web page, So I do
i record the video in my i pad application and then get the path
I record Live Stream With Red5 Media Server successfully. But the recorded video saved

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.