• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Digital Implementation
  3. Bit order after flatten_complex_ports

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 90
  • Views 3927
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bit order after flatten_complex_ports

Michael11
Michael11 over 1 year ago

Hi all!

I have the follow SV structure definition:

typedef struct packed {
  logic [1:0] buf_gain;

  logic [1:0] pre_amp_gain;
} global_bit_t;

This structure is used as the type of a port on my toplevel.

Because I need to load the synthesized design into Virtuoso, I'm calling

flatten_complex_ports [get_db modules top]

during synthesis. I expected that pre_amp_gain[1:0] would be mapped to positions [1:0] of the flat array, and buf_gain[1:0] to [3:2]. In this order.

After completing the flow, I'm writing out the mapping of the port names (.name vs .original_name), and this is what I get:
GLOBAL_BIT[3] GLOBAL_BIT.buf_gain[0]
GLOBAL_BIT[2] GLOBAL_BIT.buf_gain[1]
GLOBAL_BIT[1] GLOBAL_BIT.pre_amp_gain[0]
GLOBAL_BIT[0] GLOBAL_BIT.pre_amp_gain[1]

So the order of the members of the struct is as expected, with pre_amp_gain at 0. But each member's order is exactly opposite of what I expected, which is pre_amp_gain[0] mapped to 0.

Is this the intended behavior? Is there any way to get the result I want? I checked the help system, and there seem to be no settings that affect flatten_complex_ports.

Thanks,
Michael

PS: Genus 22.14-s059_1.

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information