r - service_aes.
This commit is contained in:
parent
e74147d36e
commit
a65585cb7f
|
@ -166,9 +166,11 @@ if(DDR_AUTO)
|
|||
endif()
|
||||
|
||||
# Compare for mismatch
|
||||
MATH(EXPR N_DDRS "${DDR_0}+${DDR_1}+${DDR_2}+${DDR_3}")
|
||||
if(NOT N_DDRS EQUAL ${N_DDR_CHAN})
|
||||
message(FATAL_ERROR "DDRs have not been configured properly.")
|
||||
if(EN_DCARD)
|
||||
MATH(EXPR N_DDRS "${DDR_0}+${DDR_1}+${DDR_2}+${DDR_3}")
|
||||
if(NOT N_DDRS EQUAL ${N_DDR_CHAN})
|
||||
message(FATAL_ERROR "DDRs have not been configured properly.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##
|
||||
|
|
|
@ -454,7 +454,7 @@ always_ff @(posedge aclk) begin
|
|||
end
|
||||
end
|
||||
NET_0_MACADDR_REG: // MAC address
|
||||
for (int i = 0; i < AXIL_DATA_BITS/8; i++) begin
|
||||
for (int i = 0; i < 6; i++) begin
|
||||
if(s_axi_ctrl.wstrb[i]) begin
|
||||
m_set_mac_addr_0.data[(i*8)+:8] <= s_axi_ctrl.wdata[(i*8)+:8];
|
||||
m_set_mac_addr_0.valid <= 1'b1;
|
||||
|
@ -478,7 +478,7 @@ always_ff @(posedge aclk) begin
|
|||
end
|
||||
end
|
||||
NET_1_MACADDR_REG: // MAC address
|
||||
for (int i = 0; i < AXIL_DATA_BITS/8; i++) begin
|
||||
for (int i = 0; i < 6; i++) begin
|
||||
if(s_axi_ctrl.wstrb[i]) begin
|
||||
m_set_mac_addr_1.data[(i*8)+:8] <= s_axi_ctrl.wdata[(i*8)+:8];
|
||||
m_set_mac_addr_1.valid <= 1'b1;
|
||||
|
|
|
@ -47,6 +47,9 @@ int main(void)
|
|||
|
||||
// Load AES service task
|
||||
cservice->addTask(opIdAes, [] (cProcess *cproc, std::vector<uint64_t> params) { // addr, len, keyLow, keyHigh
|
||||
// Map
|
||||
cproc->userMap((void*)params[0], (uint32_t) params[1]);
|
||||
|
||||
// Set up the key
|
||||
cproc->setCSR(params[2], 1);
|
||||
cproc->setCSR(params[3], 2);
|
||||
|
@ -54,6 +57,9 @@ int main(void)
|
|||
|
||||
// Invoke
|
||||
cproc->invoke({CoyoteOper::TRANSFER, (void*)params[0], (void*)params[0], (uint32_t) params[1], (uint32_t) params[1]});
|
||||
|
||||
// Unmap
|
||||
cproc->userUnmap((void*)params[0]);
|
||||
});
|
||||
|
||||
// Run the daemon
|
||||
|
|
Loading…
Reference in New Issue