Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the ethernet common code to DML 1.4 #197

Merged
merged 2 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASENOTES.docu
Original file line number Diff line number Diff line change
Expand Up @@ -1721,4 +1721,6 @@ extern typedef struct { } my_type_t;</pre> </add-note></build-id>
<build-id value="6205"><add-note> Fixed a bug with how template types were
handled by DMLC that could cause the compiler to still exhibit
nondeterministic behaviour.</add-note></build-id>
<build-id value="next"><add-note> Ported the ethernet.dml lib file to
DML 1.4, no functionality change for 1.2 users.</add-note></build-id>
</rn>
12 changes: 6 additions & 6 deletions lib/1.2/ethernet.dml → lib/ethernet.dml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This module contains types needed when implementing ethernet
// devices.

dml 1.2;
dml 1.4;

import "simics/devs/ethernet.dml";

Expand All @@ -22,7 +22,7 @@ constant ETHERTYPE_REVARP = 0x8035; /* Reverse ARP */
// Use it like this:
//
// connect link is (ethernet_connect) {
// parameter documentation = "...";
// param documentation = "...";
// method update_mac_info {
// ... code to register MAC addresses with the link ...
// }
Expand All @@ -31,7 +31,7 @@ constant ETHERTYPE_REVARP = 0x8035; /* Reverse ARP */
// To send a frame, the send_frame method can be used instead of
// calling the interface function directly:
//
// call $link.send_frame(frame, false)
// link.send_frame(frame, false)
//
template ethernet_connect {
interface ethernet_common;
Expand All @@ -40,8 +40,8 @@ template ethernet_connect {
method send_frame(dbuffer_t *frame, bool crc_calculated) {
local frags_t f;
frags_init_add(&f, dbuffer_read_all(frame), dbuffer_len(frame));
$ethernet_common.frame(&f,
(crc_calculated) ? Eth_Frame_CRC_Unknown
: Eth_Frame_CRC_Match);
ethernet_common.frame(&f,
(crc_calculated) ? Eth_Frame_CRC_Unknown
: Eth_Frame_CRC_Match);
}
}