Using Bitfields in Bus Editor
8 ビュー (過去 30 日間)
古いコメントを表示
How can i use bit fields in bus structure?
0 件のコメント
回答 (1 件)
Sam Warner
2022 年 1 月 23 日
編集済み: Sam Warner
2022 年 1 月 23 日
Seems the way to do this is define bus, with BusElements data type set to Boolean. By ordering the BusElements then one can even insure that the bit represents the correct bit in the word (Move Element Up/Down withiin the Bus Editor).
Though, this technique is limited to word sizes supported by Matlab. Other word (1bit > sizes < 8bits) have a bit of hole with this technique. Though, what I have done is used enumerations for these types of word sizes, and prescribed the values that conform to the size. Does leave a bit of a hole for this technique when the bitfield is outside of a natural word size that Matlab supports.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Create Large-Scale Model Components についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!