/****************************************************************************
* wb_dma_3.pss
*
* Copyright 2023 Matthew Ballance and Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Created on:
* Author:
****************************************************************************/importaddr_reg_pkg::*;bufferMemBuf{randbit[32]size;// Size of the dataaddr_handle_taddr_h;}resourceChannel{}componentWbDma{poolMemBufmem_buf_p;bindmem_buf_p*;pool[16]Channelchannels_p;bindchannels_p*;actionMem2Mem{inputMemBufsrc_i;inputMemBufdst_o;randaddr_claim_s<>dst_claim;lockChannelchannel;// Input and output size must be the sameconstraintdst_o.size==src_i.size;// DMA only transfers wordsconstraint(dst_o.size%4)==0;// Specify size/alignment for allocationconstraintdst_claim.size==dst_o.size;constraintdst_claim.alignment==4;execpost_solve{dst_o.addr_h=make_handle_from_claim(dst_claim);}}actionMem2Dev{// TODO: fill in later}actionDev2Mem{// TODO: fill in later}}componentpss_top{transparent_addr_space_c<>aspace;WbDmadma;execinit_down{transparent_addr_region_s<>region;region.addr=0x8000_0000;region.size=0x1000_0000;aspace.add_region(region);region.addr=0x0000_0000;region.size=0x1000_0000;aspace.add_region(region);}}
Copyright 2014-2025 Matthew Ballance. All Rights Reserved
The views and opinions expressed above are solely those of the author and do not
represent those of my employer or any other party.