openUBMC Chip Abstract Layer V0.1
载入中...
搜索中...
未找到
localbus.h
浏览该文件的文档.
1/*
2 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
3 *
4 * this file licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 * http://license.coscl.org.cn/MulanPSL2
8 *
9 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
11 * PURPOSE.
12 * See the Mulan PSL v2 for more details.
13 */
14
21#ifndef DRIVER_LOCALBUS_H
22#define DRIVER_LOCALBUS_H
23
24#include "driver.h"
25
26namespace DRIVER_LOCALBUS {
27using namespace bcal;
28
33class Localbus : public IDriver {
34public:
47 virtual string_t read(int32_t index, uint32_t type, uint32_t offset, uint32_t len, uint32_t mask) = 0;
48
62 virtual int32_t write(int32_t index, uint32_t type, uint32_t offset, uint32_t len, uint32_t mask, const string_view_t &val) = 0;
63
73 virtual void set_timing(int32_t index, uint32_t type, uint8_t value) = 0;
74
87 virtual void set_bitwidth_and_offset(int32_t index, uint8_t addr_offset, uint8_t width) = 0;
88};
89} // namespace
90#endif
Local Bus接口类
Definition localbus.h:33
virtual int32_t write(int32_t index, uint32_t type, uint32_t offset, uint32_t len, uint32_t mask, const string_view_t &val)=0
写 Local Bus 数据
virtual void set_timing(int32_t index, uint32_t type, uint8_t value)=0
设置 Local Bus 时序参数
virtual void set_bitwidth_and_offset(int32_t index, uint8_t addr_offset, uint8_t width)=0
设置 Local Bus 地址偏移
virtual string_t read(int32_t index, uint32_t type, uint32_t offset, uint32_t len, uint32_t mask)=0
读取 Local Bus 数据
BCAL层驱动公共接口
Definition driver.h:41
BCAL 驱动公共接口定义